From 168c2066d380220f87c0925dcc0eab1f817b3b37 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 14 Nov 2024 22:27:36 +0000 Subject: [PATCH 1/2] feat: update Go Datastore import path feat: update Go Bigtable import path feat: release MetadataJob APIs and related resources in GA feat: expose create time in DataScanJobAPI docs: correct API documentation feat: release metadata export in private preview feat: Add data_version field to AspectSource docs: add info about schema changes for BigQuery metadata in Dataplex Catalog docs: Add Identifier for `name` in message `.google.cloud.dataplex.v1.MetadataJob` per https://google.aip.dev/cloud/2510 docs: Add comment for field `type` in message `.google.cloud.dataplex.v1.MetadataJob` per https://linter.aip.dev/192/has-comments docs: Add comment for field `status` in message `.google.cloud.dataplex.v1.MetadataJob` per https://linter.aip.dev/192/has-comments docs: Add link to fully qualified names documentation feat: add annotations in CreateMetadataJob, GetMetadataJob, ListMetaDataJobs and CancelMetadataJob for cloud audit logging feat: Add new Data Discovery scan type in Datascan docs: Scrub descriptions for standalone discovery scans docs: correct the dimensions for data quality rules feat: A new field `suspended` is added to DataScans feat: expose create time to customers feat: Add a TABLE_PUBLISHED field in DiscoveryEvent feat: Add a TABLE_UPDATED field in DiscoveryEvent feat: Add a TABLE_IGNORED field in DiscoveryEvent feat: Add a TABLE_DELETED field in DiscoveryEvent feat: Add a DATA_DISCOVERY enum type in DataScanEvent feat: Add a DataDiscoveryAppliedConfigs message docs: A comment for message `DataScanEvent` is changed feat: Add an Issue field to DiscoveryEvent.ActionDetails to output the action message in Cloud Logs feat: A new enum `TableType` is added feat: A new message `TableDetails` is added feat: A new field `datascan_id` is added to message `.google.cloud.dataplex.v1.DiscoveryEvent` feat: A new field `table` is added to message `.google.cloud.dataplex.v1.DiscoveryEvent` docs: Dataplex Tasks do not support Dataplex Content path as a direct input anymore PiperOrigin-RevId: 696600248 Source-Link: https://github.com/googleapis/googleapis/commit/43e53378966d2539cd44d31d9a33d5259fc4c73c Source-Link: https://github.com/googleapis/googleapis-gen/commit/1f67afb4970ea4c3fe535021a5fc8ba16968a026 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwbGV4Ly5Pd2xCb3QueWFtbCIsImgiOiIxZjY3YWZiNDk3MGVhNGMzZmU1MzUwMjFhNWZjOGJhMTY5NjhhMDI2In0= --- .../google-cloud-dataplex/v1/.eslintignore | 7 + .../google-cloud-dataplex/v1/.eslintrc.json | 3 + .../google-cloud-dataplex/v1/.gitignore | 14 + .../google-cloud-dataplex/v1/.jsdoc.js | 55 + .../google-cloud-dataplex/v1/.mocharc.js | 33 + .../google-cloud-dataplex/v1/.prettierrc.js | 22 + .../google-cloud-dataplex/v1/README.md | 1 + .../google-cloud-dataplex/v1/package.json | 63 + .../google/cloud/dataplex/v1/analyze.proto | 285 + .../google/cloud/dataplex/v1/catalog.proto | 1878 + .../google/cloud/dataplex/v1/content.proto | 269 + .../cloud/dataplex/v1/data_discovery.proto | 159 + .../cloud/dataplex/v1/data_profile.proto | 285 + .../cloud/dataplex/v1/data_quality.proto | 488 + .../cloud/dataplex/v1/data_taxonomy.proto | 793 + .../google/cloud/dataplex/v1/datascans.proto | 642 + .../google/cloud/dataplex/v1/logs.proto | 786 + .../google/cloud/dataplex/v1/metadata.proto | 823 + .../google/cloud/dataplex/v1/processing.proto | 104 + .../google/cloud/dataplex/v1/resources.proto | 807 + .../google/cloud/dataplex/v1/security.proto | 53 + .../google/cloud/dataplex/v1/service.proto | 1120 + .../google/cloud/dataplex/v1/tasks.proto | 422 + .../v1/protos/protos.d.ts | 45377 ++++++ .../google-cloud-dataplex/v1/protos/protos.js | 114449 +++++++++++++++ .../v1/protos/protos.json | 13622 ++ .../v1/catalog_service.cancel_metadata_job.js | 62 + .../v1/catalog_service.create_aspect_type.js | 79 + .../v1/catalog_service.create_entry.js | 87 + .../v1/catalog_service.create_entry_group.js | 79 + .../v1/catalog_service.create_entry_type.js | 79 + .../v1/catalog_service.create_metadata_job.js | 78 + .../v1/catalog_service.delete_aspect_type.js | 69 + .../v1/catalog_service.delete_entry.js | 62 + .../v1/catalog_service.delete_entry_group.js | 69 + .../v1/catalog_service.delete_entry_type.js | 68 + .../v1/catalog_service.get_aspect_type.js | 62 + .../generated/v1/catalog_service.get_entry.js | 77 + .../v1/catalog_service.get_entry_group.js | 62 + .../v1/catalog_service.get_entry_type.js | 62 + .../v1/catalog_service.get_metadata_job.js | 62 + .../v1/catalog_service.list_aspect_types.js | 93 + .../v1/catalog_service.list_entries.js | 94 + .../v1/catalog_service.list_entry_groups.js | 87 + .../v1/catalog_service.list_entry_types.js | 93 + .../v1/catalog_service.list_metadata_jobs.js | 92 + .../v1/catalog_service.lookup_entry.js | 83 + .../v1/catalog_service.search_entries.js | 91 + .../v1/catalog_service.update_aspect_type.js | 72 + .../v1/catalog_service.update_entry.js | 97 + .../v1/catalog_service.update_entry_group.js | 72 + .../v1/catalog_service.update_entry_type.js | 72 + .../v1/content_service.create_content.js | 72 + .../v1/content_service.delete_content.js | 62 + .../v1/content_service.get_content.js | 66 + .../v1/content_service.get_iam_policy.js | 67 + .../v1/content_service.list_content.js | 87 + .../v1/content_service.set_iam_policy.js | 77 + .../content_service.test_iam_permissions.js | 70 + .../v1/content_service.update_content.js | 72 + .../v1/data_scan_service.create_data_scan.js | 85 + .../v1/data_scan_service.delete_data_scan.js | 65 + ...can_service.generate_data_quality_rules.js | 65 + .../v1/data_scan_service.get_data_scan.js | 68 + .../v1/data_scan_service.get_data_scan_job.js | 68 + .../data_scan_service.list_data_scan_jobs.js | 95 + .../v1/data_scan_service.list_data_scans.js | 88 + .../v1/data_scan_service.run_data_scan.js | 65 + .../v1/data_scan_service.update_data_scan.js | 73 + ..._taxonomy_service.create_data_attribute.js | 83 + ...y_service.create_data_attribute_binding.js | 83 + ...a_taxonomy_service.create_data_taxonomy.js | 84 + ..._taxonomy_service.delete_data_attribute.js | 68 + ...y_service.delete_data_attribute_binding.js | 71 + ...a_taxonomy_service.delete_data_taxonomy.js | 68 + ...ata_taxonomy_service.get_data_attribute.js | 62 + ...nomy_service.get_data_attribute_binding.js | 62 + ...data_taxonomy_service.get_data_taxonomy.js | 62 + ...my_service.list_data_attribute_bindings.js | 90 + ...a_taxonomy_service.list_data_attributes.js | 86 + ...a_taxonomy_service.list_data_taxonomies.js | 87 + ..._taxonomy_service.update_data_attribute.js | 72 + ...y_service.update_data_attribute_binding.js | 72 + ...a_taxonomy_service.update_data_taxonomy.js | 72 + .../v1/dataplex_service.cancel_job.js | 62 + .../v1/dataplex_service.create_asset.js | 85 + .../v1/dataplex_service.create_environment.js | 83 + .../v1/dataplex_service.create_lake.js | 86 + .../v1/dataplex_service.create_task.js | 78 + .../v1/dataplex_service.create_zone.js | 86 + .../v1/dataplex_service.delete_asset.js | 63 + .../v1/dataplex_service.delete_environment.js | 63 + .../v1/dataplex_service.delete_lake.js | 63 + .../v1/dataplex_service.delete_task.js | 63 + .../v1/dataplex_service.delete_zone.js | 63 + .../v1/dataplex_service.get_asset.js | 62 + .../v1/dataplex_service.get_environment.js | 62 + .../generated/v1/dataplex_service.get_job.js | 62 + .../generated/v1/dataplex_service.get_lake.js | 62 + .../generated/v1/dataplex_service.get_task.js | 62 + .../generated/v1/dataplex_service.get_zone.js | 62 + .../v1/dataplex_service.list_asset_actions.js | 77 + .../v1/dataplex_service.list_assets.js | 85 + .../v1/dataplex_service.list_environments.js | 86 + .../v1/dataplex_service.list_jobs.js | 77 + .../v1/dataplex_service.list_lake_actions.js | 77 + .../v1/dataplex_service.list_lakes.js | 85 + .../v1/dataplex_service.list_sessions.js | 88 + .../v1/dataplex_service.list_tasks.js | 84 + .../v1/dataplex_service.list_zone_actions.js | 77 + .../v1/dataplex_service.list_zones.js | 84 + .../generated/v1/dataplex_service.run_task.js | 82 + .../v1/dataplex_service.update_asset.js | 73 + .../v1/dataplex_service.update_environment.js | 73 + .../v1/dataplex_service.update_lake.js | 73 + .../v1/dataplex_service.update_task.js | 73 + .../v1/dataplex_service.update_zone.js | 73 + .../v1/metadata_service.create_entity.js | 72 + .../v1/metadata_service.create_partition.js | 72 + .../v1/metadata_service.delete_entity.js | 68 + .../v1/metadata_service.delete_partition.js | 69 + .../v1/metadata_service.get_entity.js | 67 + .../v1/metadata_service.get_partition.js | 64 + .../v1/metadata_service.list_entities.js | 93 + .../v1/metadata_service.list_partitions.js | 96 + .../v1/metadata_service.update_entity.js | 66 + ...pet_metadata_google.cloud.dataplex.v1.json | 4763 + .../google-cloud-dataplex/v1/src/index.ts | 35 + .../v1/src/v1/catalog_service_client.ts | 5390 + .../src/v1/catalog_service_client_config.json | 165 + .../v1/src/v1/catalog_service_proto_list.json | 17 + .../v1/src/v1/content_service_client.ts | 2911 + .../src/v1/content_service_client_config.json | 78 + .../v1/src/v1/content_service_proto_list.json | 17 + .../v1/src/v1/data_scan_service_client.ts | 3271 + .../v1/data_scan_service_client_config.json | 62 + .../src/v1/data_scan_service_proto_list.json | 17 + .../v1/src/v1/data_taxonomy_service_client.ts | 3974 + .../data_taxonomy_service_client_config.json | 86 + .../v1/data_taxonomy_service_proto_list.json | 17 + .../v1/src/v1/dataplex_service_client.ts | 6322 + .../v1/dataplex_service_client_config.json | 201 + .../src/v1/dataplex_service_proto_list.json | 17 + .../v1/src/v1/gapic_metadata.json | 1189 + .../google-cloud-dataplex/v1/src/v1/index.ts | 24 + .../v1/src/v1/metadata_service_client.ts | 3147 + .../v1/metadata_service_client_config.json | 83 + .../src/v1/metadata_service_proto_list.json | 17 + .../system-test/fixtures/sample/src/index.js | 32 + .../system-test/fixtures/sample/src/index.ts | 62 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_catalog_service_v1.ts | 6095 + .../v1/test/gapic_content_service_v1.ts | 2940 + .../v1/test/gapic_data_scan_service_v1.ts | 3377 + .../v1/test/gapic_data_taxonomy_service_v1.ts | 4446 + .../v1/test/gapic_dataplex_service_v1.ts | 7633 + .../v1/test/gapic_metadata_service_v1.ts | 3185 + .../google-cloud-dataplex/v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + 159 files changed, 249736 insertions(+) create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/package.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-dataplex/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.eslintignore b/owl-bot-staging/google-cloud-dataplex/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json b/owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.gitignore b/owl-bot-staging/google-cloud-dataplex/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/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-dataplex/v1/.jsdoc.js b/owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js new file mode 100644 index 00000000000..cbdd5356520 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dataplex', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js b/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js b/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/README.md b/owl-bot-staging/google-cloud-dataplex/v1/README.md new file mode 100644 index 00000000000..a80d54e484e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/README.md @@ -0,0 +1 @@ +Dataplex: Nodejs Client diff --git a/owl-bot-staging/google-cloud-dataplex/v1/package.json b/owl-bot-staging/google-cloud-dataplex/v1/package.json new file mode 100644 index 00000000000..d9195f670ef --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/package.json @@ -0,0 +1,63 @@ +{ + "name": "@google-cloud/dataplex", + "version": "0.1.0", + "description": "Dataplex client for Node.js", + "repository": "googleapis/nodejs-dataplex", + "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 dataplex", + "dataplex", + "catalog service", + "content service", + "dataplex service", + "data scan service", + "data taxonomy service", + "metadata service" + ], + "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-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto new file mode 100644 index 00000000000..912e3c9e615 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto @@ -0,0 +1,285 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "AnalyzeProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Environment represents a user-visible compute infrastructure for analytics +// within a lake. +message Environment { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" + }; + + // Configuration for the underlying infrastructure used to run workloads. + message InfrastructureSpec { + // Compute resources associated with the analyze interactive workloads. + message ComputeResources { + // Optional. Size in GB of the disk. Default is 100 GB. + int32 disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total number of nodes in the sessions created for this + // environment. + int32 node_count = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Max configurable nodes. + // If max_node_count > node_count, then auto-scaling is enabled. + int32 max_node_count = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Software Runtime Configuration to run Analyze. + message OsImageRuntime { + // Required. Dataplex Image version. + string image_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of Java jars to be included in the runtime environment. + // Valid input includes Cloud Storage URIs to Jar binaries. + // For example, gs://bucket-name/my/path/to/file.jar + repeated string java_libraries = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, gs://bucket-name/my/path/to/lib.tar.gz + repeated string python_packages = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Spark properties to provide configuration for use in sessions + // created for this environment. The properties to set on daemon config + // files. Property keys are specified in `prefix:property` format. The + // prefix must be "spark". + map properties = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Hardware config + oneof resources { + // Optional. Compute resources needed for analyze interactive workloads. + ComputeResources compute = 50 [(google.api.field_behavior) = OPTIONAL]; + } + + // Software config + oneof runtime { + // Required. Software Runtime Configuration for analyze interactive + // workloads. + OsImageRuntime os_image = 100 [(google.api.field_behavior) = REQUIRED]; + } + } + + // Configuration for sessions created for this environment. + message SessionSpec { + // Optional. The idle time configuration of the session. The session will be + // auto-terminated at the end of this period. + google.protobuf.Duration max_idle_duration = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If True, this causes sessions to be pre-created and available + // for faster startup to enable interactive exploration use-cases. This + // defaults to False to avoid additional billed charges. These can only be + // set to True for the environment with name set to "default", and with + // default configuration. + bool enable_fast_startup = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of sessions created for this environment. + message SessionStatus { + // Output only. Queries over sessions to mark whether the environment is + // currently active or not + bool active = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // URI Endpoints to access sessions associated with the Environment. + message Endpoints { + // Output only. URI to serve notebook APIs + string notebooks = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI to serve SQL APIs + string sql = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The relative resource name of the environment, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the environment. This + // ID will be different if the environment is deleted and re-created with the + // same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Environment creation time. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the environment was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the environment. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the environment. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the environment. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Infrastructure specification for the Environment. + InfrastructureSpec infrastructure_spec = 100 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration for sessions created for this environment. + SessionSpec session_spec = 101 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of sessions created for this environment. + SessionStatus session_status = 102 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI Endpoints to access sessions associated with the + // Environment. + Endpoints endpoints = 200 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Content represents a user-visible notebook or a sql script +message Content { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Content" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" + }; + + // Configuration for the Sql Script content. + message SqlScript { + // Query Engine Type of the SQL Script. + enum QueryEngine { + // Value was unspecified. + QUERY_ENGINE_UNSPECIFIED = 0; + + // Spark SQL Query. + SPARK = 2; + } + + // Required. Query Engine to be used for the Sql Query. + QueryEngine engine = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for Notebook content. + message Notebook { + // Kernel Type of the Jupyter notebook. + enum KernelType { + // Kernel Type unspecified. + KERNEL_TYPE_UNSPECIFIED = 0; + + // Python 3 Kernel. + PYTHON3 = 1; + } + + // Required. Kernel Type of the notebook. + KernelType kernel_type = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. The relative resource name of the content, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; + + // Output only. System generated globally unique ID for the content. This ID + // will be different if the content is deleted and re-created with the same + // name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The path for the Content file, represented as directory + // structure. Unique within a lake. Limited to alphanumerics, hyphens, + // underscores, dots and slashes. + string path = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Content creation time. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the content was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the content. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the content. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Only returned in `GetContent` requests and not in `ListContent` request. + oneof data { + // Required. Content data in string format. + string data_text = 9 [(google.api.field_behavior) = REQUIRED]; + } + + // Types of content + oneof content { + // Sql Script related configurations. + SqlScript sql_script = 100; + + // Notebook related configurations. + Notebook notebook = 101; + } +} + +// Represents an active analyze session running for a user. +message Session { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Session" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" + }; + + // Output only. The relative resource name of the content, of the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Session" + } + ]; + + // Output only. Email of user running the session. + string user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Session start time. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of Session + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto new file mode 100644 index 00000000000..76bf4dda7a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto @@ -0,0 +1,1878 @@ +// 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.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dataplex.V1"; +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "CatalogProto"; +option java_package = "com.google.cloud.dataplex.v1"; +option php_namespace = "Google\\Cloud\\Dataplex\\V1"; +option ruby_package = "Google::Cloud::Dataplex::V1"; + +// The primary resources offered by this service are EntryGroups, EntryTypes, +// AspectTypes, and Entries. They collectively let data administrators organize, +// manage, secure, and catalog data located across cloud projects in their +// organization in a variety of storage systems, including Cloud Storage and +// BigQuery. +service CatalogService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates an EntryType. + rpc CreateEntryType(CreateEntryTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/entryTypes" + body: "entry_type" + }; + option (google.api.method_signature) = "parent,entry_type,entry_type_id"; + option (google.longrunning.operation_info) = { + response_type: "EntryType" + metadata_type: "OperationMetadata" + }; + } + + // Updates an EntryType. + rpc UpdateEntryType(UpdateEntryTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}" + body: "entry_type" + }; + option (google.api.method_signature) = "entry_type,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "EntryType" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an EntryType. + rpc DeleteEntryType(DeleteEntryTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryTypes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists EntryType resources in a project and location. + rpc ListEntryTypes(ListEntryTypesRequest) returns (ListEntryTypesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/entryTypes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an EntryType. + rpc GetEntryType(GetEntryTypeRequest) returns (EntryType) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryTypes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an AspectType. + rpc CreateAspectType(CreateAspectTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/aspectTypes" + body: "aspect_type" + }; + option (google.api.method_signature) = "parent,aspect_type,aspect_type_id"; + option (google.longrunning.operation_info) = { + response_type: "AspectType" + metadata_type: "OperationMetadata" + }; + } + + // Updates an AspectType. + rpc UpdateAspectType(UpdateAspectTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}" + body: "aspect_type" + }; + option (google.api.method_signature) = "aspect_type,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AspectType" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an AspectType. + rpc DeleteAspectType(DeleteAspectTypeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/aspectTypes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists AspectType resources in a project and location. + rpc ListAspectTypes(ListAspectTypesRequest) + returns (ListAspectTypesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/aspectTypes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an AspectType. + rpc GetAspectType(GetAspectTypeRequest) returns (AspectType) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/aspectTypes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an EntryGroup. + rpc CreateEntryGroup(CreateEntryGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/entryGroups" + body: "entry_group" + }; + option (google.api.method_signature) = "parent,entry_group,entry_group_id"; + option (google.longrunning.operation_info) = { + response_type: "EntryGroup" + metadata_type: "OperationMetadata" + }; + } + + // Updates an EntryGroup. + rpc UpdateEntryGroup(UpdateEntryGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" + body: "entry_group" + }; + option (google.api.method_signature) = "entry_group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "EntryGroup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an EntryGroup. + rpc DeleteEntryGroup(DeleteEntryGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists EntryGroup resources in a project and location. + rpc ListEntryGroups(ListEntryGroupsRequest) + returns (ListEntryGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/entryGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an EntryGroup. + rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an Entry. + 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,entry_id"; + } + + // Updates an Entry. + 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,update_mask"; + } + + // Deletes an Entry. + rpc DeleteEntry(DeleteEntryRequest) returns (Entry) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Entries within an EntryGroup. + rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an Entry. + // + // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + // changing. For more information, see [Changes to BigQuery metadata stored in + // Dataplex + // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). + rpc GetEntry(GetEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up a single Entry by name using the permission on the source system. + // + // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + // changing. For more information, see [Changes to BigQuery metadata stored in + // Dataplex + // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). + rpc LookupEntry(LookupEntryRequest) returns (Entry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*}:lookupEntry" + }; + } + + // Searches for Entries matching the given query and scope. + rpc SearchEntries(SearchEntriesRequest) returns (SearchEntriesResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*}:searchEntries" + }; + option (google.api.method_signature) = "name,query"; + } + + // Creates a metadata job. For example, use a metadata job to import Dataplex + // Catalog entries and aspects from a third-party system into Dataplex. + rpc CreateMetadataJob(CreateMetadataJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/metadataJobs" + body: "metadata_job" + }; + option (google.api.method_signature) = + "parent,metadata_job,metadata_job_id"; + option (google.longrunning.operation_info) = { + response_type: "MetadataJob" + metadata_type: "OperationMetadata" + }; + } + + // Gets a metadata job. + rpc GetMetadataJob(GetMetadataJobRequest) returns (MetadataJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/metadataJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists metadata jobs. + rpc ListMetadataJobs(ListMetadataJobsRequest) + returns (ListMetadataJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/metadataJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels a metadata job. + // + // If you cancel a metadata import job that is in progress, the changes in the + // job might be partially applied. We recommend that you reset the state of + // the entry groups in your project by running another metadata job that + // reverts the changes from the canceled job. + rpc CancelMetadataJob(CancelMetadataJobRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// AspectType is a template for creating Aspects, and represents the +// JSON-schema for a given Entry, for example, BigQuery Table Schema. +message AspectType { + option (google.api.resource) = { + type: "dataplex.googleapis.com/AspectType" + pattern: "projects/{project}/locations/{location}/aspectTypes/{aspect_type}" + plural: "aspectTypes" + singular: "aspectType" + }; + + // Autorization for an AspectType. + message Authorization { + // Immutable. The IAM permission grantable on the EntryGroup to allow access + // to instantiate Aspects of Dataplex owned AspectTypes, only settable for + // Dataplex owned Types. + string alternate_use_permission = 1 + [(google.api.field_behavior) = IMMUTABLE]; + } + + // MetadataTemplate definition for an AspectType. + message MetadataTemplate { + // Definition of Enumvalue, to be used for enum fields. + message EnumValue { + // Required. Index for the enum value. It can't be modified. + int32 index = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the enumvalue. This is the actual value that the + // aspect can contain. + string name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. You can set this message if you need to deprecate an enum + // value. + string deprecated = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Definition of the constraints of a field. + message Constraints { + // Optional. Marks this field as optional or required. + bool required = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Definition of the annotations of a field. + message Annotations { + // Optional. Marks a field as deprecated. You can include a deprecation + // message. + string deprecated = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display name for a field. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description for a field. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display order for a field. You can use this to reorder where + // a field is rendered. + int32 display_order = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. You can use String Type annotations to specify special + // meaning to string fields. The following values are supported: + // + // * richText: The field must be interpreted as a rich text field. + // * url: A fully qualified URL link. + // * resource: A service qualified resource reference. + string string_type = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Suggested hints for string fields. You can use them to + // suggest values to users through console. + repeated string string_values = 7 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Index is used to encode Template messages. The value of index + // can range between 1 and 2,147,483,647. Index must be unique within all + // fields in a Template. (Nested Templates can reuse indexes). Once a + // Template is defined, the index cannot be changed, because it identifies + // the field in the actual storage format. Index is a mandatory field, but + // it is optional for top level fields, and map/array "values" definitions. + int32 index = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name of the field. + string name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The datatype of this field. The following values are supported: + // + // Primitive types: + // + // * string + // * integer + // * boolean + // * double + // * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: + // "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). + // + // Complex types: + // + // * enum + // * array + // * map + // * record + string type = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field definition. You must specify it if the type is record. It + // defines the nested fields. + repeated MetadataTemplate record_fields = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of values for an enum type. You must define it if the + // type is enum. + repeated EnumValue enum_values = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If the type is map, set map_items. map_items can refer to a + // primitive field or a complex (record only) field. To specify a primitive + // field, you only need to set name and type in the nested + // MetadataTemplate. The recommended value for the name field is item, as + // this isn't used in the actual payload. + MetadataTemplate map_items = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If the type is array, set array_items. array_items can refer + // to a primitive field or a complex (record only) field. To specify a + // primitive field, you only need to set name and type in the nested + // MetadataTemplate. The recommended value for the name field is item, as + // this isn't used in the actual payload. + MetadataTemplate array_items = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. You can use type id if this definition of the field needs to be + // reused later. The type id must be unique across the entire template. You + // can only specify it if the field type is record. + string type_id = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A reference to another field definition (not an inline + // definition). The value must be equal to the value of an id field defined + // elsewhere in the MetadataTemplate. Only fields with record type can + // refer to other fields. + string type_ref = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the constraints on this field. + Constraints constraints = 50 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies annotations on this field. + Annotations annotations = 51 [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. The relative resource name of the AspectType, of the form: + // projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + } + ]; + + // Output only. System generated globally unique ID for the AspectType. + // If you delete and recreate the AspectType with the same name, then this ID + // will be different. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the AspectType was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the AspectType was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the AspectType. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the AspectType. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // The service computes this checksum. The client may send it on update and + // delete requests to ensure it has an up-to-date value before proceeding. + string etag = 8; + + // Immutable. Defines the Authorization for this type. + Authorization authorization = 52 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. MetadataTemplate of the aspect. + MetadataTemplate metadata_template = 53 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Denotes the transfer status of the Aspect Type. It is + // unspecified for Aspect Types created from Dataplex API. + TransferStatus transfer_status = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An Entry Group represents a logical grouping of one or more Entries. +message EntryGroup { + option (google.api.resource) = { + type: "dataplex.googleapis.com/EntryGroup" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" + plural: "entryGroups" + singular: "entryGroup" + }; + + // Output only. The relative resource name of the EntryGroup, in the format + // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Output only. System generated globally unique ID for the EntryGroup. If you + // delete and recreate the EntryGroup with the same name, this ID will be + // different. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the EntryGroup was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the EntryGroup was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the EntryGroup. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the EntryGroup. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // This checksum is computed by the service, and might be sent on update and + // delete requests to ensure the client has an up-to-date value before + // proceeding. + string etag = 8; + + // Output only. Denotes the transfer status of the Entry Group. It is + // unspecified for Entry Group created from Dataplex API. + TransferStatus transfer_status = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Entry Type is a template for creating Entries. +message EntryType { + option (google.api.resource) = { + type: "dataplex.googleapis.com/EntryType" + pattern: "projects/{project}/locations/{location}/entryTypes/{entry_type}" + plural: "entryTypes" + singular: "entryType" + }; + + message AspectInfo { + // Required aspect type for the entry type. + string type = 1 [(google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + }]; + } + + // Authorization for an Entry Type. + message Authorization { + // Immutable. The IAM permission grantable on the Entry Group to allow + // access to instantiate Entries of Dataplex owned Entry Types, only + // settable for Dataplex owned Types. + string alternate_use_permission = 1 + [(google.api.field_behavior) = IMMUTABLE]; + } + + // Output only. The relative resource name of the EntryType, of the form: + // projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryType" + } + ]; + + // Output only. System generated globally unique ID for the EntryType. This ID + // will be different if the EntryType is deleted and re-created with the same + // name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the EntryType was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the EntryType was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the EntryType. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the EntryType. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the service, and might be sent on + // update and delete requests to ensure the client has an up-to-date value + // before proceeding. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates the classes this Entry Type belongs to, for example, + // TABLE, DATABASE, MODEL. + repeated string type_aliases = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The platform that Entries of this type belongs to. + string platform = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The system that Entries of this type belongs to. Examples include + // CloudSQL, MariaDB etc + string system = 11 [(google.api.field_behavior) = OPTIONAL]; + + // AspectInfo for the entry type. + repeated AspectInfo required_aspects = 50; + + // Immutable. Authorization defined for this type. + Authorization authorization = 51 [(google.api.field_behavior) = IMMUTABLE]; +} + +// An aspect is a single piece of metadata describing an entry. +message Aspect { + // Output only. The resource name of the type used to create this Aspect. + string aspect_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The path in the entry under which the aspect is attached. + string path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the Aspect was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the Aspect was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The content of the aspect, according to its aspect type schema. + // The maximum size of the field is 120KB (encoded as UTF-8). + google.protobuf.Struct data = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Information related to the source system of the aspect. + AspectSource aspect_source = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information related to the source system of the aspect. +message AspectSource { + // The time the aspect was created in the source system. + google.protobuf.Timestamp create_time = 10; + + // The time the aspect was last updated in the source system. + google.protobuf.Timestamp update_time = 11; + + // The version of the data format used to produce this data. This field is + // used to indicated when the underlying data format changes (e.g., schema + // modifications, changes to the source URL format definition, etc). + string data_version = 12; +} + +// An entry is a representation of a data resource that can be described by +// various metadata. +message Entry { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Entry" + pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" + plural: "entries" + singular: "entry" + }; + + // Identifier. The relative resource name of the entry, in the format + // `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The relative resource name of the entry type that was + // used to create this entry, in the format + // `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + string entry_type = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. The time when the entry was created in Dataplex. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the entry was last updated in Dataplex. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The aspects that are attached to the entry. Depending on how the + // aspect is attached to the entry, the format of the aspect key can be one of + // the following: + // + // * If the aspect is attached directly to the entry: + // `{project_id_or_number}.{location_id}.{aspect_type_id}` + // * If the aspect is attached to an entry's path: + // `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}` + map aspects = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. The resource name of the parent entry. + string parent_entry = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. A name for the entry that can be referenced by an external + // system. For more information, see [Fully qualified + // names](https://cloud.google.com/data-catalog/docs/fully-qualified-names). + // The maximum size of the field is 4000 characters. + string fully_qualified_name = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information related to the source system of the data resource + // that is represented by the entry. + EntrySource entry_source = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information related to the source system of the data resource that is +// represented by the entry. +message EntrySource { + // Information about individual items in the hierarchy that is associated with + // the data resource. + message Ancestor { + // Optional. The name of the ancestor resource. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the ancestor resource. + string type = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The name of the resource in the source system. + // Maximum length is 4,000 characters. + string resource = 1; + + // The name of the source system. + // Maximum length is 64 characters. + string system = 2; + + // The platform containing the source system. + // Maximum length is 64 characters. + string platform = 3; + + // A user-friendly display name. + // Maximum length is 500 characters. + string display_name = 5; + + // A description of the data resource. + // Maximum length is 2,000 characters. + string description = 6; + + // User-defined labels. + // The maximum size of keys and values is 128 characters each. + map labels = 7; + + // Immutable. The entries representing the ancestors of the data resource in + // the source system. + repeated Ancestor ancestors = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // The time when the resource was created in the source system. + google.protobuf.Timestamp create_time = 10; + + // The time when the resource was last updated in the source system. If the + // entry exists in the system and its `EntrySource` has `update_time` + // populated, further updates to the `EntrySource` of the entry must provide + // incremental updates to its `update_time`. + google.protobuf.Timestamp update_time = 11; + + // Output only. Location of the resource in the source system. You can search + // the entry by this location. By default, this should match the location of + // the entry group containing this entry. A different value allows capturing + // the source location for data external to Google Cloud. + string location = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Create EntryGroup Request. +message CreateEntryGroupRequest { + // Required. The resource name of the entryGroup, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. EntryGroup identifier. + string entry_group_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. EntryGroup Resource. + EntryGroup entry_group = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update EntryGroup Request. +message UpdateEntryGroupRequest { + // Required. EntryGroup Resource. + EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The service validates the request, without performing any + // mutations. The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete EntryGroup Request. +message DeleteEntryGroupRequest { + // Required. The resource name of the EntryGroup: + // `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value, the DeleteEntryGroupRequest method returns an ABORTED error + // response. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List entryGroups request. +message ListEntryGroupsRequest { + // Required. The resource name of the entryGroup location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a Google Cloud region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of EntryGroups to return. The service may return + // fewer than this value. If unspecified, the service returns at most 10 + // EntryGroups. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntryGroups` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters you provide to `ListEntryGroups` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List entry groups response. +message ListEntryGroupsResponse { + // Entry groups under the given parent location. + repeated EntryGroup entry_groups = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that the service couldn't reach. + repeated string unreachable_locations = 3; +} + +// Get EntryGroup request. +message GetEntryGroupRequest { + // Required. The resource name of the EntryGroup: + // `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; +} + +// Create EntryType Request. +message CreateEntryTypeRequest { + // Required. The resource name of the EntryType, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a Google Cloud region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. EntryType identifier. + string entry_type_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. EntryType Resource. + EntryType entry_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update EntryType Request. +message UpdateEntryTypeRequest { + // Required. EntryType Resource. + EntryType entry_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delele EntryType Request. +message DeleteEntryTypeRequest { + // Required. The resource name of the EntryType: + // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryType" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value, the DeleteEntryTypeRequest method returns an ABORTED error response. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List EntryTypes request +message ListEntryTypesRequest { + // Required. The resource name of the EntryType location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a Google Cloud region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of EntryTypes to return. The service may return + // fewer than this value. If unspecified, the service returns at most 10 + // EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntryTypes` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters you provided to `ListEntryTypes` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The service supports the following formats: + // + // * labels.key1 = "value1" + // * labels:key1 + // * name = "value" + // + // These restrictions can be conjoined with AND, OR, and NOT conjunctions. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Orders the result by `name` or `create_time` fields. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List EntryTypes response. +message ListEntryTypesResponse { + // EntryTypes under the given parent location. + repeated EntryType entry_types = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that the service couldn't reach. + repeated string unreachable_locations = 3; +} + +// Get EntryType request. +message GetEntryTypeRequest { + // Required. The resource name of the EntryType: + // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryType" + } + ]; +} + +// Create AspectType Request. +message CreateAspectTypeRequest { + // Required. The resource name of the AspectType, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a Google Cloud region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. AspectType identifier. + string aspect_type_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. AspectType Resource. + AspectType aspect_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update AspectType Request +message UpdateAspectTypeRequest { + // Required. AspectType Resource + AspectType aspect_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delele AspectType Request. +message DeleteAspectTypeRequest { + // Required. The resource name of the AspectType: + // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value, the DeleteAspectTypeRequest method returns an ABORTED error + // response. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List AspectTypes request. +message ListAspectTypesRequest { + // Required. The resource name of the AspectType location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a Google Cloud region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of AspectTypes to return. The service may return + // fewer than this value. If unspecified, the service returns at most 10 + // AspectTypes. The maximum value is 1000; values above 1000 will be coerced + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAspectTypes` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters you provide to `ListAspectTypes` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The service supports the following formats: + // + // * labels.key1 = "value1" + // * labels:key1 + // * name = "value" + // + // These restrictions can be conjoined with AND, OR, and NOT conjunctions. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Orders the result by `name` or `create_time` fields. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List AspectTypes response. +message ListAspectTypesResponse { + // AspectTypes under the given parent location. + repeated AspectType aspect_types = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that the service couldn't reach. + repeated string unreachable_locations = 3; +} + +// Get AspectType request. +message GetAspectTypeRequest { + // Required. The resource name of the AspectType: + // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + } + ]; +} + +// Create Entry request. +message CreateEntryRequest { + // Required. The resource name of the parent Entry Group: + // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Required. Entry identifier. It has to be unique within an Entry Group. + // + // Entries corresponding to Google Cloud resources use an Entry ID format + // based on [full resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + // The format is a full resource name of the resource without the + // prefix double slashes in the API service name part of the full resource + // name. This allows retrieval of entries using their associated resource + // name. + // + // For example, if the full resource name of a resource is + // `//library.googleapis.com/shelves/shelf1/books/book2`, + // then the suggested entry_id is + // `library.googleapis.com/shelves/shelf1/books/book2`. + // + // It is also suggested to follow the same convention for entries + // corresponding to resources from providers or systems other than Google + // Cloud. + // + // The maximum size of the field is 4000 characters. + string entry_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Entry resource. + Entry entry = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Update Entry request. +message UpdateEntryRequest { + // Required. Entry resource. + Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Mask of fields to update. To update Aspects, the update_mask must + // contain the value "aspects". + // + // If the update_mask is empty, the service will update all modifiable fields + // present in the request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true and the entry doesn't exist, the service will + // create it. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true and the aspect_keys specify aspect ranges, the + // service deletes any existing aspects from that range that weren't provided + // in the request. + bool delete_missing_aspects = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The map keys of the Aspects which the service should modify. It + // supports the following syntaxes: + // + // * `` - matches an aspect of the given type and empty + // path. + // * `@path` - matches an aspect of the given type and + // specified path. For example, to attach an aspect to a field that is + // specified by the `schema` aspect, the path should have the format + // `Schema.`. + // * `*` - matches aspects of the given type for all + // paths. + // * `*@path` - matches aspects of all types on the given path. + // + // The service will not remove existing aspects matching the syntax unless + // `delete_missing_aspects` is set to true. + // + // If this field is left empty, the service treats it as specifying + // exactly those Aspects present in the request. + repeated string aspect_keys = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete Entry request. +message DeleteEntryRequest { + // Required. The resource name of the Entry: + // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } + ]; +} + +// List Entries request. +message ListEntriesRequest { + // Required. The resource name of the parent Entry Group: + // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Optional. Number of items to return per page. If there are remaining + // results, the service returns a next_page_token. If unspecified, the service + // returns at most 10 Entries. The maximum value is 100; values above 100 will + // be coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntries` call. Provide + // this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter on the entries to return. Filters are case-sensitive. + // You can filter the request by the following fields: + // + // * entry_type + // * entry_source.display_name + // + // The comparison operators are =, !=, <, >, <=, >=. The service compares + // strings according to lexical order. + // + // You can use the logical operators AND, OR, NOT in the filter. + // + // You can use Wildcard "*", but for entry_type you need to provide the + // full project id or number. + // + // Example filter expressions: + // + // * "entry_source.display_name=AnExampleDisplayName" + // * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + // * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + // entry_type=projects/another-project/locations/*" + // * "NOT entry_source.display_name=AnotherExampleDisplayName" + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List Entries response. +message ListEntriesResponse { + // The list of entries under the given parent location. + repeated Entry entries = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get Entry request. +message GetEntryRequest { + // Required. The resource name of the Entry: + // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } + ]; + + // Optional. View to control which parts of an entry the service should + // return. + EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits the aspects returned to the provided aspect types. + // It only works for CUSTOM view. + repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits the aspects returned to those associated with the provided + // paths within the Entry. It only works for CUSTOM view. + repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Lookup Entry request using permissions in the source system. +message LookupEntryRequest { + // Required. The project to which the request should be attributed in the + // following form: `projects/{project}/locations/{location}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. View to control which parts of an entry the service should + // return. + EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits the aspects returned to the provided aspect types. + // It only works for CUSTOM view. + repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits the aspects returned to those associated with the provided + // paths within the Entry. It only works for CUSTOM view. + repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource name of the Entry: + // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + string entry = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } + ]; +} + +message SearchEntriesRequest { + // Required. The project to which the request should be attributed in the + // following form: `projects/{project}/locations/{location}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The query against which entries in scope should be matched. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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 = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `SearchEntries` call. Provide + // this to retrieve the subsequent page. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the ordering of results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The scope under which the search should be operating. It must + // either be `organizations/` or `projects/`. If it is + // unspecified, it defaults to the organization where the project provided in + // `name` is located. + string scope = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A single result of a SearchEntries request. +message SearchEntriesResult { + // Snippets for the entry, contains HTML-style highlighting for + // matched tokens, will be used in UI. + message Snippets { + option deprecated = true; + + // Entry + Entry dataplex_entry = 1 [deprecated = true]; + } + + // Linked resource name. + string linked_resource = 8 [deprecated = true]; + + Entry dataplex_entry = 9; + + // Snippets. + Snippets snippets = 12 [deprecated = true]; +} + +message SearchEntriesResponse { + // The results matching the search query. + repeated SearchEntriesResult results = 1; + + // The estimated total number of matching entries. This number isn't + // guaranteed to be accurate. + int32 total_size = 2; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 3; + + // Locations that the service couldn't reach. Search results don't include + // data from these locations. + repeated string unreachable = 4; +} + +// An object that describes the values that you want to set for an entry and its +// attached aspects when you import metadata. Used when you run a metadata +// import job. See +// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]. +// +// You provide a collection of import items in a metadata import file. For more +// information about how to create a metadata import file, see [Metadata import +// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). +message ImportItem { + // Information about an entry and its attached aspects. + Entry entry = 1; + + // The fields to update, in paths that are relative to the `Entry` resource. + // Separate each field with a comma. + // + // In `FULL` entry sync mode, Dataplex includes the paths of all of the fields + // for an entry that can be modified, including aspects. This means that + // Dataplex replaces the existing entry with the entry in the metadata import + // file. All modifiable fields are updated, regardless of the fields that are + // listed in the update mask, and regardless of whether a field is present + // in the `entry` object. + // + // + // The `update_mask` field is ignored when an entry is created or re-created. + // + // Dataplex also determines which entries and aspects to modify by comparing + // the values and timestamps that you provide in the metadata import file with + // the values and timestamps that exist in your project. For more information, + // see [Comparison + // logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). + google.protobuf.FieldMask update_mask = 2; + + // The aspects to modify. Supports the following syntaxes: + // + // * `{aspect_type_reference}`: matches aspects that belong to the specified + // aspect type and are attached directly to the entry. + // * `{aspect_type_reference}@{path}`: matches aspects that belong to the + // specified aspect type and path. + // * `{aspect_type_reference}@*`: matches aspects that belong to the specified + // aspect type for all paths. + // + // Replace `{aspect_type_reference}` with a reference to the aspect type, in + // the format + // `{project_id_or_number}.{location_id}.{aspect_type_id}`. + // + // If you leave this field empty, it is treated as specifying exactly those + // aspects that are present within the specified entry. + // + // In `FULL` entry sync mode, Dataplex implicitly adds the keys for all of the + // required aspects of an entry. + repeated string aspect_keys = 3; +} + +// Create metadata job request. +message CreateMetadataJobRequest { + // Required. The resource name of the parent location, in the format + // `projects/{project_id_or_number}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The metadata job resource. + MetadataJob metadata_job = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metadata job ID. If not provided, a unique ID is generated + // with the prefix `metadata-job-`. + string metadata_job_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get metadata job request. +message GetMetadataJobRequest { + // Required. The resource name of the metadata job, in the format + // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/MetadataJob" + } + ]; +} + +// List metadata jobs request. +message ListMetadataJobsRequest { + // Required. The resource name of the parent location, in the format + // `projects/{project_id_or_number}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of metadata jobs to return. The service might + // return fewer jobs than this value. If unspecified, at most 10 jobs are + // returned. The maximum value is 1,000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token received from a previous `ListMetadataJobs` call. + // Provide this token to retrieve the subsequent page of results. When + // paginating, all other parameters that are provided to the + // `ListMetadataJobs` request must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The service supports the following formats: + // + // * `labels.key1 = "value1"` + // * `labels:key1` + // * `name = "value"` + // + // You can combine filters with `AND`, `OR`, and `NOT` operators. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field to sort the results by, either `name` or `create_time`. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata jobs response. +message ListMetadataJobsResponse { + // Metadata jobs under the specified parent location. + repeated MetadataJob metadata_jobs = 1; + + // A token to retrieve the next page of results. If there are no more results + // in the list, the value is empty. + string next_page_token = 2; + + // Locations that the service couldn't reach. + repeated string unreachable_locations = 3; +} + +// Cancel metadata job request. +message CancelMetadataJobRequest { + // Required. The resource name of the job, in the format + // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/MetadataJob" + } + ]; +} + +// A metadata job resource. +message MetadataJob { + option (google.api.resource) = { + type: "dataplex.googleapis.com/MetadataJob" + pattern: "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" + }; + + // Results from a metadata import job. + message ImportJobResult { + // Output only. The total number of entries that were deleted. + int64 deleted_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were updated. + int64 updated_entries = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were created. + int64 created_entries = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were unchanged. + int64 unchanged_entries = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were recreated. + int64 recreated_entries = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the status was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Job specification for a metadata import job + message ImportJobSpec { + // Specifies how the entries and aspects in a metadata job are updated. + enum SyncMode { + // Sync mode unspecified. + SYNC_MODE_UNSPECIFIED = 0; + + // All resources in the job's scope are modified. If a resource exists in + // Dataplex but isn't included in the metadata import file, the resource + // is deleted when you run the metadata job. Use this mode to perform a + // full sync of the set of entries in the job scope. + FULL = 1; + + // Only the entries and aspects that are explicitly included in the + // metadata import file are modified. Use this mode to modify a subset of + // resources while leaving unreferenced resources unchanged. + INCREMENTAL = 2; + } + + // The level of logs to write to Cloud Logging for this job. + enum LogLevel { + // Log level unspecified. + LOG_LEVEL_UNSPECIFIED = 0; + + // Debug-level logging. Captures detailed logs for each import item. Use + // debug-level logging to troubleshoot issues with specific import items. + // For example, use debug-level logging to identify resources that are + // missing from the job scope, entries or aspects that don't conform to + // the associated entry type or aspect type, or other misconfigurations + // with the metadata import file. + // + // Depending on the size of your metadata job and the number of logs that + // are generated, debug-level logging might incur + // [additional costs](https://cloud.google.com/stackdriver/pricing). + DEBUG = 1; + + // Info-level logging. Captures logs at the overall job level. Includes + // aggregate logs about import items, but doesn't specify which import + // item has an error. + INFO = 2; + } + + // A boundary on the scope of impact that the metadata import job can have. + message ImportJobScope { + // Required. The entry group that is in scope for the import job, + // specified as a relative resource name in the format + // `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`. + // Only entries that belong to the specified entry group are affected by + // the job. + // + // Must contain exactly one element. The entry group and the job + // must be in the same location. + repeated string entry_groups = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Required. The entry types that are in scope for the import job, + // specified as relative resource names in the format + // `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`. + // The job modifies only the entries that belong to these entry types. + // + // If the metadata import file attempts to modify an entry whose type + // isn't included in this list, the import job is halted before modifying + // any entries or aspects. + // + // The location of an entry type must either match the location of the + // job, or the entry type must be global. + repeated string entry_types = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryType" + } + ]; + + // Optional. The aspect types that are in scope for the import job, + // specified as relative resource names in the format + // `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + // The job modifies only the aspects that belong to these aspect types. + // + // If the metadata import file attempts to modify an aspect whose type + // isn't included in this list, the import job is halted before modifying + // any entries or aspects. + // + // The location of an aspect type must either match the location of the + // job, or the aspect type must be global. + repeated string aspect_types = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + } + ]; + } + + // Optional. The URI of a Cloud Storage bucket or folder (beginning with + // `gs://` and ending with `/`) that contains the metadata import files for + // this job. + // + // A metadata import file defines the values to set for each of the entries + // and aspects in a metadata job. For more information about how to create a + // metadata import file and the file requirements, see [Metadata import + // file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). + // + // You can provide multiple metadata import files in the same metadata job. + // The bucket or folder must contain at least one metadata import file, in + // JSON Lines format (either `.json` or `.jsonl` file extension). + // + // In `FULL` entry sync mode, don't save the metadata import file in a + // folder named `SOURCE_STORAGE_URI/deletions/`. + // + // **Caution**: If the metadata import file contains no data, all entries + // and aspects that belong to the job's scope are deleted. + string source_storage_uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time when the process that created the metadata import + // files began. + google.protobuf.Timestamp source_create_time = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A boundary on the scope of impact that the metadata import job + // can have. + ImportJobScope scope = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The sync mode for entries. + // Only `FULL` mode is supported for entries. All entries in the job's scope + // are modified. If an entry exists in Dataplex but isn't included in the + // metadata import file, the entry is deleted when you run the metadata job. + SyncMode entry_sync_mode = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The sync mode for aspects. + // Only `INCREMENTAL` mode is supported for aspects. An aspect is modified + // only if the metadata import file includes a reference to the aspect in + // the `update_mask` field and the `aspect_keys` field. + SyncMode aspect_sync_mode = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The level of logs to write to Cloud Logging for this job. + // + // Debug-level logs provide highly-detailed information for + // troubleshooting, but their increased verbosity could incur [additional + // costs](https://cloud.google.com/stackdriver/pricing) that might not be + // merited for all jobs. + // + // If unspecified, defaults to `INFO`. + LogLevel log_level = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Metadata job type. + enum Type { + // Unspecified. + TYPE_UNSPECIFIED = 0; + + // Import job. + IMPORT = 1; + } + + // Metadata job status. + message Status { + // State of a metadata job. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The job is queued. + QUEUED = 1; + + // The job is running. + RUNNING = 2; + + // The job is being canceled. + CANCELING = 3; + + // The job is canceled. + CANCELED = 4; + + // The job succeeded. + SUCCEEDED = 5; + + // The job failed. + FAILED = 6; + + // The job completed with some errors. + SUCCEEDED_WITH_ERRORS = 7; + } + + // Output only. State of the metadata job. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Message relating to the progression of a metadata job. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Progress tracking. + int32 completion_percent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the status was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The name of the resource that the configuration is + // applied to, in the format + // `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. A system-generated, globally unique ID for the metadata job. + // If the metadata job is deleted and then re-created with the same name, this + // ID is different. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The time when the metadata job was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata job was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Metadata job type. + Type type = 6 [(google.api.field_behavior) = REQUIRED]; + + oneof spec { + // Import job specification. + ImportJobSpec import_spec = 100; + } + + oneof result { + // Output only. Import job result. + ImportJobResult import_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Metadata job status. + Status status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// View for controlling which parts of an entry are to be returned. +enum EntryView { + // Unspecified EntryView. Defaults to FULL. + ENTRY_VIEW_UNSPECIFIED = 0; + + // Returns entry only, without aspects. + BASIC = 1; + + // Returns all required aspects as well as the keys of all non-required + // aspects. + FULL = 2; + + // Returns aspects matching custom fields in GetEntryRequest. If the number of + // aspects exceeds 100, the first 100 will be returned. + CUSTOM = 3; + + // Returns all aspects. If the number of aspects exceeds 100, the first + // 100 will be returned. + ALL = 4; +} + +// Denotes the transfer status of a resource. It is unspecified for resources +// created from Dataplex API. +enum TransferStatus { + // The default value. It is set for resources that were not subject for + // migration from Data Catalog service. + TRANSFER_STATUS_UNSPECIFIED = 0; + + // Indicates that a resource was migrated from Data Catalog service but it + // hasn't been transferred yet. In particular the resource cannot be updated + // from Dataplex API. + TRANSFER_STATUS_MIGRATED = 1; + + // Indicates that a resource was transferred from Data Catalog service. The + // resource can only be updated from Dataplex API. + TRANSFER_STATUS_TRANSFERRED = 2; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto new file mode 100644 index 00000000000..be39025ec20 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto @@ -0,0 +1,269 @@ +// 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.dataplex.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/dataplex/v1/analyze.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 go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "ContentProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// ContentService manages Notebook and SQL Scripts for Dataplex. +service ContentService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a content. + rpc CreateContent(CreateContentRequest) returns (Content) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + body: "content" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/content" + body: "content" + } + }; + option (google.api.method_signature) = "parent,content"; + } + + // Update a content. Only supports full resource update. + rpc UpdateContent(UpdateContentRequest) returns (Content) { + option (google.api.http) = { + patch: "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}" + body: "content" + additional_bindings { + patch: "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}" + body: "content" + } + }; + option (google.api.method_signature) = "content,update_mask"; + } + + // Delete a content. + rpc DeleteContent(DeleteContentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get a content resource. + rpc GetContent(GetContentRequest) returns (Content) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets the access control policy for a contentitem 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. + // + // Caller must have Google IAM `dataplex.content.getIamPolicy` permission + // on the resource. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy" + additional_bindings { + get: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" + } + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the access control policy on the specified contentitem resource. + // Replaces any existing policy. + // + // Caller must have Google IAM `dataplex.content.setIamPolicy` permission + // on the resource. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy" + body: "*" + } + }; + } + + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of + // permissions is returned (a `NOT_FOUND` error is not returned). + // + // A caller is not required to have Google IAM permission to make this + // request. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions" + body: "*" + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions" + body: "*" + } + }; + } + + // List content. + rpc ListContent(ListContentRequest) returns (ListContentResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/content" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// Create content request. +message CreateContentRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Required. Content resource. + Content content = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update content request. +message UpdateContentRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Content content = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete content request. +message DeleteContentRequest { + // Required. The resource name of the content: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; +} + +// List content request. Returns the BASIC Content view. +message ListContentRequest { + // Required. The resource name of the parent lake: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. Maximum number of content to return. The service may return fewer + // than this value. If unspecified, at most 10 content will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListContent` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListContent` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The following formats are supported: + // + // labels.key1 = "value1" + // labels:key1 + // type = "NOTEBOOK" + // type = "SQL_SCRIPT" + // + // These restrictions can be coinjoined with AND, OR and NOT conjunctions. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List content response. +message ListContentResponse { + // Content under the given parent lake. + repeated Content content = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get content request. +message GetContentRequest { + // Specifies whether the request should return the full or the partial + // representation. + enum ContentView { + // Content view not specified. Defaults to BASIC. + // The API will default to the BASIC view. + CONTENT_VIEW_UNSPECIFIED = 0; + + // Will not return the `data_text` field. + BASIC = 1; + + // Returns the complete proto. + FULL = 2; + } + + // Required. The resource name of the content: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Content" + } + ]; + + // Optional. Specify content view to make a partial request. + ContentView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto new file mode 100644 index 00000000000..7e0b606fdf0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto @@ -0,0 +1,159 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataDiscoveryProto"; +option java_package = "com.google.cloud.dataplex.v1"; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Dataset" + pattern: "projects/{project}/datasets/{dataset}" +}; +option (google.api.resource_definition) = { + type: "bigqueryconnection.googleapis.com/Connection" + pattern: "projects/{project}/locations/{location}/connections/{connection}" +}; + +// Spec for a data discovery scan. +message DataDiscoverySpec { + // Describes BigQuery publishing configurations. + message BigQueryPublishingConfig { + // Determines how discovered tables are published. + enum TableType { + // Table type unspecified. + TABLE_TYPE_UNSPECIFIED = 0; + + // Default. Discovered tables are published as BigQuery external tables + // whose data is accessed using the credentials of the user querying the + // table. + EXTERNAL = 1; + + // Discovered tables are published as BigLake external tables whose data + // is accessed using the credentials of the associated BigQuery + // connection. + BIGLAKE = 2; + } + + // Optional. Determines whether to publish discovered tables as BigLake + // external tables or non-BigLake external tables. + TableType table_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BigQuery connection used to create BigLake tables. + // Must be in the form + // `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + string connection = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigqueryconnection.googleapis.com/Connection" + } + ]; + } + + // Configurations related to Cloud Storage as the data source. + message StorageConfig { + // Describes CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be + // skipped when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter that is used to separate values. The default is + // `,` (comma). + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data types for CSV data. + // If true, all columns are registered as strings. + bool type_inference_disabled = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character used to quote column values. Accepts `"` + // (double quotation mark) or `'` (single quotation mark). If unspecified, + // defaults to `"` (double quotation mark). + string quote = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data types for JSON data. + // If true, all columns are registered as their primitive types + // (strings, number, or boolean). + bool type_inference_disabled = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Defines the data to include during discovery when only a subset + // of the data should be considered. Provide a list of patterns that + // identify the data to include. For Cloud Storage bucket assets, these + // patterns are interpreted as glob patterns used to match object names. For + // BigQuery dataset assets, these patterns are interpreted as patterns to + // match table names. + repeated string include_patterns = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the data to exclude during discovery. Provide a list of + // patterns that identify the data to exclude. For Cloud Storage bucket + // assets, these patterns are interpreted as glob patterns used to match + // object names. For BigQuery dataset assets, these patterns are interpreted + // as patterns to match table names. + repeated string exclude_patterns = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for JSON data. + JsonOptions json_options = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Configuration for metadata publishing. + BigQueryPublishingConfig bigquery_publishing_config = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // The configurations of the data discovery scan resource. + oneof resource_config { + // Cloud Storage related configurations. + StorageConfig storage_config = 100; + } +} + +// The output of a data discovery scan. +message DataDiscoveryResult { + // Describes BigQuery publishing configurations. + message BigQueryPublishing { + // Output only. The BigQuery dataset to publish to. It takes the form + // `projects/{project_id}/datasets/{dataset_id}`. + // If not set, the service creates a default publishing dataset. + string dataset = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Dataset" + } + ]; + } + + // Output only. Configuration for metadata publishing. + BigQueryPublishing bigquery_publishing = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto new file mode 100644 index 00000000000..701a18262a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto @@ -0,0 +1,285 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/dataplex/v1/processing.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataProfileProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataProfileScan related setting. +message DataProfileSpec { + // The configuration of post scan actions of DataProfileScan job. + message PostScanActions { + // The configuration of BigQuery export post scan action. + message BigQueryExport { + // Optional. The BigQuery table to export DataProfileScan results to. + // Format: + // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string results_table = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. If set, results will be exported to the provided BigQuery + // table. + BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specification for fields to include or exclude in data profile scan. + message SelectedFields { + // Optional. Expected input is a list of fully qualified names of fields as + // in the schema. + // + // Only top-level field names for nested fields are supported. + // For instance, if 'x' is of nested field type, listing 'x' is supported + // but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + // 'x'. + repeated string field_names = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The percentage of the records to be selected from the dataset for + // DataScan. + // + // * Value can range between 0.0 and 100.0 with up to 3 significant decimal + // digits. + // * Sampling is not applied if `sampling_percent` is not specified, 0 or + // 100. + float sampling_percent = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter applied to all rows in a single DataScan job. + // The filter needs to be a valid SQL expression for a WHERE clause in + // BigQuery standard SQL syntax. + // Example: col1 >= 0 AND col2 < 10 + string row_filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Actions to take upon job completion.. + PostScanActions post_scan_actions = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fields to include in data profile. + // + // If not specified, all fields at the time of profile scan job execution are + // included, except for ones listed in `exclude_fields`. + SelectedFields include_fields = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fields to exclude from data profile. + // + // If specified, the fields will be excluded from data profile, regardless of + // `include_fields` value. + SelectedFields exclude_fields = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// DataProfileResult defines the output of DataProfileScan. Each field of the +// table will have field type specific profile result. +message DataProfileResult { + // Contains name, type, mode and field type specific profile information. + message Profile { + // A field within a table. + message Field { + // The profile information for each field type. + message ProfileInfo { + // The profile information for a string type field. + message StringFieldInfo { + // Minimum length of non-null values in the scanned data. + int64 min_length = 1; + + // Maximum length of non-null values in the scanned data. + int64 max_length = 2; + + // Average length of non-null values in the scanned data. + double average_length = 3; + } + + // The profile information for an integer type field. + message IntegerFieldInfo { + // Average of non-null values in the scanned data. NaN, if the field + // has a NaN. + double average = 1; + + // Standard deviation of non-null values in the scanned data. NaN, if + // the field has a NaN. + double standard_deviation = 3; + + // Minimum of non-null values in the scanned data. NaN, if the field + // has a NaN. + int64 min = 4; + + // A quartile divides the number of data points into four parts, or + // quarters, of more-or-less equal size. Three main quartiles used + // are: The first quartile (Q1) splits off the lowest 25% of data from + // the highest 75%. It is also known as the lower or 25th empirical + // quartile, as 25% of the data is below this point. The second + // quartile (Q2) is the median of a data set. So, 50% of the data lies + // below this point. The third quartile (Q3) splits off the highest + // 25% of data from the lowest 75%. It is known as the upper or 75th + // empirical quartile, as 75% of the data lies below this point. + // Here, the quartiles is provided as an ordered list of approximate + // quartile values for the scanned data, occurring in order Q1, + // median, Q3. + repeated int64 quartiles = 6; + + // Maximum of non-null values in the scanned data. NaN, if the field + // has a NaN. + int64 max = 5; + } + + // The profile information for a double type field. + message DoubleFieldInfo { + // Average of non-null values in the scanned data. NaN, if the field + // has a NaN. + double average = 1; + + // Standard deviation of non-null values in the scanned data. NaN, if + // the field has a NaN. + double standard_deviation = 3; + + // Minimum of non-null values in the scanned data. NaN, if the field + // has a NaN. + double min = 4; + + // A quartile divides the number of data points into four parts, or + // quarters, of more-or-less equal size. Three main quartiles used + // are: The first quartile (Q1) splits off the lowest 25% of data from + // the highest 75%. It is also known as the lower or 25th empirical + // quartile, as 25% of the data is below this point. The second + // quartile (Q2) is the median of a data set. So, 50% of the data lies + // below this point. The third quartile (Q3) splits off the highest + // 25% of data from the lowest 75%. It is known as the upper or 75th + // empirical quartile, as 75% of the data lies below this point. + // Here, the quartiles is provided as an ordered list of quartile + // values for the scanned data, occurring in order Q1, median, Q3. + repeated double quartiles = 6; + + // Maximum of non-null values in the scanned data. NaN, if the field + // has a NaN. + double max = 5; + } + + // Top N non-null values in the scanned data. + message TopNValue { + // String value of a top N non-null value. + string value = 1; + + // Count of the corresponding value in the scanned data. + int64 count = 2; + + // Ratio of the corresponding value in the field against the total + // number of rows in the scanned data. + double ratio = 3; + } + + // Ratio of rows with null value against total scanned rows. + double null_ratio = 2; + + // Ratio of rows with distinct values against total scanned rows. + // Not available for complex non-groupable field type, including RECORD, + // ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. + double distinct_ratio = 3; + + // The list of top N non-null values, frequency and ratio with which + // they occur in the scanned data. N is 10 or equal to the number of + // distinct values in the field, whichever is smaller. Not available for + // complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, + // and JSON, as well as fields with REPEATABLE mode. + repeated TopNValue top_n_values = 4; + + // Structural and profile information for specific field type. Not + // available, if mode is REPEATABLE. + oneof field_info { + // String type field information. + StringFieldInfo string_profile = 101; + + // Integer type field information. + IntegerFieldInfo integer_profile = 102; + + // Double type field information. + DoubleFieldInfo double_profile = 103; + } + } + + // The name of the field. + string name = 1; + + // The data type retrieved from the schema of the data source. For + // instance, for a BigQuery native table, it is the [BigQuery Table + // Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + // For a Dataplex Entity, it is the [Entity + // Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + string type = 2; + + // The mode of the field. Possible values include: + // + // * REQUIRED, if it is a required field. + // * NULLABLE, if it is an optional field. + // * REPEATED, if it is a repeated field. + string mode = 3; + + // Profile information for the corresponding field. + ProfileInfo profile = 4; + } + + // List of fields with structural and profile information for each field. + repeated Field fields = 2; + } + + // The result of post scan actions of DataProfileScan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Output only. Execution state for the BigQuery exporting. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the BigQuery exporting. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The count of rows scanned. + int64 row_count = 3; + + // The profile information per field. + Profile profile = 4; + + // The data scanned for this result. + ScannedData scanned_data = 5; + + // Output only. The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto new file mode 100644 index 00000000000..aadc9b2747b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto @@ -0,0 +1,488 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/processing.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataQualityProto"; +option java_package = "com.google.cloud.dataplex.v1"; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; + +// DataQualityScan related setting. +message DataQualitySpec { + // The configuration of post scan actions of DataQualityScan. + message PostScanActions { + // The configuration of BigQuery export post scan action. + message BigQueryExport { + // Optional. The BigQuery table to export DataQualityScan results to. + // Format: + // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string results_table = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The individuals or groups who are designated to receive notifications + // upon triggers. + message Recipients { + // Optional. The email recipients who will receive the DataQualityScan + // results report. + repeated string emails = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // This trigger is triggered when the DQ score in the job result is less + // than a specified input score. + message ScoreThresholdTrigger { + // Optional. The score range is in [0,100]. + float score_threshold = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // This trigger is triggered when the scan job itself fails, regardless of + // the result. + message JobFailureTrigger {} + + // This trigger is triggered whenever a scan job run ends, regardless + // of the result. + message JobEndTrigger {} + + // The configuration of notification report post scan action. + message NotificationReport { + // Required. The recipients who will receive the notification report. + Recipients recipients = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, report will be sent when score threshold is met. + ScoreThresholdTrigger score_threshold_trigger = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, report will be sent when a scan job fails. + JobFailureTrigger job_failure_trigger = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, report will be sent when a scan job ends. + JobEndTrigger job_end_trigger = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. If set, results will be exported to the provided BigQuery + // table. + BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, results will be sent to the provided notification + // receipts upon triggers. + NotificationReport notification_report = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The list of rules to evaluate against a data source. At least one + // rule is required. + repeated DataQualityRule rules = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The percentage of the records to be selected from the dataset for + // DataScan. + // + // * Value can range between 0.0 and 100.0 with up to 3 significant decimal + // digits. + // * Sampling is not applied if `sampling_percent` is not specified, 0 or + // 100. + float sampling_percent = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter applied to all rows in a single DataScan job. + // The filter needs to be a valid SQL expression for a WHERE clause in + // BigQuery standard SQL syntax. + // Example: col1 >= 0 AND col2 < 10 + string row_filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Actions to take upon job completion. + PostScanActions post_scan_actions = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The output of a DataQualityScan. +message DataQualityResult { + // The result of post scan actions of DataQualityScan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Output only. Execution state for the BigQuery exporting. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the BigQuery exporting. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Overall data quality result -- `true` if all rules passed. + bool passed = 5; + + // Output only. The overall data quality score. + // + // The score ranges between [0, 100] (up to two decimal points). + optional float score = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A list of results at the dimension level. + // + // A dimension will have a corresponding `DataQualityDimensionResult` if and + // only if there is at least one rule with the 'dimension' field set to it. + repeated DataQualityDimensionResult dimensions = 2; + + // Output only. A list of results at the column level. + // + // A column will have a corresponding `DataQualityColumnResult` if and only if + // there is at least one rule with the 'column' field set to it. + repeated DataQualityColumnResult columns = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A list of all the rules in a job, and their results. + repeated DataQualityRuleResult rules = 3; + + // The count of rows processed. + int64 row_count = 4; + + // The data scanned for this result. + ScannedData scanned_data = 7; + + // Output only. The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DataQualityRuleResult provides a more detailed, per-rule view of the results. +message DataQualityRuleResult { + // The rule specified in the DataQualitySpec, as is. + DataQualityRule rule = 1; + + // Whether the rule passed or failed. + bool passed = 7; + + // The number of rows a rule was evaluated against. + // + // This field is only valid for row-level type rules. + // + // Evaluated count can be configured to either + // + // * include all rows (default) - with `null` rows automatically failing rule + // evaluation, or + // * exclude `null` rows from the `evaluated_count`, by setting + // `ignore_nulls = true`. + int64 evaluated_count = 9; + + // The number of rows which passed a rule evaluation. + // + // This field is only valid for row-level type rules. + int64 passed_count = 8; + + // The number of rows with null values in the specified column. + int64 null_count = 5; + + // The ratio of **passed_count / evaluated_count**. + // + // This field is only valid for row-level type rules. + double pass_ratio = 6; + + // The query to find rows that did not pass this rule. + // + // This field is only valid for row-level type rules. + string failing_rows_query = 10; + + // Output only. The number of rows returned by the SQL statement in a SQL + // assertion rule. + // + // This field is only valid for SQL assertion rules. + int64 assertion_row_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DataQualityDimensionResult provides a more detailed, per-dimension view of +// the results. +message DataQualityDimensionResult { + // Output only. The dimension config specified in the DataQualitySpec, as is. + DataQualityDimension dimension = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the dimension passed or failed. + bool passed = 3; + + // Output only. The dimension-level data quality score for this data scan job + // if and only if the 'dimension' field is set. + // + // The score ranges between [0, 100] (up to two decimal + // points). + optional float score = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A dimension captures data quality intent about a defined subset of the rules +// specified. +message DataQualityDimension { + // The dimension name a rule belongs to. Supported dimensions are + // ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + // "FRESHNESS", "VOLUME"] + string name = 1; +} + +// A rule captures data quality intent about a data source. +message DataQualityRule { + // Evaluates whether each column value lies between a specified range. + message RangeExpectation { + // Optional. The minimum column value allowed for a row to pass this + // validation. At least one of `min_value` and `max_value` need to be + // provided. + string min_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum column value allowed for a row to pass this + // validation. At least one of `min_value` and `max_value` need to be + // provided. + string max_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether each value needs to be strictly greater than ('>') the + // minimum, or if equality is allowed. + // + // Only relevant if a `min_value` has been defined. Default = false. + bool strict_min_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether each value needs to be strictly lesser than ('<') the + // maximum, or if equality is allowed. + // + // Only relevant if a `max_value` has been defined. Default = false. + bool strict_max_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether each column value is null. + message NonNullExpectation {} + + // Evaluates whether each column value is contained by a specified set. + message SetExpectation { + // Optional. Expected values for the column value. + repeated string values = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether each column value matches a specified regex. + message RegexExpectation { + // Optional. A regular expression the column value is expected to match. + string regex = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether the column has duplicates. + message UniquenessExpectation {} + + // Evaluates whether the column aggregate statistic lies between a specified + // range. + message StatisticRangeExpectation { + // The list of aggregate metrics a rule can be evaluated against. + enum ColumnStatistic { + // Unspecified statistic type + STATISTIC_UNDEFINED = 0; + + // Evaluate the column mean + MEAN = 1; + + // Evaluate the column min + MIN = 2; + + // Evaluate the column max + MAX = 3; + } + + // Optional. The aggregate metric to evaluate. + ColumnStatistic statistic = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum column statistic value allowed for a row to pass + // this validation. + // + // At least one of `min_value` and `max_value` need to be provided. + string min_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum column statistic value allowed for a row to pass + // this validation. + // + // At least one of `min_value` and `max_value` need to be provided. + string max_value = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether column statistic needs to be strictly greater than + // ('>') the minimum, or if equality is allowed. + // + // Only relevant if a `min_value` has been defined. Default = false. + bool strict_min_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether column statistic needs to be strictly lesser than ('<') + // the maximum, or if equality is allowed. + // + // Only relevant if a `max_value` has been defined. Default = false. + bool strict_max_enabled = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether each row passes the specified condition. + // + // The SQL expression needs to use BigQuery standard SQL syntax and should + // produce a boolean value per row as the result. + // + // Example: col1 >= 0 AND col2 < 10 + message RowConditionExpectation { + // Optional. The SQL expression. + string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether the provided expression is true. + // + // The SQL expression needs to use BigQuery standard SQL syntax and should + // produce a scalar boolean result. + // + // Example: MIN(col1) >= 0 + message TableConditionExpectation { + // Optional. The SQL expression. + string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // A SQL statement that is evaluated to return rows that match an invalid + // state. If any rows are are returned, this rule fails. + // + // The SQL statement must use BigQuery standard SQL syntax, and must not + // contain any semicolons. + // + // You can use the data reference parameter `${data()}` to reference the + // source table with all of its precondition filters applied. Examples of + // precondition filters include row filters, incremental data filters, and + // sampling. For more information, see [Data reference + // parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter). + // + // Example: `SELECT * FROM ${data()} WHERE price < 0` + message SqlAssertion { + // Optional. The SQL statement. + string sql_statement = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The rule-specific configuration. + oneof rule_type { + // Row-level rule which evaluates whether each column value lies between a + // specified range. + RangeExpectation range_expectation = 1; + + // Row-level rule which evaluates whether each column value is null. + NonNullExpectation non_null_expectation = 2; + + // Row-level rule which evaluates whether each column value is contained by + // a specified set. + SetExpectation set_expectation = 3; + + // Row-level rule which evaluates whether each column value matches a + // specified regex. + RegexExpectation regex_expectation = 4; + + // Row-level rule which evaluates whether each column value is unique. + UniquenessExpectation uniqueness_expectation = 100; + + // Aggregate rule which evaluates whether the column aggregate + // statistic lies between a specified range. + StatisticRangeExpectation statistic_range_expectation = 101; + + // Row-level rule which evaluates whether each row in a table passes the + // specified condition. + RowConditionExpectation row_condition_expectation = 200; + + // Aggregate rule which evaluates whether the provided expression is true + // for a table. + TableConditionExpectation table_condition_expectation = 201; + + // Aggregate rule which evaluates the number of rows returned for the + // provided statement. If any rows are returned, this rule fails. + SqlAssertion sql_assertion = 202; + } + + // Optional. The unnested column which this rule is evaluated against. + string column = 500 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rows with `null` values will automatically fail a rule, unless + // `ignore_null` is `true`. In that case, such `null` rows are trivially + // considered passing. + // + // This field is only valid for the following type of rules: + // + // * RangeExpectation + // * RegexExpectation + // * SetExpectation + // * UniquenessExpectation + bool ignore_null = 501 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The dimension a rule belongs to. Results are also aggregated at + // the dimension level. Supported dimensions are **["COMPLETENESS", + // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", + // "VOLUME"]** + string dimension = 502 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The minimum ratio of **passing_rows / total_rows** required to + // pass this rule, with a range of [0.0, 1.0]. + // + // 0 indicates default value (i.e. 1.0). + // + // This field is only valid for row-level type rules. + double threshold = 503 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mutable name for the rule. + // + // * The name must contain only letters (a-z, A-Z), numbers (0-9), or + // hyphens (-). + // * The maximum length is 63 characters. + // * Must start with a letter. + // * Must end with a number or a letter. + string name = 504 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the rule. + // + // * The maximum length is 1,024 characters. + string description = 505 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the Rule is active or suspended. + // Default is false. + bool suspended = 506 [(google.api.field_behavior) = OPTIONAL]; +} + +// DataQualityColumnResult provides a more detailed, per-column view of +// the results. +message DataQualityColumnResult { + // Output only. The column specified in the DataQualityRule. + string column = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The column-level data quality score for this data scan job if + // and only if the 'column' field is set. + // + // The score ranges between between [0, 100] (up to two decimal + // points). + optional float score = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto new file mode 100644 index 00000000000..fdd21e8d32c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto @@ -0,0 +1,793 @@ +// 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.dataplex.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/dataplex/v1/security.proto"; +import "google/cloud/dataplex/v1/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataTaxonomyProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataTaxonomyService enables attribute-based governance. The resources +// currently offered include DataTaxonomy and DataAttribute. +service DataTaxonomyService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a DataTaxonomy resource. + rpc CreateDataTaxonomy(CreateDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" + body: "data_taxonomy" + }; + option (google.api.method_signature) = + "parent,data_taxonomy,data_taxonomy_id"; + option (google.longrunning.operation_info) = { + response_type: "DataTaxonomy" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataTaxonomy resource. + rpc UpdateDataTaxonomy(UpdateDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}" + body: "data_taxonomy" + }; + option (google.api.method_signature) = "data_taxonomy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataTaxonomy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + // must be deleted before the DataTaxonomy can be deleted. + rpc DeleteDataTaxonomy(DeleteDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataTaxonomy resources in a project and location. + rpc ListDataTaxonomies(ListDataTaxonomiesRequest) + returns (ListDataTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a DataTaxonomy resource. + rpc GetDataTaxonomy(GetDataTaxonomyRequest) returns (DataTaxonomy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a DataAttributeBinding resource. + rpc CreateDataAttributeBinding(CreateDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" + body: "data_attribute_binding" + }; + option (google.api.method_signature) = + "parent,data_attribute_binding,data_attribute_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAttributeBinding" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataAttributeBinding resource. + rpc UpdateDataAttributeBinding(UpdateDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}" + body: "data_attribute_binding" + }; + option (google.api.method_signature) = "data_attribute_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAttributeBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataAttributeBinding resource. All attributes within the + // DataAttributeBinding must be deleted before the DataAttributeBinding can be + // deleted. + rpc DeleteDataAttributeBinding(DeleteDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataAttributeBinding resources in a project and location. + rpc ListDataAttributeBindings(ListDataAttributeBindingsRequest) + returns (ListDataAttributeBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a DataAttributeBinding resource. + rpc GetDataAttributeBinding(GetDataAttributeBindingRequest) + returns (DataAttributeBinding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a DataAttribute resource. + rpc CreateDataAttribute(CreateDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" + body: "data_attribute" + }; + option (google.api.method_signature) = + "parent,data_attribute,data_attribute_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAttribute" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataAttribute resource. + rpc UpdateDataAttribute(UpdateDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + body: "data_attribute" + }; + option (google.api.method_signature) = "data_attribute,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAttribute" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Data Attribute resource. + rpc DeleteDataAttribute(DeleteDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Data Attribute resources in a DataTaxonomy. + rpc ListDataAttributes(ListDataAttributesRequest) + returns (ListDataAttributesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a Data Attribute resource. + rpc GetDataAttribute(GetDataAttributeRequest) returns (DataAttribute) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// DataTaxonomy represents a set of hierarchical DataAttributes resources, +// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes +// to manage PII data. It is defined at project level. +message DataTaxonomy { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataTaxonomy" + pattern: "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}" + }; + + // Output only. The relative resource name of the DataTaxonomy, of the form: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Output only. System generated globally unique ID for the dataTaxonomy. This + // ID will be different if the DataTaxonomy is deleted and re-created with the + // same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataTaxonomy was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataTaxonomy was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataTaxonomy. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataTaxonomy. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of attributes in the DataTaxonomy. + int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; + + // Output only. The number of classes in the DataTaxonomy. + int32 class_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Denotes one dataAttribute in a dataTaxonomy, for example, PII. +// DataAttribute resources can be defined in a hierarchy. +// A single dataAttribute resource can contain specs of multiple types +// +// ``` +// PII +// - ResourceAccessSpec : +// - readers :foo@bar.com +// - DataAccessSpec : +// - readers :bar@foo.com +// ``` +message DataAttribute { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataAttribute" + pattern: "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}" + }; + + // Output only. The relative resource name of the dataAttribute, of the form: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Output only. System generated globally unique ID for the DataAttribute. + // This ID will be different if the DataAttribute is deleted and re-created + // with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttribute was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttribute was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataAttribute. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataAttribute. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the parent DataAttribute resource, should belong to the + // same data taxonomy. Circular dependency in parent chain is not valid. + // Maximum depth of the hierarchy allowed is 4. + // [a -> b -> c -> d -> e, depth = 4] + string parent_id = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Output only. The number of child attributes present for this attribute. + int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; + + // Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + // BigQuery dataset, BigQuery table). + ResourceAccessSpec resource_access_spec = 100 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specified when applied to data stored on the resource (eg: rows, + // columns in BigQuery Tables). + DataAccessSpec data_access_spec = 101 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DataAttributeBinding represents binding of attributes to resources. Eg: Bind +// 'CustomerInfo' entity with 'PII' attribute. +message DataAttributeBinding { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + pattern: "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}" + }; + + // Represents a subresource of the given resource, and associated bindings + // with it. Currently supported subresources are column and partition schema + // fields within a table. + message Path { + // Required. The name identifier of the path. + // Nested columns should be of the form: 'address.city'. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of attributes to be associated with the path of the + // resource, provided in the form: + // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + repeated string attributes = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + } + + // Output only. The relative resource name of the Data Attribute Binding, of + // the form: + // projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; + + // Output only. System generated globally unique ID for the + // DataAttributeBinding. This ID will be different if the DataAttributeBinding + // is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttributeBinding was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttributeBinding was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataAttributeBinding. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataAttributeBinding. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + // Etags must be used when calling the DeleteDataAttributeBinding and the + // UpdateDataAttributeBinding method. + string etag = 8; + + // The reference to the resource that is associated to attributes, or + // the query to match resources and associate attributes. + oneof resource_reference { + // Optional. Immutable. The resource name of the resource that is associated + // to attributes. Presently, only entity resource is supported in the form: + // projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} + // Must belong in the same project and region as the attribute binding, and + // there can only exist one active binding for a resource. + string resource = 100 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Optional. List of attributes to be associated with the resource, provided + // in the form: + // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + repeated string attributes = 110 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Optional. The list of paths for items within the associated resource (eg. + // columns and partitions within a table) along with attribute bindings. + repeated Path paths = 120 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataTaxonomy request. +message CreateDataTaxonomyRequest { + // Required. The resource name of the data taxonomy location, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataTaxonomy identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the Project. + string data_taxonomy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataTaxonomy resource. + DataTaxonomy data_taxonomy = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataTaxonomy request. +message UpdateDataTaxonomyRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataTaxonomy data_taxonomy = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataTaxonomy request. +message GetDataTaxonomyRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; +} + +// List DataTaxonomies request. +message ListDataTaxonomiesRequest { + // Required. The resource name of the DataTaxonomy location, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of DataTaxonomies to return. The service may + // return fewer than this value. If unspecified, at most 10 DataTaxonomies + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous ` ListDataTaxonomies` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to ` ListDataTaxonomies` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataTaxonomies response. +message ListDataTaxonomiesResponse { + // DataTaxonomies under the given parent location. + repeated DataTaxonomy data_taxonomies = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataTaxonomy request. +message DeleteDataTaxonomyRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value,the DeleteDataTaxonomy method returns an ABORTED error. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataAttribute request. +message CreateDataAttributeRequest { + // Required. The resource name of the parent data taxonomy + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Required. DataAttribute identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the DataTaxonomy. + string data_attribute_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataAttribute resource. + DataAttribute data_attribute = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataAttribute request. +message UpdateDataAttributeRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataAttribute data_attribute = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataAttribute request. +message GetDataAttributeRequest { + // Required. The resource name of the dataAttribute: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; +} + +// List DataAttributes request. +message ListDataAttributesRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Optional. Maximum number of DataAttributes to return. The service may + // return fewer than this value. If unspecified, at most 10 dataAttributes + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataAttributes` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListDataAttributes` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataAttributes response. +message ListDataAttributesResponse { + // DataAttributes under the given parent DataTaxonomy. + repeated DataAttribute data_attributes = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataAttribute request. +message DeleteDataAttributeRequest { + // Required. The resource name of the DataAttribute: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value, the DeleteDataAttribute method returns an ABORTED error response. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataAttributeBinding request. +message CreateDataAttributeBindingRequest { + // Required. The resource name of the parent data taxonomy + // projects/{project_number}/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataAttributeBinding identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the Location. + string data_attribute_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataAttributeBinding resource. + DataAttributeBinding data_attribute_binding = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataAttributeBinding request. +message UpdateDataAttributeBindingRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataAttributeBinding data_attribute_binding = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataAttributeBinding request. +message GetDataAttributeBindingRequest { + // Required. The resource name of the DataAttributeBinding: + // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; +} + +// List DataAttributeBindings request. +message ListDataAttributeBindingsRequest { + // Required. The resource name of the Location: + // projects/{project_number}/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of DataAttributeBindings to return. The service + // may return fewer than this value. If unspecified, at most 10 + // DataAttributeBindings will be returned. The maximum value is 1000; values + // above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataAttributeBindings` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListDataAttributeBindings` must match the + // call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + // Filter using resource: filter=resource:"resource-name" + // Filter using attribute: filter=attributes:"attribute-name" + // Filter using attribute in paths list: + // filter=paths.attributes:"attribute-name" + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataAttributeBindings response. +message ListDataAttributeBindingsResponse { + // DataAttributeBindings under the given parent Location. + repeated DataAttributeBinding data_attribute_bindings = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataAttributeBinding request. +message DeleteDataAttributeBindingRequest { + // Required. The resource name of the DataAttributeBinding: + // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; + + // Required. If the client provided etag value does not match the current etag + // value, the DeleteDataAttributeBindingRequest method returns an ABORTED + // error response. Etags must be used when calling the + // DeleteDataAttributeBinding. + string etag = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto new file mode 100644 index 00000000000..54a6aca13bc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto @@ -0,0 +1,642 @@ +// 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.dataplex.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/dataplex/v1/data_discovery.proto"; +import "google/cloud/dataplex/v1/data_profile.proto"; +import "google/cloud/dataplex/v1/data_quality.proto"; +import "google/cloud/dataplex/v1/processing.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/cloud/dataplex/v1/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataScansProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataScanService manages DataScan resources which can be configured to run +// various types of data scanning workload and generate enriched metadata (e.g. +// Data Profile, Data Quality) for the data source. +service DataScanService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a DataScan resource. + rpc CreateDataScan(CreateDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataScans" + body: "data_scan" + }; + option (google.api.method_signature) = "parent,data_scan,data_scan_id"; + option (google.longrunning.operation_info) = { + response_type: "DataScan" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataScan resource. + rpc UpdateDataScan(UpdateDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}" + body: "data_scan" + }; + option (google.api.method_signature) = "data_scan,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataScan" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataScan resource. + rpc DeleteDataScan(DeleteDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataScans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets a DataScan resource. + rpc GetDataScan(GetDataScanRequest) returns (DataScan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataScans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataScans. + rpc ListDataScans(ListDataScansRequest) returns (ListDataScansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataScans" + }; + option (google.api.method_signature) = "parent"; + } + + // Runs an on-demand execution of a DataScan + rpc RunDataScan(RunDataScanRequest) returns (RunDataScanResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/dataScans/*}:run" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a DataScanJob resource. + rpc GetDataScanJob(GetDataScanJobRequest) returns (DataScanJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataScanJobs under the given DataScan. + rpc ListDataScanJobs(ListDataScanJobsRequest) + returns (ListDataScanJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Generates recommended data quality rules based on the results of a data + // profiling scan. + // + // Use the recommendations to build rules for a data quality scan. + rpc GenerateDataQualityRules(GenerateDataQualityRulesRequest) + returns (GenerateDataQualityRulesResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules" + body: "*" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Create dataScan request. +message CreateDataScanRequest { + // Required. The resource name of the parent location: + // `projects/{project}/locations/{location_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataScan resource. + DataScan data_scan = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataScan identifier. + // + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the customer project / location. + string data_scan_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is `false`. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update dataScan request. +message UpdateDataScanRequest { + // Required. DataScan resource to be updated. + // + // Only fields specified in `update_mask` are updated. + DataScan data_scan = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete dataScan request. +message DeleteDataScanRequest { + // Required. The resource name of the dataScan: + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; +} + +// Get dataScan request. +message GetDataScanRequest { + // DataScan view options. + enum DataScanView { + // The API will default to the `BASIC` view. + DATA_SCAN_VIEW_UNSPECIFIED = 0; + + // Basic view that does not include *spec* and *result*. + BASIC = 1; + + // Include everything. + FULL = 10; + } + + // Required. The resource name of the dataScan: + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; + + // Optional. Select the DataScan view to return. Defaults to `BASIC`. + DataScanView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List dataScans request. +message ListDataScansRequest { + // Required. The resource name of the parent location: + // `projects/{project}/locations/{location_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of dataScans to return. The service may return + // fewer than this value. If unspecified, at most 500 scans will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataScans` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListDataScans` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields (`name` or `create_time`) for the result. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List dataScans response. +message ListDataScansResponse { + // DataScans (`BASIC` view only) under the given parent location. + repeated DataScan data_scans = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Run DataScan Request +message RunDataScanRequest { + // Required. The resource name of the DataScan: + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + // + // Only **OnDemand** data scans are allowed. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; +} + +// Run DataScan Response. +message RunDataScanResponse { + // DataScanJob created by RunDataScan request. + DataScanJob job = 1; +} + +// Get DataScanJob request. +message GetDataScanJobRequest { + // DataScanJob view options. + enum DataScanJobView { + // The API will default to the `BASIC` view. + DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; + + // Basic view that does not include *spec* and *result*. + BASIC = 1; + + // Include everything. + FULL = 10; + } + + // Required. The resource name of the DataScanJob: + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScanJob" + } + ]; + + // Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + DataScanJobView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataScanJobs request. +message ListDataScanJobsRequest { + // Required. The resource name of the parent environment: + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; + + // Optional. Maximum number of DataScanJobs to return. The service may return + // fewer than this value. If unspecified, at most 10 DataScanJobs will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataScanJobs` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListDataScanJobs` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the ListDataScanJobs + // request. + // + // If unspecified, all datascan jobs will be returned. Multiple filters can be + // applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + // + // Allowed fields are: + // + // - `start_time` + // - `end_time` + // + // `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + // 2018-10-08T18:30:00-07:00). + // + // For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + // 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + // specified start and end times. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataScanJobs response. +message ListDataScanJobsResponse { + // DataScanJobs (`BASIC` view only) under a given dataScan. + repeated DataScanJob data_scan_jobs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request details for generating data quality rule recommendations. +message GenerateDataQualityRulesRequest { + // Required. The name must be one of the following: + // + // * The name of a data scan with at least one successful, completed data + // profiling job + // * The name of a successful, completed data profiling job (a data scan job + // where the job type is data profiling) + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response details for data quality rule recommendations. +message GenerateDataQualityRulesResponse { + // The data quality rules that Dataplex generates based on the results + // of a data profiling scan. + repeated DataQualityRule rule = 1; +} + +// Represents a user-visible job which provides the insights for the related +// data source. +// +// For example: +// +// * Data Quality: generates queries based on the rules and runs against the +// data to get data quality check results. +// * Data Profile: analyzes the data in table(s) and generates insights about +// the structure, content and relationships (such as null percent, +// cardinality, min/max/mean, etc). +message DataScan { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataScan" + pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}" + }; + + // DataScan execution settings. + message ExecutionSpec { + // Optional. Spec related to how often and when a scan should be triggered. + // + // If not specified, the default is `OnDemand`, which means the scan will + // not run until the user calls `RunDataScan` API. + Trigger trigger = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Spec related to incremental scan of the data + // + // When an option is selected for incremental scan, it cannot be unset or + // changed. If not specified, a data scan will run for all data in the + // table. + oneof incremental { + // Immutable. The unnested field (of type *Date* or *Timestamp*) that + // contains values which monotonically increase over time. + // + // If not specified, a data scan will run for all data in the table. + string field = 100 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Status of the data scan execution. + message ExecutionStatus { + // The time when the latest DataScanJob started. + google.protobuf.Timestamp latest_job_start_time = 4; + + // The time when the latest DataScanJob ended. + google.protobuf.Timestamp latest_job_end_time = 5; + + // Optional. The time when the DataScanJob execution was created. + google.protobuf.Timestamp latest_job_create_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. The relative resource name of the scan, of the form: + // `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated globally unique ID for the scan. This ID will + // be different if the scan is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the scan. + // + // * Must be between 1-1024 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + // + // * Must be between 1-256 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the scan. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the DataScan. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the scan was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the scan was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The data source for DataScan. + DataSource data = 9 [(google.api.field_behavior) = REQUIRED]; + + // Optional. DataScan execution settings. + // + // If not specified, the fields in it will use their default values. + ExecutionSpec execution_spec = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the data scan execution. + ExecutionStatus execution_status = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of DataScan. + DataScanType type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Data scan related setting. + // The settings are required and immutable. After you configure the settings + // for one type of data scan, you can't change the data scan to a different + // type of data scan. + oneof spec { + // Settings for a data quality scan. + DataQualitySpec data_quality_spec = 100; + + // Settings for a data profile scan. + DataProfileSpec data_profile_spec = 101; + + // Settings for a data discovery scan. + DataDiscoverySpec data_discovery_spec = 102; + } + + // The result of the data scan. + oneof result { + // Output only. The result of a data quality scan. + DataQualityResult data_quality_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data profile scan. + DataProfileResult data_profile_result = 201 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data discovery scan. + DataDiscoveryResult data_discovery_result = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A DataScanJob represents an instance of DataScan execution. +message DataScanJob { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataScanJob" + pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" + }; + + // Execution state for the DataScanJob. + enum State { + // The DataScanJob state is unspecified. + STATE_UNSPECIFIED = 0; + + // The DataScanJob is running. + RUNNING = 1; + + // The DataScanJob is canceling. + CANCELING = 2; + + // The DataScanJob cancellation was successful. + CANCELLED = 3; + + // The DataScanJob completed successfully. + SUCCEEDED = 4; + + // The DataScanJob is no longer running due to an error. + FAILED = 5; + + // The DataScanJob has been created but not started to run yet. + PENDING = 7; + } + + // Output only. The relative resource name of the DataScanJob, of the form: + // `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + // where `project` refers to a *project_id* or *project_number* and + // `location_id` refers to a GCP region. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated globally unique ID for the DataScanJob. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataScanJob was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataScanJob was started. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataScanJob ended. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Execution state for the DataScanJob. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state. + string message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the parent DataScan. + DataScanType type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Data scan related setting. + oneof spec { + // Output only. Settings for a data quality scan. + DataQualitySpec data_quality_spec = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Settings for a data profile scan. + DataProfileSpec data_profile_spec = 101 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Settings for a data discovery scan. + DataDiscoverySpec data_discovery_spec = 102 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The result of the data scan. + oneof result { + // Output only. The result of a data quality scan. + DataQualityResult data_quality_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data profile scan. + DataProfileResult data_profile_result = 201 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data discovery scan. + DataDiscoveryResult data_discovery_result = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// The type of data scan. +enum DataScanType { + // The data scan type is unspecified. + DATA_SCAN_TYPE_UNSPECIFIED = 0; + + // Data quality scan. + DATA_QUALITY = 1; + + // Data profile scan. + DATA_PROFILE = 2; + + // Data discovery scan. + DATA_DISCOVERY = 3; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto new file mode 100644 index 00000000000..c6e0f37b00b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto @@ -0,0 +1,786 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "LogsProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// The payload associated with Discovery data processing. +message DiscoveryEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // An event representing discovery configuration in effect. + CONFIG = 1; + + // An event representing a metadata entity being created. + ENTITY_CREATED = 2; + + // An event representing a metadata entity being updated. + ENTITY_UPDATED = 3; + + // An event representing a metadata entity being deleted. + ENTITY_DELETED = 4; + + // An event representing a partition being created. + PARTITION_CREATED = 5; + + // An event representing a partition being updated. + PARTITION_UPDATED = 6; + + // An event representing a partition being deleted. + PARTITION_DELETED = 7; + + // An event representing a table being published. + TABLE_PUBLISHED = 10; + + // An event representing a table being updated. + TABLE_UPDATED = 11; + + // An event representing a table being skipped in publishing. + TABLE_IGNORED = 12; + + // An event representing a table being deleted. + TABLE_DELETED = 13; + } + + // The type of the entity. + enum EntityType { + // An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0; + + // Entities representing structured data. + TABLE = 1; + + // Entities representing unstructured data. + FILESET = 2; + } + + // The type of the published table. + enum TableType { + // An unspecified table type. + TABLE_TYPE_UNSPECIFIED = 0; + + // External table type. + EXTERNAL_TABLE = 1; + + // BigLake table type. + BIGLAKE_TABLE = 2; + + // Object table type for unstructured data. + OBJECT_TABLE = 3; + } + + // Details about configuration events. + message ConfigDetails { + // A list of discovery configuration parameters in effect. + // The keys are the field paths within DiscoverySpec. + // Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + // etc. + map parameters = 1; + } + + // Details about the entity. + message EntityDetails { + // The name of the entity resource. + // The name is the fully-qualified resource name. + string entity = 1; + + // The type of the entity resource. + EntityType type = 2; + } + + // Details about the published table. + message TableDetails { + // The fully-qualified resource name of the table resource. + string table = 1; + + // The type of the table resource. + TableType type = 2; + } + + // Details about the partition. + message PartitionDetails { + // The name to the partition resource. + // The name is the fully-qualified resource name. + string partition = 1; + + // The name to the containing entity resource. + // The name is the fully-qualified resource name. + string entity = 2; + + // The type of the containing entity resource. + EntityType type = 3; + + // The locations of the data items (e.g., a Cloud Storage objects) sampled + // for metadata inference. + repeated string sampled_data_locations = 4; + } + + // Details about the action. + message ActionDetails { + // The type of action. + // Eg. IncompatibleDataSchema, InvalidDataFormat + string type = 1; + + // The human readable issue associated with the action. + string issue = 2; + } + + // The log message. + string message = 1; + + // The id of the associated lake. + string lake_id = 2; + + // The id of the associated zone. + string zone_id = 3; + + // The id of the associated asset. + string asset_id = 4; + + // The data location associated with the event. + string data_location = 5; + + // The id of the associated datascan for standalone discovery. + string datascan_id = 6; + + // The type of the event being logged. + EventType type = 10; + + // Additional details about the event. + oneof details { + // Details about discovery configuration in effect. + ConfigDetails config = 20; + + // Details about the entity associated with the event. + EntityDetails entity = 21; + + // Details about the partition associated with the event. + PartitionDetails partition = 22; + + // Details about the action associated with the event. + ActionDetails action = 23; + + // Details about the BigQuery table publishing associated with the event. + TableDetails table = 24; + } +} + +// The payload associated with Job logs that contains events describing jobs +// that have run within a Lake. +message JobEvent { + // The type of the job. + enum Type { + // Unspecified job type. + TYPE_UNSPECIFIED = 0; + + // Spark jobs. + SPARK = 1; + + // Notebook jobs. + NOTEBOOK = 2; + } + + // The completion status of the job. + enum State { + // Unspecified job state. + STATE_UNSPECIFIED = 0; + + // Job successfully completed. + SUCCEEDED = 1; + + // Job was unsuccessful. + FAILED = 2; + + // Job was cancelled by the user. + CANCELLED = 3; + + // Job was cancelled or aborted via the service executing the job. + ABORTED = 4; + } + + // The service used to execute the job. + enum Service { + // Unspecified service. + SERVICE_UNSPECIFIED = 0; + + // Cloud Dataproc. + DATAPROC = 1; + } + + // Job Execution trigger. + enum ExecutionTrigger { + // The job execution trigger is unspecified. + EXECUTION_TRIGGER_UNSPECIFIED = 0; + + // The job was triggered by Dataplex based on trigger spec from task + // definition. + TASK_CONFIG = 1; + + // The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2; + } + + // The log message. + string message = 1; + + // The unique id identifying the job. + string job_id = 2; + + // The time when the job started running. + google.protobuf.Timestamp start_time = 3; + + // The time when the job ended running. + google.protobuf.Timestamp end_time = 4; + + // The job state on completion. + State state = 5; + + // The number of retries. + int32 retries = 6; + + // The type of the job. + Type type = 7; + + // The service used to execute the job. + Service service = 8; + + // The reference to the job within the service. + string service_job = 9; + + // Job execution trigger. + ExecutionTrigger execution_trigger = 11; +} + +// These messages contain information about sessions within an environment. +// The monitored resource is 'Environment'. +message SessionEvent { + // The type of the event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // Event when the session is assigned to a user. + START = 1; + + // Event for stop of a session. + STOP = 2; + + // Query events in the session. + QUERY = 3; + + // Event for creation of a cluster. It is not yet assigned to a user. + // This comes before START in the sequence + CREATE = 4; + } + + // Execution details of the query. + message QueryDetail { + // Query Execution engine. + enum Engine { + // An unspecified Engine type. + ENGINE_UNSPECIFIED = 0; + + // Spark-sql engine is specified in Query. + SPARK_SQL = 1; + + // BigQuery engine is specified in Query. + BIGQUERY = 2; + } + + // The unique Query id identifying the query. + string query_id = 1; + + // The query text executed. + string query_text = 2; + + // Query Execution engine. + Engine engine = 3; + + // Time taken for execution of the query. + google.protobuf.Duration duration = 4; + + // The size of results the query produced. + int64 result_size_bytes = 5; + + // The data processed by the query. + int64 data_processed_bytes = 6; + } + + // The log message. + string message = 1; + + // The information about the user that created the session. It will be the + // email address of the user. + string user_id = 2; + + // Unique identifier for the session. + string session_id = 3; + + // The type of the event. + EventType type = 4; + + // Additional information about the Query metadata. + oneof detail { + // The execution details of the query. + QueryDetail query = 5; + } + + // The status of the event. + bool event_succeeded = 6; + + // If the session is associated with an environment with fast startup enabled, + // and was created before being assigned to a user. + bool fast_startup_enabled = 7; + + // The idle duration of a warm pooled session before it is assigned to user. + google.protobuf.Duration unassigned_duration = 8; +} + +// Payload associated with Governance related log events. +message GovernanceEvent { + // Information about Entity resource that the log event is associated with. + message Entity { + // Type of entity. + enum EntityType { + // An unspecified Entity type. + ENTITY_TYPE_UNSPECIFIED = 0; + + // Table entity type. + TABLE = 1; + + // Fileset entity type. + FILESET = 2; + } + + // The Entity resource the log event is associated with. + // Format: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + string entity = 1 [(google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + }]; + + // Type of entity. + EntityType entity_type = 2; + } + + // Type of governance log event. + enum EventType { + // An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // Resource IAM policy update event. + RESOURCE_IAM_POLICY_UPDATE = 1; + + // BigQuery table create event. + BIGQUERY_TABLE_CREATE = 2; + + // BigQuery table update event. + BIGQUERY_TABLE_UPDATE = 3; + + // BigQuery table delete event. + BIGQUERY_TABLE_DELETE = 4; + + // BigQuery connection create event. + BIGQUERY_CONNECTION_CREATE = 5; + + // BigQuery connection update event. + BIGQUERY_CONNECTION_UPDATE = 6; + + // BigQuery connection delete event. + BIGQUERY_CONNECTION_DELETE = 7; + + // BigQuery taxonomy created. + BIGQUERY_TAXONOMY_CREATE = 10; + + // BigQuery policy tag created. + BIGQUERY_POLICY_TAG_CREATE = 11; + + // BigQuery policy tag deleted. + BIGQUERY_POLICY_TAG_DELETE = 12; + + // BigQuery set iam policy for policy tag. + BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; + + // Access policy update event. + ACCESS_POLICY_UPDATE = 14; + + // Number of resources matched with particular Query. + GOVERNANCE_RULE_MATCHED_RESOURCES = 15; + + // Rule processing exceeds the allowed limit. + GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; + + // Rule processing errors. + GOVERNANCE_RULE_ERRORS = 17; + + // Governance rule processing Event. + GOVERNANCE_RULE_PROCESSING = 18; + } + + // The log message. + string message = 1; + + // The type of the event. + EventType event_type = 2; + + // Entity resource information if the log event is associated with a + // specific entity. + optional Entity entity = 3; +} + +// These messages contain information about the execution of a datascan. +// The monitored resource is 'DataScan' +message DataScanEvent { + // The type of the data scan. + enum ScanType { + // An unspecified data scan type. + SCAN_TYPE_UNSPECIFIED = 0; + + // Data scan for data profile. + DATA_PROFILE = 1; + + // Data scan for data quality. + DATA_QUALITY = 2; + + // Data scan for data discovery. + DATA_DISCOVERY = 4; + } + + // The job state of the data scan. + enum State { + // Unspecified job state. + STATE_UNSPECIFIED = 0; + + // Data scan job started. + STARTED = 1; + + // Data scan job successfully completed. + SUCCEEDED = 2; + + // Data scan job was unsuccessful. + FAILED = 3; + + // Data scan job was cancelled. + CANCELLED = 4; + + // Data scan job was createed. + CREATED = 5; + } + + // The trigger type for the data scan. + enum Trigger { + // An unspecified trigger type. + TRIGGER_UNSPECIFIED = 0; + + // Data scan triggers on demand. + ON_DEMAND = 1; + + // Data scan triggers as per schedule. + SCHEDULE = 2; + } + + // The scope of job for the data scan. + enum Scope { + // An unspecified scope type. + SCOPE_UNSPECIFIED = 0; + + // Data scan runs on all of the data. + FULL = 1; + + // Data scan runs on incremental data. + INCREMENTAL = 2; + } + + // Data profile result for data scan job. + message DataProfileResult { + // The count of rows processed in the data scan job. + int64 row_count = 1; + } + + // Data quality result for data scan job. + message DataQualityResult { + // The count of rows processed in the data scan job. + int64 row_count = 1; + + // Whether the data quality result was `pass` or not. + bool passed = 2; + + // The result of each dimension for data quality result. + // The key of the map is the name of the dimension. + // The value is the bool value depicting whether the dimension result was + // `pass` or not. + map dimension_passed = 3; + + // The table-level data quality score for the data scan job. + // + // The data quality score ranges between [0, 100] (up to two decimal + // points). + float score = 4; + + // The score of each dimension for data quality result. + // The key of the map is the name of the dimension. + // The value is the data quality score for the dimension. + // + // The score ranges between [0, 100] (up to two decimal + // points). + map dimension_score = 5; + + // The score of each column scanned in the data scan job. + // The key of the map is the name of the column. + // The value is the data quality score for the column. + // + // The score ranges between [0, 100] (up to two decimal + // points). + map column_score = 6; + } + + // Applied configs for data profile type data scan job. + message DataProfileAppliedConfigs { + // The percentage of the records selected from the dataset for DataScan. + // + // * Value ranges between 0.0 and 100.0. + // * Value 0.0 or 100.0 imply that sampling was not applied. + float sampling_percent = 1; + + // Boolean indicating whether a row filter was applied in the DataScan job. + bool row_filter_applied = 2; + + // Boolean indicating whether a column filter was applied in the DataScan + // job. + bool column_filter_applied = 3; + } + + // Applied configs for data quality type data scan job. + message DataQualityAppliedConfigs { + // The percentage of the records selected from the dataset for DataScan. + // + // * Value ranges between 0.0 and 100.0. + // * Value 0.0 or 100.0 imply that sampling was not applied. + float sampling_percent = 1; + + // Boolean indicating whether a row filter was applied in the DataScan job. + bool row_filter_applied = 2; + } + + // Post scan actions result for data scan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Execution state for the BigQuery exporting. + State state = 1; + + // Additional information about the BigQuery exporting. + string message = 2; + } + + // The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1; + } + + // The data source of the data scan + string data_source = 1; + + // The identifier of the specific data scan job this log entry is for. + string job_id = 2; + + // The time when the data scan job was created. + google.protobuf.Timestamp create_time = 12; + + // The time when the data scan job started to run. + google.protobuf.Timestamp start_time = 3; + + // The time when the data scan job finished. + google.protobuf.Timestamp end_time = 4; + + // The type of the data scan. + ScanType type = 5; + + // The status of the data scan job. + State state = 6; + + // The message describing the data scan job event. + string message = 7; + + // A version identifier of the spec which was used to execute this job. + string spec_version = 8; + + // The trigger type of the data scan job. + Trigger trigger = 9; + + // The scope of the data scan (e.g. full, incremental). + Scope scope = 10; + + // The result of the data scan job. + oneof result { + // Data profile result for data profile type data scan. + DataProfileResult data_profile = 101; + + // Data quality result for data quality type data scan. + DataQualityResult data_quality = 102; + } + + // The applied configs in the data scan job. + oneof appliedConfigs { + // Applied configs for data profile type data scan. + DataProfileAppliedConfigs data_profile_configs = 201; + + // Applied configs for data quality type data scan. + DataQualityAppliedConfigs data_quality_configs = 202; + } + + // The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 11; +} + +// Information about the result of a data quality rule for data quality scan. +// The monitored resource is 'DataScan'. +message DataQualityScanRuleResult { + // The type of the data quality rule. + enum RuleType { + // An unspecified rule type. + RULE_TYPE_UNSPECIFIED = 0; + + // See + // [DataQualityRule.NonNullExpectation][google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation]. + NON_NULL_EXPECTATION = 1; + + // See + // [DataQualityRule.RangeExpectation][google.cloud.dataplex.v1.DataQualityRule.RangeExpectation]. + RANGE_EXPECTATION = 2; + + // See + // [DataQualityRule.RegexExpectation][google.cloud.dataplex.v1.DataQualityRule.RegexExpectation]. + REGEX_EXPECTATION = 3; + + // See + // [DataQualityRule.RowConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation]. + ROW_CONDITION_EXPECTATION = 4; + + // See + // [DataQualityRule.SetExpectation][google.cloud.dataplex.v1.DataQualityRule.SetExpectation]. + SET_EXPECTATION = 5; + + // See + // [DataQualityRule.StatisticRangeExpectation][google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation]. + STATISTIC_RANGE_EXPECTATION = 6; + + // See + // [DataQualityRule.TableConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation]. + TABLE_CONDITION_EXPECTATION = 7; + + // See + // [DataQualityRule.UniquenessExpectation][google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation]. + UNIQUENESS_EXPECTATION = 8; + + // See + // [DataQualityRule.SqlAssertion][google.cloud.dataplex.v1.DataQualityRule.SqlAssertion]. + SQL_ASSERTION = 9; + } + + // The evaluation type of the data quality rule. + enum EvaluationType { + // An unspecified evaluation type. + EVALUATION_TYPE_UNSPECIFIED = 0; + + // The rule evaluation is done at per row level. + PER_ROW = 1; + + // The rule evaluation is done for an aggregate of rows. + AGGREGATE = 2; + } + + // Whether the data quality rule passed or failed. + enum Result { + // An unspecified result. + RESULT_UNSPECIFIED = 0; + + // The data quality rule passed. + PASSED = 1; + + // The data quality rule failed. + FAILED = 2; + } + + // Identifier of the specific data scan job this log entry is for. + string job_id = 1; + + // The data source of the data scan (e.g. BigQuery table name). + string data_source = 2; + + // The column which this rule is evaluated against. + string column = 3; + + // The name of the data quality rule. + string rule_name = 4; + + // The type of the data quality rule. + RuleType rule_type = 5; + + // The evaluation type of the data quality rule. + EvaluationType evalution_type = 6; + + // The dimension of the data quality rule. + string rule_dimension = 7; + + // The passing threshold ([0.0, 100.0]) of the data quality rule. + double threshold_percent = 8; + + // The result of the data quality rule. + Result result = 9; + + // The number of rows evaluated against the data quality rule. + // This field is only valid for rules of PER_ROW evaluation type. + int64 evaluated_row_count = 10; + + // The number of rows which passed a rule evaluation. + // This field is only valid for rules of PER_ROW evaluation type. + int64 passed_row_count = 11; + + // The number of rows with null values in the specified column. + int64 null_row_count = 12; + + // The number of rows returned by the SQL statement in a SQL assertion rule. + // This field is only valid for SQL assertion rules. + int64 assertion_row_count = 13; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto new file mode 100644 index 00000000000..be51a2c85cc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto @@ -0,0 +1,823 @@ +// 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.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "MetadataProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Metadata service manages metadata resources such as tables, filesets and +// partitions. +service MetadataService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a metadata entity. + rpc CreateEntity(CreateEntityRequest) returns (Entity) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + body: "entity" + }; + option (google.api.method_signature) = "parent,entity"; + } + + // Update a metadata entity. Only supports full resource update. + rpc UpdateEntity(UpdateEntityRequest) returns (Entity) { + option (google.api.http) = { + put: "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + body: "entity" + }; + } + + // Delete a metadata entity. + rpc DeleteEntity(DeleteEntityRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a metadata entity. + rpc GetEntity(GetEntityRequest) returns (Entity) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata entities in a zone. + rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a metadata partition. + rpc CreatePartition(CreatePartitionRequest) returns (Partition) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + body: "partition" + }; + option (google.api.method_signature) = "parent,partition"; + } + + // Delete a metadata partition. + rpc DeletePartition(DeletePartitionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a metadata partition of an entity. + rpc GetPartition(GetPartitionRequest) returns (Partition) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + }; + option (google.api.method_signature) = "name"; + } + + // List metadata partitions of an entity. + rpc ListPartitions(ListPartitionsRequest) returns (ListPartitionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Create a metadata entity request. +message CreateEntityRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Required. Entity resource. + Entity entity = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update a metadata entity request. +// The exiting entity will be fully replaced by the entity in the request. +// The entity ID is mutable. To modify the ID, use the current entity ID in the +// request URL and specify the new ID in the request body. +message UpdateEntityRequest { + // Required. Update description. + Entity entity = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete a metadata entity request. +message DeleteEntityRequest { + // Required. The resource name of the entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } + ]; + + // Required. The etag associated with the entity, which can be retrieved with + // a [GetEntity][] request. + string etag = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// List metadata entities request. +message ListEntitiesRequest { + // Entity views. + enum EntityView { + // The default unset value. Return both table and fileset entities + // if unspecified. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Only list table entities. + TABLES = 1; + + // Only list fileset entities. + FILESETS = 2; + } + + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Required. Specify the entity view to make a partial list request. + EntityView view = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Maximum number of entities to return. The service may return + // fewer than this value. If unspecified, 100 entities will be returned by + // default. The maximum value is 500; larger values will will be truncated to + // 500. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEntities` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListEntities` must match the call that provided the + // page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The following filter parameters can be added to the URL to limit + // the entities returned by the API: + // + // - Entity ID: ?filter="id=entityID" + // - Asset ID: ?filter="asset=assetID" + // - Data path ?filter="data_path=gs://my-bucket" + // - Is HIVE compatible: ?filter="hive_compatible=true" + // - Is BigQuery compatible: ?filter="bigquery_compatible=true" + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata entities response. +message ListEntitiesResponse { + // Entities in the specified parent zone. + repeated Entity entities = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata entity request. +message GetEntityRequest { + // Entity views for get entity partial result. + enum EntityView { + // The API will default to the `BASIC` view. + ENTITY_VIEW_UNSPECIFIED = 0; + + // Minimal view that does not include the schema. + BASIC = 1; + + // Include basic information and schema. + SCHEMA = 2; + + // Include everything. Currently, this is the same as the SCHEMA view. + FULL = 4; + } + + // Required. The resource name of the entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } + ]; + + // Optional. Used to select the subset of entity information to return. + // Defaults to `BASIC`. + EntityView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions request. +message ListPartitionsRequest { + // Required. The resource name of the parent entity: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } + ]; + + // Optional. Maximum number of partitions to return. The service may return + // fewer than this value. If unspecified, 100 partitions will be returned by + // default. The maximum page size is 500; larger values will will be truncated + // to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListPartitions` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListPartitions` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter the partitions returned to the caller using a key value + // pair expression. Supported operators and syntax: + // + // - logic operators: AND, OR + // - comparison operators: <, >, >=, <= ,=, != + // - LIKE operators: + // - The right hand of a LIKE operator supports "." and + // "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + // - parenthetical grouping: ( ) + // + // Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + // + // **Notes:** + // + // - Keys to the left of operators are case insensitive. + // - Partition results are sorted first by creation time, then by + // lexicographic order. + // - Up to 20 key value filter pairs are allowed, but due to performance + // considerations, only the first 10 will be used as a filter. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create metadata partition request. +message CreatePartitionRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } + ]; + + // Required. Partition resource. + Partition partition = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete metadata partition request. +message DeletePartitionRequest { + // Required. The resource name of the partition. + // format: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + // The {partition_value_path} segment consists of an ordered sequence of + // partition values separated by "/". All values must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; + + // Optional. The etag associated with the partition. + string etag = 2 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; +} + +// List metadata partitions response. +message ListPartitionsResponse { + // Partitions under the specified parent entity. + repeated Partition partitions = 1; + + // Token to retrieve the next page of results, or empty if there are no + // remaining results in the list. + string next_page_token = 2; +} + +// Get metadata partition request. +message GetPartitionRequest { + // Required. The resource name of the partition: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + // The {partition_value_path} segment consists of an ordered sequence of + // partition values separated by "/". All values must be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; +} + +// Represents tables and fileset metadata contained within a zone. +message Entity { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Entity" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }; + + // The type of entity. + enum Type { + // Type unspecified. + TYPE_UNSPECIFIED = 0; + + // Structured and semi-structured data. + TABLE = 1; + + // Unstructured data. + FILESET = 2; + } + + // Provides compatibility information for various metadata stores. + message CompatibilityStatus { + // Provides compatibility information for a specific metadata store. + message Compatibility { + // Output only. Whether the entity is compatible and can be represented in + // the metadata store. + bool compatible = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides additional detail if the entity is incompatible + // with the metadata store. + string reason = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Whether this entity is compatible with Hive Metastore. + Compatibility hive_metastore = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether this entity is compatible with BigQuery. + Compatibility bigquery = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the entity, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } + ]; + + // Optional. Display name must be shorter than or equal to 256 characters. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly longer description text. Must be shorter than or + // equal to 1024 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the entity was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the entity was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A user-provided entity ID. It is mutable, and will be used as the + // published table name. Specifying a new ID in an update entity + // request will override the existing value. + // The ID must contain only letters (a-z, A-Z), numbers (0-9), and + // underscores, and consist of 256 or fewer characters. + string id = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The etag associated with the entity, which can be retrieved with + // a [GetEntity][] request. Required for update and delete requests. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The type of entity. + Type type = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The ID of the asset associated with the storage + // location containing the entity data. The entity must be with in the same + // zone with the asset. + string asset = 11 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The storage path of the entity data. + // For Cloud Storage data, this is the fully-qualified path to the entity, + // such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + // the table resource, such as + // `projects/project_id/datasets/dataset_id/tables/table_id`. + string data_path = 12 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The set of items within the data path constituting the data in + // the entity, represented as a glob path. Example: + // `gs://bucket/path/to/data/**/*.csv`. + string data_path_pattern = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the associated Data Catalog entry. + string catalog_entry = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Identifies the storage system of the entity data. + StorageSystem system = 15 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Identifies the storage format of the entity data. + // It does not apply to entities with data stored in BigQuery. + StorageFormat format = 16 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Metadata stores that the entity is compatible with. + CompatibilityStatus compatibility = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies the access mechanism to the entity. Not user + // settable. + StorageAccess access = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated unique ID for the Entity. This ID will be + // different if the Entity is deleted and re-created with the same name. + string uid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The description of the data structure and layout. + // The schema is not included in list responses. It is only included in + // `SCHEMA` and `FULL` entity views of a `GetEntity` response. + Schema schema = 50 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents partition metadata contained within entity instances. +message Partition { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Partition" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }; + + // Output only. Partition values used in the HTTP URL must be + // double encoded. For example, `url_encode(url_encode(value))` can be used + // to encode "US:CA/CA#Sunnyvale so that the request URL ends + // with "/partitions/US%253ACA/CA%2523Sunnyvale". + // The name field in the response retains the encoded format. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Partition" + } + ]; + + // Required. Immutable. The set of values representing the partition, which + // correspond to the partition schema defined in the parent entity. + repeated string values = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The location of the entity data within the partition, + // for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + // `projects//datasets//tables/` + string location = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The etag for this partition. + string etag = 4 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; +} + +// Schema information describing the structure and layout of the data. +message Schema { + // Type information for fields in schemas and partition schemas. + enum Type { + // SchemaType unspecified. + TYPE_UNSPECIFIED = 0; + + // Boolean field. + BOOLEAN = 1; + + // Single byte numeric field. + BYTE = 2; + + // 16-bit numeric field. + INT16 = 3; + + // 32-bit numeric field. + INT32 = 4; + + // 64-bit numeric field. + INT64 = 5; + + // Floating point numeric field. + FLOAT = 6; + + // Double precision numeric field. + DOUBLE = 7; + + // Real value numeric field. + DECIMAL = 8; + + // Sequence of characters field. + STRING = 9; + + // Sequence of bytes field. + BINARY = 10; + + // Date and time field. + TIMESTAMP = 11; + + // Date field. + DATE = 12; + + // Time field. + TIME = 13; + + // Structured field. Nested fields that define the structure of the map. + // If all nested fields are nullable, this field represents a union. + RECORD = 14; + + // Null field that does not have values. + NULL = 100; + } + + // Additional qualifiers to define field semantics. + enum Mode { + // Mode unspecified. + MODE_UNSPECIFIED = 0; + + // The field has required semantics. + REQUIRED = 1; + + // The field has optional semantics, and may be null. + NULLABLE = 2; + + // The field has repeated (0 or more) semantics, and is a list of values. + REPEATED = 3; + } + + // Represents a column field within a table schema. + message SchemaField { + // Required. The name of the field. Must contain only letters, numbers and + // underscores, with a maximum length of 767 characters, + // and must begin with a letter or underscore. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. User friendly field description. Must be less than or equal to + // 1024 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of field. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Additional field semantics. + Mode mode = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Any nested field for complex types. + repeated SchemaField fields = 10 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a key field within the entity's partition structure. You could + // have up to 20 partition fields, but only the first 10 partitions have the + // filtering ability due to performance consideration. **Note:** + // Partition fields are immutable. + message PartitionField { + // Required. Partition field name must consist of letters, numbers, and + // underscores only, with a maximum of length of 256 characters, and must + // begin with a letter or underscore.. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The type of field. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // The structure of paths within the entity, which represent partitions. + enum PartitionStyle { + // PartitionStyle unspecified + PARTITION_STYLE_UNSPECIFIED = 0; + + // Partitions are hive-compatible. + // Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, + // `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. + HIVE_COMPATIBLE = 1; + } + + // Required. Set to `true` if user-managed or `false` if managed by Dataplex. + // The default is `false` (managed by Dataplex). + // + // - Set to `false`to enable Dataplex discovery to update the schema. + // including new data discovery, schema inference, and schema evolution. + // Users retain the ability to input and edit the schema. Dataplex + // treats schema input by the user as though produced + // by a previous Dataplex discovery operation, and it will + // evolve the schema and take action based on that treatment. + // + // - Set to `true` to fully manage the entity + // schema. This setting guarantees that Dataplex will not + // change schema fields. + bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The sequence of fields describing data in table entities. + // **Note:** BigQuery SchemaFields are immutable. + repeated SchemaField fields = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sequence of fields describing the partition structure in + // entities. If this field is empty, there are no partitions within the data. + repeated PartitionField partition_fields = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The structure of paths containing partition data within the + // entity. + PartitionStyle partition_style = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Describes the format of the data within its storage location. +message StorageFormat { + // Describes CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The character encoding of the data. Accepts "US-ASCII", + // "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of rows to interpret as header rows that should be + // skipped when reading data rows. Defaults to 0. + int32 header_rows = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter used to separate values. Defaults to ','. + string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character used to quote column values. Accepts '"' + // (double quotation mark) or ''' (single quotation mark). Defaults to + // '"' (double quotation mark) if unspecified. + string quote = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + // and "ISO-8859-1". Defaults to UTF-8 if not specified. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes Iceberg data format. + message IcebergOptions { + // Optional. The location of where the iceberg metadata is present, must be + // within the table path + string metadata_location = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specific file format of the data. + enum Format { + // Format unspecified. + FORMAT_UNSPECIFIED = 0; + + // Parquet-formatted structured data. + PARQUET = 1; + + // Avro-formatted structured data. + AVRO = 2; + + // Orc-formatted structured data. + ORC = 3; + + // Csv-formatted semi-structured data. + CSV = 100; + + // Json-formatted semi-structured data. + JSON = 101; + + // Image data formats (such as jpg and png). + IMAGE = 200; + + // Audio data formats (such as mp3, and wav). + AUDIO = 201; + + // Video data formats (such as mp4 and mpg). + VIDEO = 202; + + // Textual data formats (such as txt and xml). + TEXT = 203; + + // TensorFlow record format. + TFRECORD = 204; + + // Data that doesn't match a specific format. + OTHER = 1000; + + // Data of an unknown format. + UNKNOWN = 1001; + } + + // The specific compressed file format of the data. + enum CompressionFormat { + // CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0; + + // GZip compressed set of files. + GZIP = 2; + + // BZip2 compressed set of files. + BZIP2 = 3; + } + + // Output only. The data format associated with the stored data, which + // represents content type values. The value is inferred from mime type. + Format format = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The compression type associated with the stored data. + // If unspecified, the data is uncompressed. + CompressionFormat compression_format = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The mime type descriptor for the data. Must match the pattern + // {type}/{subtype}. Supported values: + // + // - application/x-parquet + // - application/x-avro + // - application/x-orc + // - application/x-tfrecord + // - application/x-parquet+iceberg + // - application/x-avro+iceberg + // - application/x-orc+iceberg + // - application/json + // - application/{subtypes} + // - text/csv + // - text/ + // - image/{image subtype} + // - video/{video subtype} + // - audio/{audio subtype} + string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Additional format-specific options. + oneof options { + // Optional. Additional information about CSV formatted data. + CsvOptions csv = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about CSV formatted data. + JsonOptions json = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about iceberg tables. + IcebergOptions iceberg = 12 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Describes the access mechanism of the data within its storage location. +message StorageAccess { + // Access Mode determines how data stored within the Entity is read. + enum AccessMode { + // Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0; + + // Default. Data is accessed directly using storage APIs. + DIRECT = 1; + + // Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2; + } + + // Output only. Describes the read access mechanism of the data. Not user + // settable. + AccessMode read = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Identifies the cloud system that manages the data storage. +enum StorageSystem { + // Storage system unspecified. + STORAGE_SYSTEM_UNSPECIFIED = 0; + + // The entity data is contained within a Cloud Storage bucket. + CLOUD_STORAGE = 1; + + // The entity data is contained within a BigQuery dataset. + BIGQUERY = 2; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto new file mode 100644 index 00000000000..0cbd7309ee5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto @@ -0,0 +1,104 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "ProcessingProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataScan scheduling and trigger settings. +message Trigger { + // The scan runs once via `RunDataScan` API. + message OnDemand {} + + // The scan is scheduled to run periodically. + message Schedule { + // Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + // scans periodically. + // + // To explicitly set a timezone in the cron tab, apply a prefix in the + // cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + // The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + // database + // ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + // For example, `CRON_TZ=America/New_York 1 * * * *`, or + // `TZ=America/New_York 1 * * * *`. + // + // This field is required for Schedule scans. + string cron = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // DataScan scheduling and trigger settings. + // + // If not specified, the default is `onDemand`. + oneof mode { + // The scan runs once via `RunDataScan` API. + OnDemand on_demand = 100; + + // The scan is scheduled to run periodically. + Schedule schedule = 101; + } +} + +// The data source for DataScan. +message DataSource { + // The source is required and immutable. Once it is set, it cannot be change + // to others. + oneof source { + // Immutable. The Dataplex entity that represents the data source (e.g. + // BigQuery table) for DataScan, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string entity = 100 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + + // Immutable. The service-qualified full resource name of the cloud resource + // for a DataScan job to scan against. The field could be: BigQuery table of + // type "TABLE" for DataProfileScan/DataQualityScan Format: + // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string resource = 101 [(google.api.field_behavior) = IMMUTABLE]; + } +} + +// The data scanned during processing (e.g. in incremental DataScan) +message ScannedData { + // A data range denoted by a pair of start/end values of a field. + message IncrementalField { + // The field that contains values which monotonically increases over time + // (e.g. a timestamp column). + string field = 1; + + // Value that marks the start of the range. + string start = 2; + + // Value that marks the end of the range. + string end = 3; + } + + // The range of scanned data + oneof data_range { + // The range denoted by values of an incremental field + IncrementalField incremental_field = 1; + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto new file mode 100644 index 00000000000..036d78b98d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto @@ -0,0 +1,807 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A lake is a centralized repository for managing enterprise data across the +// organization distributed across many cloud projects, and stored in a variety +// of storage services such as Google Cloud Storage and BigQuery. The resources +// attached to a lake are referred to as managed resources. Data within these +// managed resources can be structured or unstructured. A lake provides data +// admins with tools to organize, secure and manage their data at scale, and +// provides data scientists and data engineers an integrated experience to +// easily search, discover, analyze and transform data and associated metadata. +message Lake { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" + }; + + // Settings to manage association of Dataproc Metastore with a lake. + message Metastore { + // Optional. A relative reference to the Dataproc Metastore + // (https://cloud.google.com/dataproc-metastore/docs) service associated + // with the lake: + // `projects/{project_id}/locations/{location_id}/services/{service_id}` + string service = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of Lake and Dataproc Metastore service instance association. + message MetastoreStatus { + // Current state of association. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // A Metastore service instance is not associated with the lake. + NONE = 1; + + // A Metastore service instance is attached to the lake. + READY = 2; + + // Attach/detach is in progress. + UPDATING = 3; + + // Attach/detach could not be done due to errors. + ERROR = 4; + } + + // Current state of association. + State state = 1; + + // Additional information about the current status. + string message = 2; + + // Last update time of the metastore status of the lake. + google.protobuf.Timestamp update_time = 3; + + // The URI of the endpoint used to access the Metastore service. + string endpoint = 4; + } + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the lake. This ID will + // be different if the lake is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the lake was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the lake. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the lake. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the lake. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account associated with this lake. This service + // account must be authorized to access or operate on resources managed by the + // lake. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Settings to manage lake and Dataproc Metastore service instance + // association. + Metastore metastore = 102 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Aggregated status of the underlying assets of the lake. + AssetStatus asset_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metastore status of the lake. + MetastoreStatus metastore_status = 104 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Aggregated status of the underlying assets of a lake or zone. +message AssetStatus { + // Last update time of the status. + google.protobuf.Timestamp update_time = 1; + + // Number of active assets. + int32 active_assets = 2; + + // Number of assets that are in process of updating the security policy on + // attached resources. + int32 security_policy_applying_assets = 3; +} + +// A zone represents a logical group of related assets within a lake. A zone can +// be used to map to organizational structure or represent stages of data +// readiness from raw to curated. It provides managing behavior that is shared +// or inherited by all contained assets. +message Zone { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Zone" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }; + + // Type of zone. + enum Type { + // Zone type not specified. + TYPE_UNSPECIFIED = 0; + + // A zone that contains data that needs further processing before it is + // considered generally ready for consumption and analytics workloads. + RAW = 1; + + // A zone that contains data that is considered to be ready for broader + // consumption and analytics workloads. Curated structured data stored in + // Cloud Storage must conform to certain file formats (parquet, avro and + // orc) and organized in a hive-compatible directory layout. + CURATED = 2; + } + + // Settings for resources attached as assets within a zone. + message ResourceSpec { + // Location type of the resources attached to a zone. + enum LocationType { + // Unspecified location type. + LOCATION_TYPE_UNSPECIFIED = 0; + + // Resources that are associated with a single region. + SINGLE_REGION = 1; + + // Resources that are associated with a multi-region location. + MULTI_REGION = 2; + } + + // Required. Immutable. The location type of the resources that are allowed + // to be attached to the assets within this zone. + LocationType location_type = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Settings to manage the metadata discovery and publishing in a zone. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be + // skipped when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to + // ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of patterns to apply for selecting data to include + // during discovery if only a subset of the data should considered. For + // Cloud Storage bucket assets, these are interpreted as glob patterns used + // to match object names. For BigQuery dataset assets, these are interpreted + // as patterns to match table names. + repeated string include_patterns = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude + // during discovery. For Cloud Storage bucket assets, these are interpreted + // as glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + // running discovery periodically. Successive discovery runs must be + // scheduled at least 60 minutes apart. The default value is to run + // discovery every 60 minutes. To explicitly set a timezone to the cron + // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + // * * * *`, or `TZ=America/New_York 1 * * * *`. + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the zone. This ID will + // be different if the zone is deleted and re-created with the same name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the zone. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the zone. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the zone. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of the zone. + Type type = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Specification of the discovery feature applied to data in this + // zone. + DiscoverySpec discovery_spec = 103 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Specification of the resources that are referenced by the assets + // within this zone. + ResourceSpec resource_spec = 104 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Aggregated status of the underlying assets of the zone. + AssetStatus asset_status = 105 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Action represents an issue requiring administrator action for resolution. +message Action { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Action" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }; + + // The category of issues. + enum Category { + // Unspecified category. + CATEGORY_UNSPECIFIED = 0; + + // Resource management related issues. + RESOURCE_MANAGEMENT = 1; + + // Security policy related issues. + SECURITY_POLICY = 2; + + // Data and discovery related issues. + DATA_DISCOVERY = 3; + } + + // Action details for resource references in assets that cannot be located. + message MissingResource {} + + // Action details for unauthorized resource issues raised to indicate that the + // service account associated with the lake instance is not authorized to + // access or manage the resource associated with an asset. + message UnauthorizedResource {} + + // Failed to apply security policy to the managed resource(s) under a + // lake, zone or an asset. For a lake or zone resource, one or more underlying + // assets has a failure applying security policy to the associated managed + // resource. + message FailedSecurityPolicyApply { + // Resource name of one of the assets with failing security policy + // application. Populated for a lake or zone resource only. + string asset = 1; + } + + // Action details for invalid or unsupported data files detected by discovery. + message InvalidDataFormat { + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 1; + + // The expected data format of the entity. + string expected_format = 2; + + // The new unexpected data format within the entity. + string new_format = 3; + } + + // Action details for incompatible schemas detected by discovery. + message IncompatibleDataSchema { + // Whether the action relates to a schema that is incompatible or modified. + enum SchemaChange { + // Schema change unspecified. + SCHEMA_CHANGE_UNSPECIFIED = 0; + + // Newly discovered schema is incompatible with existing schema. + INCOMPATIBLE = 1; + + // Newly discovered schema has changed from existing schema for data in a + // curated zone. + MODIFIED = 2; + } + + // The name of the table containing invalid data. + string table = 1; + + // The existing and expected schema of the table. The schema is provided as + // a JSON formatted structure listing columns and data types. + string existing_schema = 2; + + // The new and incompatible schema within the table. The schema is provided + // as a JSON formatted structured listing columns and data types. + string new_schema = 3; + + // The list of data locations sampled and used for format/schema + // inference. + repeated string sampled_data_locations = 4; + + // Whether the action relates to a schema that is incompatible or modified. + SchemaChange schema_change = 5; + } + + // Action details for invalid or unsupported partitions detected by discovery. + message InvalidDataPartition { + // The expected partition structure. + enum PartitionStructure { + // PartitionStructure unspecified. + PARTITION_STRUCTURE_UNSPECIFIED = 0; + + // Consistent hive-style partition definition (both raw and curated zone). + CONSISTENT_KEYS = 1; + + // Hive style partition definition (curated zone only). + HIVE_STYLE_KEYS = 2; + } + + // The issue type of InvalidDataPartition. + PartitionStructure expected_structure = 1; + } + + // Action details for absence of data detected by discovery. + message MissingData {} + + // Action details for invalid data arrangement. + message InvalidDataOrganization {} + + // The category of issue associated with the action. + Category category = 1; + + // Detailed description of the issue requiring action. + string issue = 2; + + // The time that the issue was detected. + google.protobuf.Timestamp detect_time = 4; + + // Output only. The relative resource name of the action, of the form: + // `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + string name = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Action" } + ]; + + // Output only. The relative resource name of the lake, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string lake = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Output only. The relative resource name of the zone, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string zone = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string asset = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } + ]; + + // The list of data locations associated with this action. Cloud Storage + // locations are represented as URI paths(E.g. + // `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + // resource names(E.g. + // `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + repeated string data_locations = 9; + + // Additional details about the action based on the action category. + oneof details { + // Details for issues related to invalid or unsupported data formats. + InvalidDataFormat invalid_data_format = 10; + + // Details for issues related to incompatible schemas detected within data. + IncompatibleDataSchema incompatible_data_schema = 11; + + // Details for issues related to invalid or unsupported data partition + // structure. + InvalidDataPartition invalid_data_partition = 12; + + // Details for issues related to absence of data within managed resources. + MissingData missing_data = 13; + + // Details for issues related to absence of a managed resource. + MissingResource missing_resource = 14; + + // Details for issues related to lack of permissions to access data + // resources. + UnauthorizedResource unauthorized_resource = 15; + + // Details for issues related to applying security policy. + FailedSecurityPolicyApply failed_security_policy_apply = 21; + + // Details for issues related to invalid data arrangement. + InvalidDataOrganization invalid_data_organization = 22; + } +} + +// An asset represents a cloud resource that is being managed within a lake as a +// member of a zone. +message Asset { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Asset" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }; + + // Security policy status of the asset. Data security policy, i.e., readers, + // writers & owners, should be specified in the lake/zone/asset IAM policy. + message SecurityStatus { + // The state of the security policy. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Security policy has been successfully applied to the attached resource. + READY = 1; + + // Security policy is in the process of being applied to the attached + // resource. + APPLYING = 2; + + // Security policy could not be applied to the attached resource due to + // errors. + ERROR = 3; + } + + // The current state of the security policy applied to the attached + // resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + } + + // Settings to manage the metadata discovery and publishing for an asset. + message DiscoverySpec { + // Describe CSV and similar semi-structured data formats. + message CsvOptions { + // Optional. The number of rows to interpret as header rows that should be + // skipped when reading data rows. + int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The delimiter being used to separate values. This defaults to + // ','. + string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for CSV data. + // If true, all columns will be registered as strings. + bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describe JSON data format. + message JsonOptions { + // Optional. The character encoding of the data. The default is UTF-8. + string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to disable the inference of data type for Json data. + // If true, all columns will be registered as their primitive types + // (strings, number or boolean). + bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Whether discovery is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to include + // during discovery if only a subset of the data should considered. For + // Cloud Storage bucket assets, these are interpreted as glob patterns used + // to match object names. For BigQuery dataset assets, these are interpreted + // as patterns to match table names. + repeated string include_patterns = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of patterns to apply for selecting data to exclude + // during discovery. For Cloud Storage bucket assets, these are interpreted + // as glob patterns used to match object names. For BigQuery dataset assets, + // these are interpreted as patterns to match table names. + repeated string exclude_patterns = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for CSV data. + CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Json data. + JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Determines when discovery is triggered. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + // running discovery periodically. Successive discovery runs must be + // scheduled at least 60 minutes apart. The default value is to run + // discovery every 60 minutes. To explicitly set a timezone to the cron + // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string + // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + // * * * *`, or `TZ=America/New_York 1 * * * *`. + string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Identifies the cloud resource that is referenced by this asset. + message ResourceSpec { + // Type of resource. + enum Type { + // Type not specified. + TYPE_UNSPECIFIED = 0; + + // Cloud Storage bucket. + STORAGE_BUCKET = 1; + + // BigQuery dataset. + BIGQUERY_DATASET = 2; + } + + // Access Mode determines how data stored within the resource is read. This + // is only applicable to storage bucket assets. + enum AccessMode { + // Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0; + + // Default. Data is accessed directly using storage APIs. + DIRECT = 1; + + // Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2; + } + + // Immutable. Relative name of the cloud resource that contains the data + // that is being managed within a lake. For example: + // `projects/{project_number}/buckets/{bucket_id}` + // `projects/{project_number}/datasets/{dataset_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. Type of resource. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Determines how read permissions are handled for each asset and + // their associated tables. Only available to storage buckets assets. + AccessMode read_access_mode = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of the resource referenced by an asset. + message ResourceStatus { + // The state of a resource. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Resource does not have any errors. + READY = 1; + + // Resource has errors. + ERROR = 2; + } + + // The current state of the managed resource. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + + // Output only. Service account associated with the BigQuery Connection. + string managed_access_identity = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Status of discovery for an asset. + message DiscoveryStatus { + // Current state of discovery. + enum State { + // State is unspecified. + STATE_UNSPECIFIED = 0; + + // Discovery for the asset is scheduled. + SCHEDULED = 1; + + // Discovery for the asset is running. + IN_PROGRESS = 2; + + // Discovery for the asset is currently paused (e.g. due to a lack + // of available resources). It will be automatically resumed. + PAUSED = 3; + + // Discovery for the asset is disabled. + DISABLED = 5; + } + + // The aggregated data statistics for the asset reported by discovery. + message Stats { + // The count of data items within the referenced resource. + int64 data_items = 1; + + // The number of stored data bytes within the referenced resource. + int64 data_size = 2; + + // The count of table entities within the referenced resource. + int64 tables = 3; + + // The count of fileset entities within the referenced resource. + int64 filesets = 4; + } + + // The current status of the discovery feature. + State state = 1; + + // Additional information about the current state. + string message = 2; + + // Last update time of the status. + google.protobuf.Timestamp update_time = 3; + + // The start time of the last discovery run. + google.protobuf.Timestamp last_run_time = 4; + + // Data Stats of the asset reported by discovery. + Stats stats = 6; + + // The duration of the last discovery run. + google.protobuf.Duration last_run_duration = 7; + } + + // Output only. The relative resource name of the asset, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } + ]; + + // Optional. User friendly display name. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. System generated globally unique ID for the asset. This ID + // will be different if the asset is deleted and re-created with the same + // name. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the asset was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User defined labels for the asset. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the asset. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the asset. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Specification of the resource that is referenced by this asset. + ResourceSpec resource_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the resource referenced by this asset. + ResourceStatus resource_status = 101 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Status of the security policy applied to resource referenced + // by this asset. + SecurityStatus security_status = 103 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Specification of the discovery feature applied to data referenced + // by this asset. When this spec is left unset, the asset will use the spec + // set on the parent zone. + DiscoverySpec discovery_spec = 106 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the discovery feature applied to data referenced by + // this asset. + DiscoveryStatus discovery_status = 107 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// State of a resource. +enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // Resource is active, i.e., ready to use. + ACTIVE = 1; + + // Resource is under creation. + CREATING = 2; + + // Resource is under deletion. + DELETING = 3; + + // Resource is active but has unresolved actions. + ACTION_REQUIRED = 4; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto new file mode 100644 index 00000000000..18111f0f21b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto @@ -0,0 +1,53 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "SecurityProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// ResourceAccessSpec holds the access control configuration to be enforced +// on the resources, for example, Cloud Storage bucket, BigQuery dataset, +// BigQuery table. +message ResourceAccessSpec { + // Optional. The format of strings follows the pattern followed by IAM in the + // bindings. user:{email}, serviceAccount:{email} group:{email}. + // The set of principals to be granted reader role on the resource. + repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of principals to be granted writer role on the resource. + repeated string writers = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of principals to be granted owner role on the resource. + repeated string owners = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// DataAccessSpec holds the access control configuration to be enforced on data +// stored within resources (eg: rows, columns in BigQuery Tables). When +// associated with data, the data is only accessible to +// principals explicitly granted access through the DataAccessSpec. Principals +// with access to the containing resource are not implicitly granted access. +message DataAccessSpec { + // Optional. The format of strings follows the pattern followed by IAM in the + // bindings. user:{email}, serviceAccount:{email} group:{email}. + // The set of principals to be granted reader role on data + // stored within resources. + repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto new file mode 100644 index 00000000000..a58f817b7f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto @@ -0,0 +1,1120 @@ +// 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.dataplex.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/dataplex/v1/analyze.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/cloud/dataplex/v1/tasks.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// Dataplex service provides data lakes as a service. The primary resources +// offered by this service are Lakes, Zones and Assets which collectively allow +// a data administrator to organize, manage, secure and catalog data across +// their organization located across cloud projects in a variety of storage +// systems including Cloud Storage and BigQuery. +service DataplexService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a lake resource. + rpc CreateLake(CreateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/lakes" + body: "lake" + }; + option (google.api.method_signature) = "parent,lake,lake_id"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Updates a lake resource. + rpc UpdateLake(UpdateLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{lake.name=projects/*/locations/*/lakes/*}" + body: "lake" + }; + option (google.api.method_signature) = "lake,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Lake" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a lake resource. All zones within the lake must be deleted before + // the lake can be deleted. + rpc DeleteLake(DeleteLakeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists lake resources in a project and location. + rpc ListLakes(ListLakesRequest) returns (ListLakesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/lakes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a lake resource. + rpc GetLake(GetLakeRequest) returns (Lake) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a lake. + rpc ListLakeActions(ListLakeActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a zone resource within a lake. + rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + body: "zone" + }; + option (google.api.method_signature) = "parent,zone,zone_id"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Updates a zone resource. + rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}" + body: "zone" + }; + option (google.api.method_signature) = "zone,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a zone resource. All assets within a zone must be deleted before + // the zone can be deleted. + rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists zone resources in a lake. + rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a zone resource. + rpc GetZone(GetZoneRequest) returns (Zone) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in a zone. + rpc ListZoneActions(ListZoneActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an asset resource. + rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + body: "asset" + }; + option (google.api.method_signature) = "parent,asset,asset_id"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Updates an asset resource. + rpc UpdateAsset(UpdateAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + body: "asset" + }; + option (google.api.method_signature) = "asset,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Asset" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an asset resource. The referenced storage resource is detached + // (default) or deleted based on the associated Lifecycle policy. + rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists asset resources in a zone. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves an asset resource. + rpc GetAsset(GetAssetRequest) returns (Asset) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists action resources in an asset. + rpc ListAssetActions(ListAssetActionsRequest) returns (ListActionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a task resource within a lake. + rpc CreateTask(CreateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + body: "task" + }; + option (google.api.method_signature) = "parent,task,task_id"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Update the task resource. + rpc UpdateTask(UpdateTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}" + body: "task" + }; + option (google.api.method_signature) = "task,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Task" + metadata_type: "OperationMetadata" + }; + } + + // Delete the task resource. + rpc DeleteTask(DeleteTaskRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists tasks under the given lake. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get task resource. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Jobs under the given task. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Run an on demand execution of a Task. + rpc RunTask(RunTaskRequest) returns (RunTaskResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Get job resource. + rpc GetJob(GetJobRequest) returns (Job) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Cancel jobs running for the task resource. + rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Create an environment resource. + rpc CreateEnvironment(CreateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment,environment_id"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "OperationMetadata" + }; + } + + // Update the environment resource. + rpc UpdateEnvironment(UpdateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "OperationMetadata" + }; + } + + // Delete the environment resource. All the child resources must have been + // deleted before environment deletion can be initiated. + rpc DeleteEnvironment(DeleteEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists environments under the given lake. + rpc ListEnvironments(ListEnvironmentsRequest) + returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Get environment resource. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists session resources in an environment. + rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Create lake request. +message CreateLakeRequest { + // Required. The resource name of the lake location, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Lake identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the customer project / location. + string lake_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Lake resource + Lake lake = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update lake request. +message UpdateLakeRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Lake lake = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete lake request. +message DeleteLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; +} + +// List lakes request. +message ListLakesRequest { + // Required. The resource name of the lake location, of the form: + // `projects/{project_number}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of Lakes to return. The service may return fewer + // than this value. If unspecified, at most 10 lakes will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakes` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListLakes` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List lakes response. +message ListLakesResponse { + // Lakes under the given parent location. + repeated Lake lakes = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// List lake actions request. +message ListLakeActionsRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer + // than this value. If unspecified, at most 10 actions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListLakeActions` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListLakeActions` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List actions response. +message ListActionsResponse { + // Actions under the given parent lake/zone/asset. + repeated Action actions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get lake request. +message GetLakeRequest { + // Required. The resource name of the lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; +} + +// Create zone request. +message CreateZoneRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Required. Zone identifier. + // This ID will be used to generate names such as database and dataset names + // when publishing metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique across all lakes from all locations in a project. + // * Must not be one of the reserved IDs (i.e. "default", "global-temp") + string zone_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Zone resource. + Zone zone = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update zone request. +message UpdateZoneRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Zone zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete zone request. +message DeleteZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; +} + +// List zones request. +message ListZonesRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. Maximum number of zones to return. The service may return fewer + // than this value. If unspecified, at most 10 zones will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List zones response. +message ListZonesResponse { + // Zones under the given parent lake. + repeated Zone zones = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List zone actions request. +message ListZoneActionsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer + // than this value. If unspecified, at most 10 actions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZoneActions` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListZoneActions` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get zone request. +message GetZoneRequest { + // Required. The resource name of the zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; +} + +// Create asset request. +message CreateAssetRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Required. Asset identifier. + // This ID will be used to generate names such as table names when publishing + // metadata to Hive Metastore and BigQuery. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the zone. + string asset_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Asset resource. + Asset asset = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update asset request. +message UpdateAssetRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete asset request. +message DeleteAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } + ]; +} + +// List assets request. +message ListAssetsRequest { + // Required. The resource name of the parent zone: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } + ]; + + // Optional. Maximum number of asset to return. The service may return fewer + // than this value. If unspecified, at most 10 assets will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssets` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListAssets` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List assets response. +message ListAssetsResponse { + // Asset under the given parent zone. + repeated Asset assets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// List asset actions request. +message ListAssetActionsRequest { + // Required. The resource name of the parent asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } + ]; + + // Optional. Maximum number of actions to return. The service may return fewer + // than this value. If unspecified, at most 10 actions will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListAssetActions` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListAssetActions` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get asset request. +message GetAssetRequest { + // Required. The resource name of the asset: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } + ]; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Create task request. +message CreateTaskRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Required. Task identifier. + string task_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Task resource. + Task task = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update task request. +message UpdateTaskRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Task task = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete task request. +message DeleteTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; +} + +// List tasks request. +message ListTasksRequest { + // Required. The resource name of the parent lake: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. Maximum number of tasks to return. The service may return fewer + // than this value. If unspecified, at most 10 tasks will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListZones` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListZones` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List tasks response. +message ListTasksResponse { + // Tasks under the given parent lake. + repeated Task tasks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Get task request. +message GetTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; +} + +// Get job request. +message GetJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } + ]; +} + +message RunTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; + + // Optional. User-defined labels for the task. If the map is left empty, the + // task will run with existing labels from task definition. If the map + // contains an entry with a new key, the same will be added to existing set of + // labels. If the map contains an entry with an existing label key in task + // definition, the task will run with new label value for that entry. Clearing + // an existing label will require label value to be explicitly set to a hyphen + // "-". The label value cannot be empty. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Execution spec arguments. If the map is left empty, the task will + // run with existing execution spec args from task definition. If the map + // contains an entry with a new key, the same will be added to existing set of + // args. If the map contains an entry with an existing arg key in task + // definition, the task will run with new arg value for that entry. Clearing + // an existing arg will require arg value to be explicitly set to a hyphen + // "-". The arg value cannot be empty. + map args = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message RunTaskResponse { + // Jobs created by RunTask API. + Job job = 1; +} + +// List jobs request. +message ListJobsRequest { + // Required. The resource name of the parent environment: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; + + // Optional. Maximum number of jobs to return. The service may return fewer + // than this value. If unspecified, at most 10 jobs will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListJobs` call. Provide this + // to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListJobs` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List jobs response. +message ListJobsResponse { + // Jobs under a given task. + repeated Job jobs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Cancel task jobs. +message CancelJobRequest { + // Required. The resource name of the job: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } + ]; +} + +// Create environment request. +message CreateEnvironmentRequest { + // Required. The resource name of the parent lake: + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Required. Environment identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the lake. + string environment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Environment resource. + Environment environment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update environment request. +message UpdateEnvironmentRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in `update_mask` are updated. + Environment environment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete environment request. +message DeleteEnvironmentRequest { + // Required. The resource name of the environment: + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; +} + +// List environments request. +message ListEnvironmentsRequest { + // Required. The resource name of the parent lake: + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } + ]; + + // Optional. Maximum number of environments to return. The service may return + // fewer than this value. If unspecified, at most 10 environments will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListEnvironments` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListEnvironments` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List environments response. +message ListEnvironmentsResponse { + // Environments under the given parent lake. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Get environment request. +message GetEnvironmentRequest { + // Required. The resource name of the environment: + // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; +} + +// List sessions request. +message ListSessionsRequest { + // Required. The resource name of the parent environment: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Environment" + } + ]; + + // Optional. Maximum number of sessions to return. The service may return + // fewer than this value. If unspecified, at most 10 sessions will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListSessions` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListSessions` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. The following `mode` filter is supported to + // return only the sessions belonging to the requester when the mode is USER + // and return sessions of all the users when the mode is ADMIN. When no filter + // is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + // should have `dataplex.environments.listAllSessions` permission to list all + // sessions, in absence of the permission, the request fails. + // + // mode = ADMIN | USER + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List sessions response. +message ListSessionsResponse { + // Sessions under a given environment. + repeated Session sessions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto new file mode 100644 index 00000000000..65ab0d15583 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto @@ -0,0 +1,422 @@ +// 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.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "TasksProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// A task represents a user-visible job. +message Task { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Task" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }; + + // Configuration for the underlying infrastructure used to run workloads. + message InfrastructureSpec { + // Batch compute resources associated with the task. + message BatchComputeResources { + // Optional. Total number of job executors. + // Executor Count should be between 2 and 100. [Default=2] + int32 executors_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Max configurable executors. + // If max_executors_count > executors_count, then auto-scaling is enabled. + // Max Executor Count should be between 2 and 1000. [Default=1000] + int32 max_executors_count = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Container Image Runtime Configuration used with Batch execution. + message ContainerImageRuntime { + // Optional. Container image to use. + string image = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of Java JARS to add to the classpath. + // Valid input includes Cloud Storage URIs to Jar binaries. + // For example, gs://bucket-name/my/path/to/file.jar + repeated string java_jars = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, gs://bucket-name/my/path/to/lib.tar.gz + repeated string python_packages = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Override to common configuration of open source components + // installed on the Dataproc cluster. The properties to set on daemon + // config files. Property keys are specified in `prefix:property` format, + // for example `core:hadoop.tmp.dir`. For more information, see [Cluster + // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + map properties = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Cloud VPC Network used to run the infrastructure. + message VpcNetwork { + // The Cloud VPC network identifier. + oneof network_name { + // Optional. The Cloud VPC network in which the job is run. By default, + // the Cloud VPC network named Default within the project is used. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud VPC sub-network in which the job is run. + string sub_network = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. List of network tags to apply to the job. + repeated string network_tags = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Hardware config. + oneof resources { + // Compute resources needed for a Task when using Dataproc Serverless. + BatchComputeResources batch = 52; + } + + // Software config. + oneof runtime { + // Container Image Runtime Configuration. + ContainerImageRuntime container_image = 101; + } + + // Networking config. + oneof network { + // Vpc network. + VpcNetwork vpc_network = 150; + } + } + + // Task scheduling and trigger settings. + message TriggerSpec { + // Determines how often and when the job will run. + enum Type { + // Unspecified trigger type. + TYPE_UNSPECIFIED = 0; + + // The task runs one-time shortly after Task Creation. + ON_DEMAND = 1; + + // The task is scheduled to run periodically. + RECURRING = 2; + } + + // Required. Immutable. Trigger type of the user-specified Task. + Type type = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The first run of the task will be after this time. + // If not specified, the task will run shortly after being submitted if + // ON_DEMAND and based on the schedule if RECURRING. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Prevent the task from executing. + // This does not cancel already running tasks. It is intended to temporarily + // disable RECURRING tasks. + bool disabled = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of retry attempts before aborting. + // Set to zero to never attempt to retry a failed task. + int32 max_retries = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Trigger only applies for RECURRING tasks. + oneof trigger { + // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + // running tasks periodically. To explicitly set a timezone to the cron + // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + // "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + // string from IANA time zone database. For example, + // `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + // *`. This field is required for RECURRING tasks. + string schedule = 100 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Execution related settings, like retry and service_account. + message ExecutionSpec { + // Optional. The arguments to pass to the task. + // The args can use placeholders of the format ${placeholder} as + // part of key/value string. These will be interpolated before passing the + // args to the driver. Currently supported placeholders: + // - ${task_id} + // - ${job_time} + // To pass positional args, set the key as TASK_ARGS. The value should be a + // comma-separated string of all the positional arguments. To use a + // delimiter other than comma, refer to + // https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + // other keys being present in the args, then TASK_ARGS will be passed as + // the last argument. + map args = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Service account to use to execute a task. + // If not provided, the default Compute service account for the project is + // used. + string service_account = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The project in which jobs are run. By default, the project + // containing the Lake is used. If a project is provided, the + // [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] + // must belong to this project. + string project = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum duration after which the job execution is expired. + google.protobuf.Duration max_job_execution_lifetime = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud KMS key to use for encryption, of the form: + // `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + string kms_key = 9 [(google.api.field_behavior) = OPTIONAL]; + } + + // User-specified config for running a Spark task. + message SparkTaskConfig { + // Required. The specification of the main method to call to drive the + // job. Specify either the jar file that contains the main class or the + // main class name. + oneof driver { + // The Cloud Storage URI of the jar file that contains the main class. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_jar_file_uri = 100; + + // The name of the driver's main class. The jar file that contains the + // class must be in the default CLASSPATH or specified in + // `jar_file_uris`. + // The execution args are passed in as a sequence of named process + // arguments (`--key=value`). + string main_class = 101; + + // The Gcloud Storage URI of the main Python file to use as the driver. + // Must be a .py file. The execution args are passed in as a sequence of + // named process arguments (`--key=value`). + string python_script_file = 102; + + // A reference to a query file. This should be the Cloud Storage URI of + // the query file. The execution args are used to declare a set of script + // variables (`set key="value";`). + string sql_script_file = 104; + + // The query text. + // The execution args are used to declare a set of script variables + // (`set key="value";`). + string sql_script = 105; + } + + // Optional. Cloud Storage URIs of files to be placed in the working + // directory of each executor. + repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working + // directory of each executor. Supported file types: .jar, .tar, .tar.gz, + // .tgz, and .zip. + repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for running scheduled notebooks. + message NotebookTaskConfig { + // Required. Path to input notebook. This can be the Cloud Storage URI of + // the notebook file or the path to a Notebook Content. The execution args + // are accessible as environment variables + // (`TASK_key=value`). + string notebook = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Infrastructure specification for the execution. + InfrastructureSpec infrastructure_spec = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of files to be placed in the working + // directory of each executor. + repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage URIs of archives to be extracted into the working + // directory of each executor. Supported file types: .jar, .tar, .tar.gz, + // .tgz, and .zip. + repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Status of the task execution (e.g. Jobs). + message ExecutionStatus { + // Output only. Last update time of the status. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. latest job execution + Job latest_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The relative resource name of the task, of the form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + // tasks/{task_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; + + // Output only. System generated globally unique ID for the task. This ID will + // be different if the task is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the task was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the task. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the task. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for the task. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Spec related to how often and when a task should be triggered. + TriggerSpec trigger_spec = 100 [(google.api.field_behavior) = REQUIRED]; + + // Required. Spec related to how a task is executed. + ExecutionSpec execution_spec = 101 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Status of the latest task executions. + ExecutionStatus execution_status = 201 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Task template specific user-specified config. + oneof config { + // Config related to running custom Spark tasks. + SparkTaskConfig spark = 300; + + // Config related to running scheduled Notebooks. + NotebookTaskConfig notebook = 302; + } +} + +// A job represents an instance of a task. +message Job { + option (google.api.resource) = { + type: "dataplex.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }; + + enum Service { + // Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0; + + // Dataproc service is used to run this job. + DATAPROC = 1; + } + + enum State { + // The job state is unknown. + STATE_UNSPECIFIED = 0; + + // The job is running. + RUNNING = 1; + + // The job is cancelling. + CANCELLING = 2; + + // The job cancellation was successful. + CANCELLED = 3; + + // The job completed successfully. + SUCCEEDED = 4; + + // The job is no longer running due to an error. + FAILED = 5; + + // The job was cancelled outside of Dataplex. + ABORTED = 6; + } + + // Job execution trigger. + enum Trigger { + // The trigger is unspecified. + TRIGGER_UNSPECIFIED = 0; + + // The job was triggered by Dataplex based on trigger spec from task + // definition. + TASK_CONFIG = 1; + + // The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2; + } + + // Output only. The relative resource name of the job, of the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } + ]; + + // Output only. System generated globally unique ID for the job. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job was started. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the job ended. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Execution state for the job. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of times the job has been retried (excluding the + // initial attempt). + uint32 retry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The underlying service running a job. + Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The full resource name for the job run under a particular + // service. + string service_job = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state. + string message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User-defined labels for the task. + map labels = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Job execution trigger. + Trigger trigger = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Spec related to how a task is executed. + Task.ExecutionSpec execution_spec = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts new file mode 100644 index 00000000000..2cac078582e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts @@ -0,0 +1,45377 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace dataplex. */ + namespace dataplex { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment displayName */ + displayName?: (string|null); + + /** Environment uid */ + uid?: (string|null); + + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels */ + labels?: ({ [k: string]: string }|null); + + /** Environment description */ + description?: (string|null); + + /** Environment state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Environment infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); + + /** Environment sessionSpec */ + sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); + + /** Environment sessionStatus */ + sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); + + /** Environment endpoints */ + endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment displayName. */ + public displayName: string; + + /** Environment uid. */ + public uid: string; + + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels. */ + public labels: { [k: string]: string }; + + /** Environment description. */ + public description: string; + + /** Environment state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Environment infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); + + /** Environment sessionSpec. */ + public sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); + + /** Environment sessionStatus. */ + public sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); + + /** Environment endpoints. */ + public endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEnvironment): google.cloud.dataplex.v1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Environment { + + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { + + /** InfrastructureSpec compute */ + compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); + + /** InfrastructureSpec osImage */ + osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); + } + + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { + + /** + * Constructs a new InfrastructureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec); + + /** InfrastructureSpec compute. */ + public compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); + + /** InfrastructureSpec osImage. */ + public osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); + + /** InfrastructureSpec resources. */ + public resources?: "compute"; + + /** InfrastructureSpec runtime. */ + public runtime?: "osImage"; + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InfrastructureSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec): google.cloud.dataplex.v1.Environment.InfrastructureSpec; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec; + + /** + * Verifies an InfrastructureSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfrastructureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfrastructureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfrastructureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfrastructureSpec { + + /** Properties of a ComputeResources. */ + interface IComputeResources { + + /** ComputeResources diskSizeGb */ + diskSizeGb?: (number|null); + + /** ComputeResources nodeCount */ + nodeCount?: (number|null); + + /** ComputeResources maxNodeCount */ + maxNodeCount?: (number|null); + } + + /** Represents a ComputeResources. */ + class ComputeResources implements IComputeResources { + + /** + * Constructs a new ComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources); + + /** ComputeResources diskSizeGb. */ + public diskSizeGb: number; + + /** ComputeResources nodeCount. */ + public nodeCount: number; + + /** ComputeResources maxNodeCount. */ + public maxNodeCount: number; + + /** + * Creates a new ComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @param message ComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @param message ComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Decodes a ComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Verifies a ComputeResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; + + /** + * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. + * @param message ComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OsImageRuntime. */ + interface IOsImageRuntime { + + /** OsImageRuntime imageVersion */ + imageVersion?: (string|null); + + /** OsImageRuntime javaLibraries */ + javaLibraries?: (string[]|null); + + /** OsImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); + + /** OsImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } + + /** Represents an OsImageRuntime. */ + class OsImageRuntime implements IOsImageRuntime { + + /** + * Constructs a new OsImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime); + + /** OsImageRuntime imageVersion. */ + public imageVersion: string; + + /** OsImageRuntime javaLibraries. */ + public javaLibraries: string[]; + + /** OsImageRuntime pythonPackages. */ + public pythonPackages: string[]; + + /** OsImageRuntime properties. */ + public properties: { [k: string]: string }; + + /** + * Creates a new OsImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns OsImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @param message OsImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @param message OsImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Verifies an OsImageRuntime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OsImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; + + /** + * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. + * @param message OsImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OsImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OsImageRuntime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SessionSpec. */ + interface ISessionSpec { + + /** SessionSpec maxIdleDuration */ + maxIdleDuration?: (google.protobuf.IDuration|null); + + /** SessionSpec enableFastStartup */ + enableFastStartup?: (boolean|null); + } + + /** Represents a SessionSpec. */ + class SessionSpec implements ISessionSpec { + + /** + * Constructs a new SessionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec); + + /** SessionSpec maxIdleDuration. */ + public maxIdleDuration?: (google.protobuf.IDuration|null); + + /** SessionSpec enableFastStartup. */ + public enableFastStartup: boolean; + + /** + * Creates a new SessionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @param message SessionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Verifies a SessionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionSpec; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @param message SessionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.SessionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SessionStatus. */ + interface ISessionStatus { + + /** SessionStatus active */ + active?: (boolean|null); + } + + /** Represents a SessionStatus. */ + class SessionStatus implements ISessionStatus { + + /** + * Constructs a new SessionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus); + + /** SessionStatus active. */ + public active: boolean; + + /** + * Creates a new SessionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus): google.cloud.dataplex.v1.Environment.SessionStatus; + + /** + * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @param message SessionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @param message SessionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionStatus; + + /** + * Decodes a SessionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionStatus; + + /** + * Verifies a SessionStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionStatus; + + /** + * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. + * @param message SessionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.SessionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Endpoints. */ + interface IEndpoints { + + /** Endpoints notebooks */ + notebooks?: (string|null); + + /** Endpoints sql */ + sql?: (string|null); + } + + /** Represents an Endpoints. */ + class Endpoints implements IEndpoints { + + /** + * Constructs a new Endpoints. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Environment.IEndpoints); + + /** Endpoints notebooks. */ + public notebooks: string; + + /** Endpoints sql. */ + public sql: string; + + /** + * Creates a new Endpoints instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoints instance + */ + public static create(properties?: google.cloud.dataplex.v1.Environment.IEndpoints): google.cloud.dataplex.v1.Environment.Endpoints; + + /** + * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @param message Endpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @param message Endpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.Endpoints; + + /** + * Decodes an Endpoints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.Endpoints; + + /** + * Verifies an Endpoints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoints + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.Endpoints; + + /** + * Creates a plain object from an Endpoints message. Also converts values to other types if specified. + * @param message Endpoints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Environment.Endpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Content. */ + interface IContent { + + /** Content name */ + name?: (string|null); + + /** Content uid */ + uid?: (string|null); + + /** Content path */ + path?: (string|null); + + /** Content createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Content updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Content labels */ + labels?: ({ [k: string]: string }|null); + + /** Content description */ + description?: (string|null); + + /** Content dataText */ + dataText?: (string|null); + + /** Content sqlScript */ + sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); + + /** Content notebook */ + notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); + } + + /** Represents a Content. */ + class Content implements IContent { + + /** + * Constructs a new Content. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IContent); + + /** Content name. */ + public name: string; + + /** Content uid. */ + public uid: string; + + /** Content path. */ + public path: string; + + /** Content createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Content updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Content labels. */ + public labels: { [k: string]: string }; + + /** Content description. */ + public description: string; + + /** Content dataText. */ + public dataText?: (string|null); + + /** Content sqlScript. */ + public sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); + + /** Content notebook. */ + public notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); + + /** Content data. */ + public data?: "dataText"; + + /** Content content. */ + public content?: ("sqlScript"|"notebook"); + + /** + * Creates a new Content instance using the specified properties. + * @param [properties] Properties to set + * @returns Content instance + */ + public static create(properties?: google.cloud.dataplex.v1.IContent): google.cloud.dataplex.v1.Content; + + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @param message Content message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Content message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content; + + /** + * Verifies a Content message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Content + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Content to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Content + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Content { + + /** Properties of a SqlScript. */ + interface ISqlScript { + + /** SqlScript engine */ + engine?: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null); + } + + /** Represents a SqlScript. */ + class SqlScript implements ISqlScript { + + /** + * Constructs a new SqlScript. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Content.ISqlScript); + + /** SqlScript engine. */ + public engine: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine); + + /** + * Creates a new SqlScript instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlScript instance + */ + public static create(properties?: google.cloud.dataplex.v1.Content.ISqlScript): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @param message SqlScript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @param message SqlScript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlScript message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Decodes a SqlScript message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Verifies a SqlScript message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlScript + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.SqlScript; + + /** + * Creates a plain object from a SqlScript message. Also converts values to other types if specified. + * @param message SqlScript + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Content.SqlScript, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlScript to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlScript + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SqlScript { + + /** QueryEngine enum. */ + enum QueryEngine { + QUERY_ENGINE_UNSPECIFIED = 0, + SPARK = 2 + } + } + + /** Properties of a Notebook. */ + interface INotebook { + + /** Notebook kernelType */ + kernelType?: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType|null); + } + + /** Represents a Notebook. */ + class Notebook implements INotebook { + + /** + * Constructs a new Notebook. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Content.INotebook); + + /** Notebook kernelType. */ + public kernelType: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType); + + /** + * Creates a new Notebook instance using the specified properties. + * @param [properties] Properties to set + * @returns Notebook instance + */ + public static create(properties?: google.cloud.dataplex.v1.Content.INotebook): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @param message Notebook message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Verifies a Notebook message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Notebook + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.Notebook; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @param message Notebook + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Content.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Notebook to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Notebook + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Notebook { + + /** KernelType enum. */ + enum KernelType { + KERNEL_TYPE_UNSPECIFIED = 0, + PYTHON3 = 1 + } + } + } + + /** Properties of a Session. */ + interface ISession { + + /** Session name */ + name?: (string|null); + + /** Session userId */ + userId?: (string|null); + + /** Session createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Session state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + } + + /** Represents a Session. */ + class Session implements ISession { + + /** + * Constructs a new Session. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISession); + + /** Session name. */ + public name: string; + + /** Session userId. */ + public userId: string; + + /** Session createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Session state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** + * Creates a new Session instance using the specified properties. + * @param [properties] Properties to set + * @returns Session instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISession): google.cloud.dataplex.v1.Session; + + /** + * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @param message Session message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @param message Session message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Session message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Session + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Session; + + /** + * Decodes a Session message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Session + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Session; + + /** + * Verifies a Session message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Session message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Session + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Session; + + /** + * Creates a plain object from a Session message. Also converts values to other types if specified. + * @param message Session + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Session, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Session to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Session + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Lake. */ + interface ILake { + + /** Lake name */ + name?: (string|null); + + /** Lake displayName */ + displayName?: (string|null); + + /** Lake uid */ + uid?: (string|null); + + /** Lake createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels */ + labels?: ({ [k: string]: string }|null); + + /** Lake description */ + description?: (string|null); + + /** Lake state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** Lake serviceAccount */ + serviceAccount?: (string|null); + + /** Lake metastore */ + metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus */ + metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + } + + /** Represents a Lake. */ + class Lake implements ILake { + + /** + * Constructs a new Lake. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ILake); + + /** Lake name. */ + public name: string; + + /** Lake displayName. */ + public displayName: string; + + /** Lake uid. */ + public uid: string; + + /** Lake createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Lake updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Lake labels. */ + public labels: { [k: string]: string }; + + /** Lake description. */ + public description: string; + + /** Lake state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** Lake serviceAccount. */ + public serviceAccount: string; + + /** Lake metastore. */ + public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); + + /** Lake assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** Lake metastoreStatus. */ + public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); + + /** + * Creates a new Lake instance using the specified properties. + * @param [properties] Properties to set + * @returns Lake instance + */ + public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @param message Lake message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; + + /** + * Verifies a Lake message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Lake + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @param message Lake + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Lake to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Lake + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Lake { + + /** Properties of a Metastore. */ + interface IMetastore { + + /** Metastore service */ + service?: (string|null); + } + + /** Represents a Metastore. */ + class Metastore implements IMetastore { + + /** + * Constructs a new Metastore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); + + /** Metastore service. */ + public service: string; + + /** + * Creates a new Metastore instance using the specified properties. + * @param [properties] Properties to set + * @returns Metastore instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @param message Metastore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Verifies a Metastore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metastore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @param message Metastore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metastore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metastore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetastoreStatus. */ + interface IMetastoreStatus { + + /** MetastoreStatus state */ + state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); + + /** MetastoreStatus message */ + message?: (string|null); + + /** MetastoreStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint */ + endpoint?: (string|null); + } + + /** Represents a MetastoreStatus. */ + class MetastoreStatus implements IMetastoreStatus { + + /** + * Constructs a new MetastoreStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); + + /** MetastoreStatus state. */ + public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); + + /** MetastoreStatus message. */ + public message: string; + + /** MetastoreStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetastoreStatus endpoint. */ + public endpoint: string; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns MetastoreStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @param message MetastoreStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Verifies a MetastoreStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetastoreStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @param message MetastoreStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetastoreStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetastoreStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetastoreStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NONE = 1, + READY = 2, + UPDATING = 3, + ERROR = 4 + } + } + } + + /** Properties of an AssetStatus. */ + interface IAssetStatus { + + /** AssetStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets */ + activeAssets?: (number|null); + + /** AssetStatus securityPolicyApplyingAssets */ + securityPolicyApplyingAssets?: (number|null); + } + + /** Represents an AssetStatus. */ + class AssetStatus implements IAssetStatus { + + /** + * Constructs a new AssetStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); + + /** AssetStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AssetStatus activeAssets. */ + public activeAssets: number; + + /** AssetStatus securityPolicyApplyingAssets. */ + public securityPolicyApplyingAssets: number; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AssetStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @param message AssetStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; + + /** + * Verifies an AssetStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssetStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @param message AssetStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssetStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssetStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Zone. */ + interface IZone { + + /** Zone name */ + name?: (string|null); + + /** Zone displayName */ + displayName?: (string|null); + + /** Zone uid */ + uid?: (string|null); + + /** Zone createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels */ + labels?: ({ [k: string]: string }|null); + + /** Zone description */ + description?: (string|null); + + /** Zone state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Zone type */ + type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); + + /** Zone discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus */ + assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + } + + /** Represents a Zone. */ + class Zone implements IZone { + + /** + * Constructs a new Zone. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IZone); + + /** Zone name. */ + public name: string; + + /** Zone displayName. */ + public displayName: string; + + /** Zone uid. */ + public uid: string; + + /** Zone createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Zone updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Zone labels. */ + public labels: { [k: string]: string }; + + /** Zone description. */ + public description: string; + + /** Zone state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Zone type. */ + public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); + + /** Zone discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); + + /** Zone resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); + + /** Zone assetStatus. */ + public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); + + /** + * Creates a new Zone instance using the specified properties. + * @param [properties] Properties to set + * @returns Zone instance + */ + public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @param message Zone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; + + /** + * Verifies a Zone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Zone + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @param message Zone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Zone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Zone + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Zone { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + RAW = 1, + CURATED = 2 + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec locationType */ + locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); + + /** ResourceSpec locationType. */ + public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceSpec { + + /** LocationType enum. */ + enum LocationType { + LOCATION_TYPE_UNSPECIFIED = 0, + SINGLE_REGION = 1, + MULTI_REGION = 2 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoverySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an Action. */ + interface IAction { + + /** Action category */ + category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); + + /** Action issue */ + issue?: (string|null); + + /** Action detectTime */ + detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name */ + name?: (string|null); + + /** Action lake */ + lake?: (string|null); + + /** Action zone */ + zone?: (string|null); + + /** Action asset */ + asset?: (string|null); + + /** Action dataLocations */ + dataLocations?: (string[]|null); + + /** Action invalidDataFormat */ + invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema */ + incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition */ + invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData */ + missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource */ + missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource */ + unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply */ + failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization */ + invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + } + + /** Represents an Action. */ + class Action implements IAction { + + /** + * Constructs a new Action. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAction); + + /** Action category. */ + public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); + + /** Action issue. */ + public issue: string; + + /** Action detectTime. */ + public detectTime?: (google.protobuf.ITimestamp|null); + + /** Action name. */ + public name: string; + + /** Action lake. */ + public lake: string; + + /** Action zone. */ + public zone: string; + + /** Action asset. */ + public asset: string; + + /** Action dataLocations. */ + public dataLocations: string[]; + + /** Action invalidDataFormat. */ + public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); + + /** Action incompatibleDataSchema. */ + public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); + + /** Action invalidDataPartition. */ + public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); + + /** Action missingData. */ + public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); + + /** Action missingResource. */ + public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); + + /** Action unauthorizedResource. */ + public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); + + /** Action failedSecurityPolicyApply. */ + public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); + + /** Action invalidDataOrganization. */ + public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); + + /** Action details. */ + public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); + + /** + * Creates a new Action instance using the specified properties. + * @param [properties] Properties to set + * @returns Action instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Action message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; + + /** + * Verifies an Action message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Action + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Action to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Action + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Action { + + /** Category enum. */ + enum Category { + CATEGORY_UNSPECIFIED = 0, + RESOURCE_MANAGEMENT = 1, + SECURITY_POLICY = 2, + DATA_DISCOVERY = 3 + } + + /** Properties of a MissingResource. */ + interface IMissingResource { + } + + /** Represents a MissingResource. */ + class MissingResource implements IMissingResource { + + /** + * Constructs a new MissingResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); + + /** + * Creates a new MissingResource instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @param message MissingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Verifies a MissingResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @param message MissingResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MissingResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UnauthorizedResource. */ + interface IUnauthorizedResource { + } + + /** Represents an UnauthorizedResource. */ + class UnauthorizedResource implements IUnauthorizedResource { + + /** + * Constructs a new UnauthorizedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); + + /** + * Creates a new UnauthorizedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns UnauthorizedResource instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @param message UnauthorizedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Verifies an UnauthorizedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnauthorizedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @param message UnauthorizedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnauthorizedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnauthorizedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FailedSecurityPolicyApply. */ + interface IFailedSecurityPolicyApply { + + /** FailedSecurityPolicyApply asset */ + asset?: (string|null); + } + + /** Represents a FailedSecurityPolicyApply. */ + class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { + + /** + * Constructs a new FailedSecurityPolicyApply. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); + + /** FailedSecurityPolicyApply asset. */ + public asset: string; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @param [properties] Properties to set + * @returns FailedSecurityPolicyApply instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @param message FailedSecurityPolicyApply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailedSecurityPolicyApply + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @param message FailedSecurityPolicyApply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FailedSecurityPolicyApply + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InvalidDataFormat. */ + interface IInvalidDataFormat { + + /** InvalidDataFormat sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** InvalidDataFormat expectedFormat */ + expectedFormat?: (string|null); + + /** InvalidDataFormat newFormat */ + newFormat?: (string|null); + } + + /** Represents an InvalidDataFormat. */ + class InvalidDataFormat implements IInvalidDataFormat { + + /** + * Constructs a new InvalidDataFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); + + /** InvalidDataFormat sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** InvalidDataFormat expectedFormat. */ + public expectedFormat: string; + + /** InvalidDataFormat newFormat. */ + public newFormat: string; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @param message InvalidDataFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Verifies an InvalidDataFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @param message InvalidDataFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IncompatibleDataSchema. */ + interface IIncompatibleDataSchema { + + /** IncompatibleDataSchema table */ + table?: (string|null); + + /** IncompatibleDataSchema existingSchema */ + existingSchema?: (string|null); + + /** IncompatibleDataSchema newSchema */ + newSchema?: (string|null); + + /** IncompatibleDataSchema sampledDataLocations */ + sampledDataLocations?: (string[]|null); + + /** IncompatibleDataSchema schemaChange */ + schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); + } + + /** Represents an IncompatibleDataSchema. */ + class IncompatibleDataSchema implements IIncompatibleDataSchema { + + /** + * Constructs a new IncompatibleDataSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); + + /** IncompatibleDataSchema table. */ + public table: string; + + /** IncompatibleDataSchema existingSchema. */ + public existingSchema: string; + + /** IncompatibleDataSchema newSchema. */ + public newSchema: string; + + /** IncompatibleDataSchema sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** IncompatibleDataSchema schemaChange. */ + public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns IncompatibleDataSchema instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @param message IncompatibleDataSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Verifies an IncompatibleDataSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncompatibleDataSchema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @param message IncompatibleDataSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncompatibleDataSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IncompatibleDataSchema { + + /** SchemaChange enum. */ + enum SchemaChange { + SCHEMA_CHANGE_UNSPECIFIED = 0, + INCOMPATIBLE = 1, + MODIFIED = 2 + } + } + + /** Properties of an InvalidDataPartition. */ + interface IInvalidDataPartition { + + /** InvalidDataPartition expectedStructure */ + expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); + } + + /** Represents an InvalidDataPartition. */ + class InvalidDataPartition implements IInvalidDataPartition { + + /** + * Constructs a new InvalidDataPartition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); + + /** InvalidDataPartition expectedStructure. */ + public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataPartition instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @param message InvalidDataPartition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Verifies an InvalidDataPartition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataPartition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @param message InvalidDataPartition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataPartition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataPartition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InvalidDataPartition { + + /** PartitionStructure enum. */ + enum PartitionStructure { + PARTITION_STRUCTURE_UNSPECIFIED = 0, + CONSISTENT_KEYS = 1, + HIVE_STYLE_KEYS = 2 + } + } + + /** Properties of a MissingData. */ + interface IMissingData { + } + + /** Represents a MissingData. */ + class MissingData implements IMissingData { + + /** + * Constructs a new MissingData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); + + /** + * Creates a new MissingData instance using the specified properties. + * @param [properties] Properties to set + * @returns MissingData instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @param message MissingData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Verifies a MissingData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MissingData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @param message MissingData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MissingData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MissingData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InvalidDataOrganization. */ + interface IInvalidDataOrganization { + } + + /** Represents an InvalidDataOrganization. */ + class InvalidDataOrganization implements IInvalidDataOrganization { + + /** + * Constructs a new InvalidDataOrganization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); + + /** + * Creates a new InvalidDataOrganization instance using the specified properties. + * @param [properties] Properties to set + * @returns InvalidDataOrganization instance + */ + public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @param message InvalidDataOrganization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Verifies an InvalidDataOrganization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvalidDataOrganization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @param message InvalidDataOrganization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvalidDataOrganization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Asset. */ + interface IAsset { + + /** Asset name */ + name?: (string|null); + + /** Asset displayName */ + displayName?: (string|null); + + /** Asset uid */ + uid?: (string|null); + + /** Asset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels */ + labels?: ({ [k: string]: string }|null); + + /** Asset description */ + description?: (string|null); + + /** Asset state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** Asset resourceSpec */ + resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus */ + resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus */ + securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec */ + discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus */ + discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + } + + /** Represents an Asset. */ + class Asset implements IAsset { + + /** + * Constructs a new Asset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAsset); + + /** Asset name. */ + public name: string; + + /** Asset displayName. */ + public displayName: string; + + /** Asset uid. */ + public uid: string; + + /** Asset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Asset updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Asset labels. */ + public labels: { [k: string]: string }; + + /** Asset description. */ + public description: string; + + /** Asset state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** Asset resourceSpec. */ + public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); + + /** Asset resourceStatus. */ + public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); + + /** Asset securityStatus. */ + public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); + + /** Asset discoverySpec. */ + public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); + + /** Asset discoveryStatus. */ + public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); + + /** + * Creates a new Asset instance using the specified properties. + * @param [properties] Properties to set + * @returns Asset instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @param message Asset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; + + /** + * Verifies an Asset message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Asset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @param message Asset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Asset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Asset + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Asset { + + /** Properties of a SecurityStatus. */ + interface ISecurityStatus { + + /** SecurityStatus state */ + state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); + + /** SecurityStatus message */ + message?: (string|null); + + /** SecurityStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SecurityStatus. */ + class SecurityStatus implements ISecurityStatus { + + /** + * Constructs a new SecurityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); + + /** SecurityStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); + + /** SecurityStatus message. */ + public message: string; + + /** SecurityStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @param message SecurityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Verifies a SecurityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @param message SecurityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + APPLYING = 2, + ERROR = 3 + } + } + + /** Properties of a DiscoverySpec. */ + interface IDiscoverySpec { + + /** DiscoverySpec enabled */ + enabled?: (boolean|null); + + /** DiscoverySpec includePatterns */ + includePatterns?: (string[]|null); + + /** DiscoverySpec excludePatterns */ + excludePatterns?: (string[]|null); + + /** DiscoverySpec csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule */ + schedule?: (string|null); + } + + /** Represents a DiscoverySpec. */ + class DiscoverySpec implements IDiscoverySpec { + + /** + * Constructs a new DiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); + + /** DiscoverySpec enabled. */ + public enabled: boolean; + + /** DiscoverySpec includePatterns. */ + public includePatterns: string[]; + + /** DiscoverySpec excludePatterns. */ + public excludePatterns: string[]; + + /** DiscoverySpec csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); + + /** DiscoverySpec jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); + + /** DiscoverySpec schedule. */ + public schedule?: (string|null); + + /** DiscoverySpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @param message DiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Verifies a DiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @param message DiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoverySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoverySpec { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions disableTypeInference */ + disableTypeInference?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions disableTypeInference. */ + public disableTypeInference: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResourceSpec. */ + interface IResourceSpec { + + /** ResourceSpec name */ + name?: (string|null); + + /** ResourceSpec type */ + type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); + + /** ResourceSpec readAccessMode */ + readAccessMode?: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null); + } + + /** Represents a ResourceSpec. */ + class ResourceSpec implements IResourceSpec { + + /** + * Constructs a new ResourceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); + + /** ResourceSpec name. */ + public name: string; + + /** ResourceSpec type. */ + public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); + + /** ResourceSpec readAccessMode. */ + public readAccessMode: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode); + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @param message ResourceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Verifies a ResourceSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @param message ResourceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + STORAGE_BUCKET = 1, + BIGQUERY_DATASET = 2 + } + + /** AccessMode enum. */ + enum AccessMode { + ACCESS_MODE_UNSPECIFIED = 0, + DIRECT = 1, + MANAGED = 2 + } + } + + /** Properties of a ResourceStatus. */ + interface IResourceStatus { + + /** ResourceStatus state */ + state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); + + /** ResourceStatus message */ + message?: (string|null); + + /** ResourceStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ResourceStatus managedAccessIdentity */ + managedAccessIdentity?: (string|null); + } + + /** Represents a ResourceStatus. */ + class ResourceStatus implements IResourceStatus { + + /** + * Constructs a new ResourceStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); + + /** ResourceStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); + + /** ResourceStatus message. */ + public message: string; + + /** ResourceStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ResourceStatus managedAccessIdentity. */ + public managedAccessIdentity: string; + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @param message ResourceStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Verifies a ResourceStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @param message ResourceStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + ERROR = 2 + } + } + + /** Properties of a DiscoveryStatus. */ + interface IDiscoveryStatus { + + /** DiscoveryStatus state */ + state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); + + /** DiscoveryStatus message */ + message?: (string|null); + + /** DiscoveryStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats */ + stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration */ + lastRunDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a DiscoveryStatus. */ + class DiscoveryStatus implements IDiscoveryStatus { + + /** + * Constructs a new DiscoveryStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); + + /** DiscoveryStatus state. */ + public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); + + /** DiscoveryStatus message. */ + public message: string; + + /** DiscoveryStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryStatus stats. */ + public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); + + /** DiscoveryStatus lastRunDuration. */ + public lastRunDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @param message DiscoveryStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Verifies a DiscoveryStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @param message DiscoveryStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryStatus { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SCHEDULED = 1, + IN_PROGRESS = 2, + PAUSED = 3, + DISABLED = 5 + } + + /** Properties of a Stats. */ + interface IStats { + + /** Stats dataItems */ + dataItems?: (number|Long|string|null); + + /** Stats dataSize */ + dataSize?: (number|Long|string|null); + + /** Stats tables */ + tables?: (number|Long|string|null); + + /** Stats filesets */ + filesets?: (number|Long|string|null); + } + + /** Represents a Stats. */ + class Stats implements IStats { + + /** + * Constructs a new Stats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); + + /** Stats dataItems. */ + public dataItems: (number|Long|string); + + /** Stats dataSize. */ + public dataSize: (number|Long|string); + + /** Stats tables. */ + public tables: (number|Long|string); + + /** Stats filesets. */ + public filesets: (number|Long|string); + + /** + * Creates a new Stats instance using the specified properties. + * @param [properties] Properties to set + * @returns Stats instance + */ + public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @param message Stats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Verifies a Stats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @param message Stats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Stats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + CREATING = 2, + DELETING = 3, + ACTION_REQUIRED = 4 + } + + /** Represents a CatalogService */ + class CatalogService extends $protobuf.rpc.Service { + + /** + * Constructs a new CatalogService 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 CatalogService 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): CatalogService; + + /** + * Calls CreateEntryType. + * @param request CreateEntryTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEntryType(request: google.cloud.dataplex.v1.ICreateEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryTypeCallback): void; + + /** + * Calls CreateEntryType. + * @param request CreateEntryTypeRequest message or plain object + * @returns Promise + */ + public createEntryType(request: google.cloud.dataplex.v1.ICreateEntryTypeRequest): Promise; + + /** + * Calls UpdateEntryType. + * @param request UpdateEntryTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEntryType(request: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryTypeCallback): void; + + /** + * Calls UpdateEntryType. + * @param request UpdateEntryTypeRequest message or plain object + * @returns Promise + */ + public updateEntryType(request: google.cloud.dataplex.v1.IUpdateEntryTypeRequest): Promise; + + /** + * Calls DeleteEntryType. + * @param request DeleteEntryTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEntryType(request: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryTypeCallback): void; + + /** + * Calls DeleteEntryType. + * @param request DeleteEntryTypeRequest message or plain object + * @returns Promise + */ + public deleteEntryType(request: google.cloud.dataplex.v1.IDeleteEntryTypeRequest): Promise; + + /** + * Calls ListEntryTypes. + * @param request ListEntryTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntryTypesResponse + */ + public listEntryTypes(request: google.cloud.dataplex.v1.IListEntryTypesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntryTypesCallback): void; + + /** + * Calls ListEntryTypes. + * @param request ListEntryTypesRequest message or plain object + * @returns Promise + */ + public listEntryTypes(request: google.cloud.dataplex.v1.IListEntryTypesRequest): Promise; + + /** + * Calls GetEntryType. + * @param request GetEntryTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntryType + */ + public getEntryType(request: google.cloud.dataplex.v1.IGetEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryTypeCallback): void; + + /** + * Calls GetEntryType. + * @param request GetEntryTypeRequest message or plain object + * @returns Promise + */ + public getEntryType(request: google.cloud.dataplex.v1.IGetEntryTypeRequest): Promise; + + /** + * Calls CreateAspectType. + * @param request CreateAspectTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAspectType(request: google.cloud.dataplex.v1.ICreateAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateAspectTypeCallback): void; + + /** + * Calls CreateAspectType. + * @param request CreateAspectTypeRequest message or plain object + * @returns Promise + */ + public createAspectType(request: google.cloud.dataplex.v1.ICreateAspectTypeRequest): Promise; + + /** + * Calls UpdateAspectType. + * @param request UpdateAspectTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAspectType(request: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateAspectTypeCallback): void; + + /** + * Calls UpdateAspectType. + * @param request UpdateAspectTypeRequest message or plain object + * @returns Promise + */ + public updateAspectType(request: google.cloud.dataplex.v1.IUpdateAspectTypeRequest): Promise; + + /** + * Calls DeleteAspectType. + * @param request DeleteAspectTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAspectType(request: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteAspectTypeCallback): void; + + /** + * Calls DeleteAspectType. + * @param request DeleteAspectTypeRequest message or plain object + * @returns Promise + */ + public deleteAspectType(request: google.cloud.dataplex.v1.IDeleteAspectTypeRequest): Promise; + + /** + * Calls ListAspectTypes. + * @param request ListAspectTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAspectTypesResponse + */ + public listAspectTypes(request: google.cloud.dataplex.v1.IListAspectTypesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListAspectTypesCallback): void; + + /** + * Calls ListAspectTypes. + * @param request ListAspectTypesRequest message or plain object + * @returns Promise + */ + public listAspectTypes(request: google.cloud.dataplex.v1.IListAspectTypesRequest): Promise; + + /** + * Calls GetAspectType. + * @param request GetAspectTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AspectType + */ + public getAspectType(request: google.cloud.dataplex.v1.IGetAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.GetAspectTypeCallback): void; + + /** + * Calls GetAspectType. + * @param request GetAspectTypeRequest message or plain object + * @returns Promise + */ + public getAspectType(request: google.cloud.dataplex.v1.IGetAspectTypeRequest): Promise; + + /** + * Calls CreateEntryGroup. + * @param request CreateEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEntryGroup(request: google.cloud.dataplex.v1.ICreateEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryGroupCallback): void; + + /** + * Calls CreateEntryGroup. + * @param request CreateEntryGroupRequest message or plain object + * @returns Promise + */ + public createEntryGroup(request: google.cloud.dataplex.v1.ICreateEntryGroupRequest): Promise; + + /** + * Calls UpdateEntryGroup. + * @param request UpdateEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEntryGroup(request: google.cloud.dataplex.v1.IUpdateEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryGroupCallback): void; + + /** + * Calls UpdateEntryGroup. + * @param request UpdateEntryGroupRequest message or plain object + * @returns Promise + */ + public updateEntryGroup(request: google.cloud.dataplex.v1.IUpdateEntryGroupRequest): Promise; + + /** + * Calls DeleteEntryGroup. + * @param request DeleteEntryGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEntryGroup(request: google.cloud.dataplex.v1.IDeleteEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryGroupCallback): void; + + /** + * Calls DeleteEntryGroup. + * @param request DeleteEntryGroupRequest message or plain object + * @returns Promise + */ + public deleteEntryGroup(request: google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntryGroupsCallback): void; + + /** + * Calls ListEntryGroups. + * @param request ListEntryGroupsRequest message or plain object + * @returns Promise + */ + public listEntryGroups(request: google.cloud.dataplex.v1.IListEntryGroupsRequest): 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.dataplex.v1.IGetEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryGroupCallback): void; + + /** + * Calls GetEntryGroup. + * @param request GetEntryGroupRequest message or plain object + * @returns Promise + */ + public getEntryGroup(request: google.cloud.dataplex.v1.IGetEntryGroupRequest): 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.dataplex.v1.ICreateEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryCallback): void; + + /** + * Calls CreateEntry. + * @param request CreateEntryRequest message or plain object + * @returns Promise + */ + public createEntry(request: google.cloud.dataplex.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.dataplex.v1.IUpdateEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryCallback): void; + + /** + * Calls UpdateEntry. + * @param request UpdateEntryRequest message or plain object + * @returns Promise + */ + public updateEntry(request: google.cloud.dataplex.v1.IUpdateEntryRequest): Promise; + + /** + * Calls DeleteEntry. + * @param request DeleteEntryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entry + */ + public deleteEntry(request: google.cloud.dataplex.v1.IDeleteEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryCallback): void; + + /** + * Calls DeleteEntry. + * @param request DeleteEntryRequest message or plain object + * @returns Promise + */ + public deleteEntry(request: google.cloud.dataplex.v1.IDeleteEntryRequest): 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.dataplex.v1.IListEntriesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntriesCallback): void; + + /** + * Calls ListEntries. + * @param request ListEntriesRequest message or plain object + * @returns Promise + */ + public listEntries(request: google.cloud.dataplex.v1.IListEntriesRequest): 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.dataplex.v1.IGetEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryCallback): void; + + /** + * Calls GetEntry. + * @param request GetEntryRequest message or plain object + * @returns Promise + */ + public getEntry(request: google.cloud.dataplex.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.dataplex.v1.ILookupEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.LookupEntryCallback): void; + + /** + * Calls LookupEntry. + * @param request LookupEntryRequest message or plain object + * @returns Promise + */ + public lookupEntry(request: google.cloud.dataplex.v1.ILookupEntryRequest): Promise; + + /** + * Calls SearchEntries. + * @param request SearchEntriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchEntriesResponse + */ + public searchEntries(request: google.cloud.dataplex.v1.ISearchEntriesRequest, callback: google.cloud.dataplex.v1.CatalogService.SearchEntriesCallback): void; + + /** + * Calls SearchEntries. + * @param request SearchEntriesRequest message or plain object + * @returns Promise + */ + public searchEntries(request: google.cloud.dataplex.v1.ISearchEntriesRequest): Promise; + + /** + * Calls CreateMetadataJob. + * @param request CreateMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback): void; + + /** + * Calls CreateMetadataJob. + * @param request CreateMetadataJobRequest message or plain object + * @returns Promise + */ + public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest): Promise; + + /** + * Calls GetMetadataJob. + * @param request GetMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetadataJob + */ + public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback): void; + + /** + * Calls GetMetadataJob. + * @param request GetMetadataJobRequest message or plain object + * @returns Promise + */ + public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest): Promise; + + /** + * Calls ListMetadataJobs. + * @param request ListMetadataJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetadataJobsResponse + */ + public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest, callback: google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback): void; + + /** + * Calls ListMetadataJobs. + * @param request ListMetadataJobsRequest message or plain object + * @returns Promise + */ + public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest): Promise; + + /** + * Calls CancelMetadataJob. + * @param request CancelMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback): void; + + /** + * Calls CancelMetadataJob. + * @param request CancelMetadataJobRequest message or plain object + * @returns Promise + */ + public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest): Promise; + } + + namespace CatalogService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryType}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryType}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryType}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryTypes}. + * @param error Error, if any + * @param [response] ListEntryTypesResponse + */ + type ListEntryTypesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntryTypesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryType}. + * @param error Error, if any + * @param [response] EntryType + */ + type GetEntryTypeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.EntryType) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createAspectType}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateAspectType}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteAspectType}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listAspectTypes}. + * @param error Error, if any + * @param [response] ListAspectTypesResponse + */ + type ListAspectTypesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAspectTypesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getAspectType}. + * @param error Error, if any + * @param [response] AspectType + */ + type GetAspectTypeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.AspectType) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryGroups}. + * @param error Error, if any + * @param [response] ListEntryGroupsResponse + */ + type ListEntryGroupsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntryGroupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryGroup}. + * @param error Error, if any + * @param [response] EntryGroup + */ + type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.EntryGroup) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type CreateEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type DeleteEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntries}. + * @param error Error, if any + * @param [response] ListEntriesResponse + */ + type ListEntriesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type GetEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|lookupEntry}. + * @param error Error, if any + * @param [response] Entry + */ + type LookupEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|searchEntries}. + * @param error Error, if any + * @param [response] SearchEntriesResponse + */ + type SearchEntriesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.SearchEntriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMetadataJobCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. + * @param error Error, if any + * @param [response] MetadataJob + */ + type GetMetadataJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.MetadataJob) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. + * @param error Error, if any + * @param [response] ListMetadataJobsResponse + */ + type ListMetadataJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListMetadataJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelMetadataJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of an AspectType. */ + interface IAspectType { + + /** AspectType name */ + name?: (string|null); + + /** AspectType uid */ + uid?: (string|null); + + /** AspectType createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AspectType updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AspectType description */ + description?: (string|null); + + /** AspectType displayName */ + displayName?: (string|null); + + /** AspectType labels */ + labels?: ({ [k: string]: string }|null); + + /** AspectType etag */ + etag?: (string|null); + + /** AspectType authorization */ + authorization?: (google.cloud.dataplex.v1.AspectType.IAuthorization|null); + + /** AspectType metadataTemplate */ + metadataTemplate?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** AspectType transferStatus */ + transferStatus?: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus|null); + } + + /** Represents an AspectType. */ + class AspectType implements IAspectType { + + /** + * Constructs a new AspectType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAspectType); + + /** AspectType name. */ + public name: string; + + /** AspectType uid. */ + public uid: string; + + /** AspectType createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AspectType updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AspectType description. */ + public description: string; + + /** AspectType displayName. */ + public displayName: string; + + /** AspectType labels. */ + public labels: { [k: string]: string }; + + /** AspectType etag. */ + public etag: string; + + /** AspectType authorization. */ + public authorization?: (google.cloud.dataplex.v1.AspectType.IAuthorization|null); + + /** AspectType metadataTemplate. */ + public metadataTemplate?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** AspectType transferStatus. */ + public transferStatus: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus); + + /** + * Creates a new AspectType instance using the specified properties. + * @param [properties] Properties to set + * @returns AspectType instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAspectType): google.cloud.dataplex.v1.AspectType; + + /** + * Encodes the specified AspectType message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. + * @param message AspectType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAspectType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AspectType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. + * @param message AspectType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAspectType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AspectType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AspectType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType; + + /** + * Decodes an AspectType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AspectType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType; + + /** + * Verifies an AspectType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AspectType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AspectType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType; + + /** + * Creates a plain object from an AspectType message. Also converts values to other types if specified. + * @param message AspectType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AspectType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AspectType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AspectType { + + /** Properties of an Authorization. */ + interface IAuthorization { + + /** Authorization alternateUsePermission */ + alternateUsePermission?: (string|null); + } + + /** Represents an Authorization. */ + class Authorization implements IAuthorization { + + /** + * Constructs a new Authorization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.AspectType.IAuthorization); + + /** Authorization alternateUsePermission. */ + public alternateUsePermission: string; + + /** + * Creates a new Authorization instance using the specified properties. + * @param [properties] Properties to set + * @returns Authorization instance + */ + public static create(properties?: google.cloud.dataplex.v1.AspectType.IAuthorization): google.cloud.dataplex.v1.AspectType.Authorization; + + /** + * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. + * @param message Authorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.AspectType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. + * @param message Authorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Authorization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.Authorization; + + /** + * Decodes an Authorization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.Authorization; + + /** + * Verifies an Authorization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Authorization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Authorization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.Authorization; + + /** + * Creates a plain object from an Authorization message. Also converts values to other types if specified. + * @param message Authorization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectType.Authorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Authorization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Authorization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataTemplate. */ + interface IMetadataTemplate { + + /** MetadataTemplate index */ + index?: (number|null); + + /** MetadataTemplate name */ + name?: (string|null); + + /** MetadataTemplate type */ + type?: (string|null); + + /** MetadataTemplate recordFields */ + recordFields?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate[]|null); + + /** MetadataTemplate enumValues */ + enumValues?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue[]|null); + + /** MetadataTemplate mapItems */ + mapItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** MetadataTemplate arrayItems */ + arrayItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** MetadataTemplate typeId */ + typeId?: (string|null); + + /** MetadataTemplate typeRef */ + typeRef?: (string|null); + + /** MetadataTemplate constraints */ + constraints?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null); + + /** MetadataTemplate annotations */ + annotations?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null); + } + + /** Represents a MetadataTemplate. */ + class MetadataTemplate implements IMetadataTemplate { + + /** + * Constructs a new MetadataTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.AspectType.IMetadataTemplate); + + /** MetadataTemplate index. */ + public index: number; + + /** MetadataTemplate name. */ + public name: string; + + /** MetadataTemplate type. */ + public type: string; + + /** MetadataTemplate recordFields. */ + public recordFields: google.cloud.dataplex.v1.AspectType.IMetadataTemplate[]; + + /** MetadataTemplate enumValues. */ + public enumValues: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue[]; + + /** MetadataTemplate mapItems. */ + public mapItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** MetadataTemplate arrayItems. */ + public arrayItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); + + /** MetadataTemplate typeId. */ + public typeId: string; + + /** MetadataTemplate typeRef. */ + public typeRef: string; + + /** MetadataTemplate constraints. */ + public constraints?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null); + + /** MetadataTemplate annotations. */ + public annotations?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null); + + /** + * Creates a new MetadataTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataTemplate instance + */ + public static create(properties?: google.cloud.dataplex.v1.AspectType.IMetadataTemplate): google.cloud.dataplex.v1.AspectType.MetadataTemplate; + + /** + * Encodes the specified MetadataTemplate message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. + * @param message MetadataTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.AspectType.IMetadataTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataTemplate message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. + * @param message MetadataTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.IMetadataTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate; + + /** + * Decodes a MetadataTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate; + + /** + * Verifies a MetadataTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate; + + /** + * Creates a plain object from a MetadataTemplate message. Also converts values to other types if specified. + * @param message MetadataTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetadataTemplate { + + /** Properties of an EnumValue. */ + interface IEnumValue { + + /** EnumValue index */ + index?: (number|null); + + /** EnumValue name */ + name?: (string|null); + + /** EnumValue deprecated */ + deprecated?: (string|null); + } + + /** Represents an EnumValue. */ + class EnumValue implements IEnumValue { + + /** + * Constructs a new EnumValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue); + + /** EnumValue index. */ + public index: number; + + /** EnumValue name. */ + public name: string; + + /** EnumValue deprecated. */ + public deprecated: string; + + /** + * Creates a new EnumValue instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValue instance + */ + public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue): google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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 Constraints. */ + interface IConstraints { + + /** Constraints required */ + required?: (boolean|null); + } + + /** Represents a Constraints. */ + class Constraints implements IConstraints { + + /** + * Constructs a new Constraints. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints); + + /** Constraints required. */ + public required: boolean; + + /** + * Creates a new Constraints instance using the specified properties. + * @param [properties] Properties to set + * @returns Constraints instance + */ + public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; + + /** + * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. + * @param message Constraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. + * @param message Constraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Constraints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Constraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; + + /** + * Decodes a Constraints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Constraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; + + /** + * Verifies a Constraints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Constraints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Constraints + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; + + /** + * Creates a plain object from a Constraints message. Also converts values to other types if specified. + * @param message Constraints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Constraints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Constraints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Annotations. */ + interface IAnnotations { + + /** Annotations deprecated */ + deprecated?: (string|null); + + /** Annotations displayName */ + displayName?: (string|null); + + /** Annotations description */ + description?: (string|null); + + /** Annotations displayOrder */ + displayOrder?: (number|null); + + /** Annotations stringType */ + stringType?: (string|null); + + /** Annotations stringValues */ + stringValues?: (string[]|null); + } + + /** Represents an Annotations. */ + class Annotations implements IAnnotations { + + /** + * Constructs a new Annotations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations); + + /** Annotations deprecated. */ + public deprecated: string; + + /** Annotations displayName. */ + public displayName: string; + + /** Annotations description. */ + public description: string; + + /** Annotations displayOrder. */ + public displayOrder: number; + + /** Annotations stringType. */ + public stringType: string; + + /** Annotations stringValues. */ + public stringValues: string[]; + + /** + * Creates a new Annotations instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotations instance + */ + public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; + + /** + * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. + * @param message Annotations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. + * @param message Annotations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; + + /** + * Decodes an Annotations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; + + /** + * Verifies an Annotations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; + + /** + * Creates a plain object from an Annotations message. Also converts values to other types if specified. + * @param message Annotations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotations + * @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 uid */ + uid?: (string|null); + + /** EntryGroup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** EntryGroup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** EntryGroup description */ + description?: (string|null); + + /** EntryGroup displayName */ + displayName?: (string|null); + + /** EntryGroup labels */ + labels?: ({ [k: string]: string }|null); + + /** EntryGroup etag */ + etag?: (string|null); + + /** EntryGroup transferStatus */ + transferStatus?: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus|null); + } + + /** Represents an EntryGroup. */ + class EntryGroup implements IEntryGroup { + + /** + * Constructs a new EntryGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntryGroup); + + /** EntryGroup name. */ + public name: string; + + /** EntryGroup uid. */ + public uid: string; + + /** EntryGroup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** EntryGroup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** EntryGroup description. */ + public description: string; + + /** EntryGroup displayName. */ + public displayName: string; + + /** EntryGroup labels. */ + public labels: { [k: string]: string }; + + /** EntryGroup etag. */ + public etag: string; + + /** EntryGroup transferStatus. */ + public transferStatus: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus); + + /** + * Creates a new EntryGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns EntryGroup instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntryGroup): google.cloud.dataplex.v1.EntryGroup; + + /** + * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 an EntryType. */ + interface IEntryType { + + /** EntryType name */ + name?: (string|null); + + /** EntryType uid */ + uid?: (string|null); + + /** EntryType createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** EntryType updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** EntryType description */ + description?: (string|null); + + /** EntryType displayName */ + displayName?: (string|null); + + /** EntryType labels */ + labels?: ({ [k: string]: string }|null); + + /** EntryType etag */ + etag?: (string|null); + + /** EntryType typeAliases */ + typeAliases?: (string[]|null); + + /** EntryType platform */ + platform?: (string|null); + + /** EntryType system */ + system?: (string|null); + + /** EntryType requiredAspects */ + requiredAspects?: (google.cloud.dataplex.v1.EntryType.IAspectInfo[]|null); + + /** EntryType authorization */ + authorization?: (google.cloud.dataplex.v1.EntryType.IAuthorization|null); + } + + /** Represents an EntryType. */ + class EntryType implements IEntryType { + + /** + * Constructs a new EntryType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntryType); + + /** EntryType name. */ + public name: string; + + /** EntryType uid. */ + public uid: string; + + /** EntryType createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** EntryType updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** EntryType description. */ + public description: string; + + /** EntryType displayName. */ + public displayName: string; + + /** EntryType labels. */ + public labels: { [k: string]: string }; + + /** EntryType etag. */ + public etag: string; + + /** EntryType typeAliases. */ + public typeAliases: string[]; + + /** EntryType platform. */ + public platform: string; + + /** EntryType system. */ + public system: string; + + /** EntryType requiredAspects. */ + public requiredAspects: google.cloud.dataplex.v1.EntryType.IAspectInfo[]; + + /** EntryType authorization. */ + public authorization?: (google.cloud.dataplex.v1.EntryType.IAuthorization|null); + + /** + * Creates a new EntryType instance using the specified properties. + * @param [properties] Properties to set + * @returns EntryType instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntryType): google.cloud.dataplex.v1.EntryType; + + /** + * Encodes the specified EntryType message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. + * @param message EntryType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntryType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntryType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. + * @param message EntryType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntryType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntryType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntryType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType; + + /** + * Decodes an EntryType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntryType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType; + + /** + * Verifies an EntryType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntryType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntryType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType; + + /** + * Creates a plain object from an EntryType message. Also converts values to other types if specified. + * @param message EntryType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.EntryType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntryType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntryType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EntryType { + + /** Properties of an AspectInfo. */ + interface IAspectInfo { + + /** AspectInfo type */ + type?: (string|null); + } + + /** Represents an AspectInfo. */ + class AspectInfo implements IAspectInfo { + + /** + * Constructs a new AspectInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.EntryType.IAspectInfo); + + /** AspectInfo type. */ + public type: string; + + /** + * Creates a new AspectInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AspectInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.EntryType.IAspectInfo): google.cloud.dataplex.v1.EntryType.AspectInfo; + + /** + * Encodes the specified AspectInfo message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. + * @param message AspectInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.EntryType.IAspectInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AspectInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. + * @param message AspectInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.EntryType.IAspectInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AspectInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AspectInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType.AspectInfo; + + /** + * Decodes an AspectInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AspectInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType.AspectInfo; + + /** + * Verifies an AspectInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AspectInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AspectInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType.AspectInfo; + + /** + * Creates a plain object from an AspectInfo message. Also converts values to other types if specified. + * @param message AspectInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.EntryType.AspectInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AspectInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AspectInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Authorization. */ + interface IAuthorization { + + /** Authorization alternateUsePermission */ + alternateUsePermission?: (string|null); + } + + /** Represents an Authorization. */ + class Authorization implements IAuthorization { + + /** + * Constructs a new Authorization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.EntryType.IAuthorization); + + /** Authorization alternateUsePermission. */ + public alternateUsePermission: string; + + /** + * Creates a new Authorization instance using the specified properties. + * @param [properties] Properties to set + * @returns Authorization instance + */ + public static create(properties?: google.cloud.dataplex.v1.EntryType.IAuthorization): google.cloud.dataplex.v1.EntryType.Authorization; + + /** + * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. + * @param message Authorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.EntryType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. + * @param message Authorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.EntryType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Authorization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType.Authorization; + + /** + * Decodes an Authorization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType.Authorization; + + /** + * Verifies an Authorization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Authorization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Authorization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType.Authorization; + + /** + * Creates a plain object from an Authorization message. Also converts values to other types if specified. + * @param message Authorization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.EntryType.Authorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Authorization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Authorization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Aspect. */ + interface IAspect { + + /** Aspect aspectType */ + aspectType?: (string|null); + + /** Aspect path */ + path?: (string|null); + + /** Aspect createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Aspect updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Aspect data */ + data?: (google.protobuf.IStruct|null); + + /** Aspect aspectSource */ + aspectSource?: (google.cloud.dataplex.v1.IAspectSource|null); + } + + /** Represents an Aspect. */ + class Aspect implements IAspect { + + /** + * Constructs a new Aspect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAspect); + + /** Aspect aspectType. */ + public aspectType: string; + + /** Aspect path. */ + public path: string; + + /** Aspect createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Aspect updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Aspect data. */ + public data?: (google.protobuf.IStruct|null); + + /** Aspect aspectSource. */ + public aspectSource?: (google.cloud.dataplex.v1.IAspectSource|null); + + /** + * Creates a new Aspect instance using the specified properties. + * @param [properties] Properties to set + * @returns Aspect instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAspect): google.cloud.dataplex.v1.Aspect; + + /** + * Encodes the specified Aspect message. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. + * @param message Aspect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAspect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aspect message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. + * @param message Aspect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAspect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aspect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aspect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Aspect; + + /** + * Decodes an Aspect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aspect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Aspect; + + /** + * Verifies an Aspect message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Aspect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aspect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Aspect; + + /** + * Creates a plain object from an Aspect message. Also converts values to other types if specified. + * @param message Aspect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Aspect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aspect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aspect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AspectSource. */ + interface IAspectSource { + + /** AspectSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AspectSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AspectSource dataVersion */ + dataVersion?: (string|null); + } + + /** Represents an AspectSource. */ + class AspectSource implements IAspectSource { + + /** + * Constructs a new AspectSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IAspectSource); + + /** AspectSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AspectSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AspectSource dataVersion. */ + public dataVersion: string; + + /** + * Creates a new AspectSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AspectSource instance + */ + public static create(properties?: google.cloud.dataplex.v1.IAspectSource): google.cloud.dataplex.v1.AspectSource; + + /** + * Encodes the specified AspectSource message. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. + * @param message AspectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IAspectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AspectSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. + * @param message AspectSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IAspectSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AspectSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AspectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectSource; + + /** + * Decodes an AspectSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AspectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectSource; + + /** + * Verifies an AspectSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AspectSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AspectSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectSource; + + /** + * Creates a plain object from an AspectSource message. Also converts values to other types if specified. + * @param message AspectSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.AspectSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AspectSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AspectSource + * @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 entryType */ + entryType?: (string|null); + + /** Entry createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Entry updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entry aspects */ + aspects?: ({ [k: string]: google.cloud.dataplex.v1.IAspect }|null); + + /** Entry parentEntry */ + parentEntry?: (string|null); + + /** Entry fullyQualifiedName */ + fullyQualifiedName?: (string|null); + + /** Entry entrySource */ + entrySource?: (google.cloud.dataplex.v1.IEntrySource|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntry); + + /** Entry name. */ + public name: string; + + /** Entry entryType. */ + public entryType: string; + + /** Entry createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Entry updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Entry aspects. */ + public aspects: { [k: string]: google.cloud.dataplex.v1.IAspect }; + + /** Entry parentEntry. */ + public parentEntry: string; + + /** Entry fullyQualifiedName. */ + public fullyQualifiedName: string; + + /** Entry entrySource. */ + public entrySource?: (google.cloud.dataplex.v1.IEntrySource|null); + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntry): google.cloud.dataplex.v1.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 an EntrySource. */ + interface IEntrySource { + + /** EntrySource resource */ + resource?: (string|null); + + /** EntrySource system */ + system?: (string|null); + + /** EntrySource platform */ + platform?: (string|null); + + /** EntrySource displayName */ + displayName?: (string|null); + + /** EntrySource description */ + description?: (string|null); + + /** EntrySource labels */ + labels?: ({ [k: string]: string }|null); + + /** EntrySource ancestors */ + ancestors?: (google.cloud.dataplex.v1.EntrySource.IAncestor[]|null); + + /** EntrySource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** EntrySource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** EntrySource location */ + location?: (string|null); + } + + /** Represents an EntrySource. */ + class EntrySource implements IEntrySource { + + /** + * Constructs a new EntrySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntrySource); + + /** EntrySource resource. */ + public resource: string; + + /** EntrySource system. */ + public system: string; + + /** EntrySource platform. */ + public platform: string; + + /** EntrySource displayName. */ + public displayName: string; + + /** EntrySource description. */ + public description: string; + + /** EntrySource labels. */ + public labels: { [k: string]: string }; + + /** EntrySource ancestors. */ + public ancestors: google.cloud.dataplex.v1.EntrySource.IAncestor[]; + + /** EntrySource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** EntrySource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** EntrySource location. */ + public location: string; + + /** + * Creates a new EntrySource instance using the specified properties. + * @param [properties] Properties to set + * @returns EntrySource instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntrySource): google.cloud.dataplex.v1.EntrySource; + + /** + * Encodes the specified EntrySource message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. + * @param message EntrySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntrySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntrySource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. + * @param message EntrySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntrySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntrySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntrySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntrySource; + + /** + * Decodes an EntrySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntrySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntrySource; + + /** + * Verifies an EntrySource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntrySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntrySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntrySource; + + /** + * Creates a plain object from an EntrySource message. Also converts values to other types if specified. + * @param message EntrySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.EntrySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntrySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntrySource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EntrySource { + + /** Properties of an Ancestor. */ + interface IAncestor { + + /** Ancestor name */ + name?: (string|null); + + /** Ancestor type */ + type?: (string|null); + } + + /** Represents an Ancestor. */ + class Ancestor implements IAncestor { + + /** + * Constructs a new Ancestor. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.EntrySource.IAncestor); + + /** Ancestor name. */ + public name: string; + + /** Ancestor type. */ + public type: string; + + /** + * Creates a new Ancestor instance using the specified properties. + * @param [properties] Properties to set + * @returns Ancestor instance + */ + public static create(properties?: google.cloud.dataplex.v1.EntrySource.IAncestor): google.cloud.dataplex.v1.EntrySource.Ancestor; + + /** + * Encodes the specified Ancestor message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. + * @param message Ancestor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.EntrySource.IAncestor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Ancestor message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. + * @param message Ancestor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.EntrySource.IAncestor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Ancestor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Ancestor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntrySource.Ancestor; + + /** + * Decodes an Ancestor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Ancestor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntrySource.Ancestor; + + /** + * Verifies an Ancestor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Ancestor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Ancestor + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntrySource.Ancestor; + + /** + * Creates a plain object from an Ancestor message. Also converts values to other types if specified. + * @param message Ancestor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.EntrySource.Ancestor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Ancestor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Ancestor + * @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.dataplex.v1.IEntryGroup|null); + + /** CreateEntryGroupRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEntryGroupRequest. */ + class CreateEntryGroupRequest implements ICreateEntryGroupRequest { + + /** + * Constructs a new CreateEntryGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEntryGroupRequest); + + /** CreateEntryGroupRequest parent. */ + public parent: string; + + /** CreateEntryGroupRequest entryGroupId. */ + public entryGroupId: string; + + /** CreateEntryGroupRequest entryGroup. */ + public entryGroup?: (google.cloud.dataplex.v1.IEntryGroup|null); + + /** CreateEntryGroupRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEntryGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntryGroupRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateEntryGroupRequest): google.cloud.dataplex.v1.CreateEntryGroupRequest; + + /** + * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntryGroup|null); + + /** UpdateEntryGroupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryGroupRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEntryGroupRequest. */ + class UpdateEntryGroupRequest implements IUpdateEntryGroupRequest { + + /** + * Constructs a new UpdateEntryGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryGroupRequest); + + /** UpdateEntryGroupRequest entryGroup. */ + public entryGroup?: (google.cloud.dataplex.v1.IEntryGroup|null); + + /** UpdateEntryGroupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryGroupRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEntryGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntryGroupRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryGroupRequest): google.cloud.dataplex.v1.UpdateEntryGroupRequest; + + /** + * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 DeleteEntryGroupRequest. */ + interface IDeleteEntryGroupRequest { + + /** DeleteEntryGroupRequest name */ + name?: (string|null); + + /** DeleteEntryGroupRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteEntryGroupRequest. */ + class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { + + /** + * Constructs a new DeleteEntryGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteEntryGroupRequest); + + /** DeleteEntryGroupRequest name. */ + public name: string; + + /** DeleteEntryGroupRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteEntryGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntryGroupRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteEntryGroupRequest): google.cloud.dataplex.v1.DeleteEntryGroupRequest; + + /** + * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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); + + /** ListEntryGroupsRequest filter */ + filter?: (string|null); + + /** ListEntryGroupsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListEntryGroupsRequest. */ + class ListEntryGroupsRequest implements IListEntryGroupsRequest { + + /** + * Constructs a new ListEntryGroupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntryGroupsRequest); + + /** ListEntryGroupsRequest parent. */ + public parent: string; + + /** ListEntryGroupsRequest pageSize. */ + public pageSize: number; + + /** ListEntryGroupsRequest pageToken. */ + public pageToken: string; + + /** ListEntryGroupsRequest filter. */ + public filter: string; + + /** ListEntryGroupsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListEntryGroupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntryGroupsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntryGroupsRequest): google.cloud.dataplex.v1.ListEntryGroupsRequest; + + /** + * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntryGroup[]|null); + + /** ListEntryGroupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListEntryGroupsResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListEntryGroupsResponse. */ + class ListEntryGroupsResponse implements IListEntryGroupsResponse { + + /** + * Constructs a new ListEntryGroupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntryGroupsResponse); + + /** ListEntryGroupsResponse entryGroups. */ + public entryGroups: google.cloud.dataplex.v1.IEntryGroup[]; + + /** ListEntryGroupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListEntryGroupsResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListEntryGroupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntryGroupsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntryGroupsResponse): google.cloud.dataplex.v1.ListEntryGroupsResponse; + + /** + * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 GetEntryGroupRequest. */ + interface IGetEntryGroupRequest { + + /** GetEntryGroupRequest name */ + name?: (string|null); + } + + /** Represents a GetEntryGroupRequest. */ + class GetEntryGroupRequest implements IGetEntryGroupRequest { + + /** + * Constructs a new GetEntryGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntryGroupRequest); + + /** GetEntryGroupRequest name. */ + public name: string; + + /** + * Creates a new GetEntryGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntryGroupRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntryGroupRequest): google.cloud.dataplex.v1.GetEntryGroupRequest; + + /** + * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 CreateEntryTypeRequest. */ + interface ICreateEntryTypeRequest { + + /** CreateEntryTypeRequest parent */ + parent?: (string|null); + + /** CreateEntryTypeRequest entryTypeId */ + entryTypeId?: (string|null); + + /** CreateEntryTypeRequest entryType */ + entryType?: (google.cloud.dataplex.v1.IEntryType|null); + + /** CreateEntryTypeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEntryTypeRequest. */ + class CreateEntryTypeRequest implements ICreateEntryTypeRequest { + + /** + * Constructs a new CreateEntryTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEntryTypeRequest); + + /** CreateEntryTypeRequest parent. */ + public parent: string; + + /** CreateEntryTypeRequest entryTypeId. */ + public entryTypeId: string; + + /** CreateEntryTypeRequest entryType. */ + public entryType?: (google.cloud.dataplex.v1.IEntryType|null); + + /** CreateEntryTypeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEntryTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntryTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateEntryTypeRequest): google.cloud.dataplex.v1.CreateEntryTypeRequest; + + /** + * Encodes the specified CreateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. + * @param message CreateEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. + * @param message CreateEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEntryTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntryTypeRequest; + + /** + * Decodes a CreateEntryTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntryTypeRequest; + + /** + * Verifies a CreateEntryTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntryTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntryTypeRequest; + + /** + * Creates a plain object from a CreateEntryTypeRequest message. Also converts values to other types if specified. + * @param message CreateEntryTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEntryTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEntryTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEntryTypeRequest. */ + interface IUpdateEntryTypeRequest { + + /** UpdateEntryTypeRequest entryType */ + entryType?: (google.cloud.dataplex.v1.IEntryType|null); + + /** UpdateEntryTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryTypeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEntryTypeRequest. */ + class UpdateEntryTypeRequest implements IUpdateEntryTypeRequest { + + /** + * Constructs a new UpdateEntryTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryTypeRequest); + + /** UpdateEntryTypeRequest entryType. */ + public entryType?: (google.cloud.dataplex.v1.IEntryType|null); + + /** UpdateEntryTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryTypeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEntryTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntryTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryTypeRequest): google.cloud.dataplex.v1.UpdateEntryTypeRequest; + + /** + * Encodes the specified UpdateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. + * @param message UpdateEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. + * @param message UpdateEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntryTypeRequest; + + /** + * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntryTypeRequest; + + /** + * Verifies an UpdateEntryTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntryTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntryTypeRequest; + + /** + * Creates a plain object from an UpdateEntryTypeRequest message. Also converts values to other types if specified. + * @param message UpdateEntryTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEntryTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEntryTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEntryTypeRequest. */ + interface IDeleteEntryTypeRequest { + + /** DeleteEntryTypeRequest name */ + name?: (string|null); + + /** DeleteEntryTypeRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteEntryTypeRequest. */ + class DeleteEntryTypeRequest implements IDeleteEntryTypeRequest { + + /** + * Constructs a new DeleteEntryTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteEntryTypeRequest); + + /** DeleteEntryTypeRequest name. */ + public name: string; + + /** DeleteEntryTypeRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteEntryTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntryTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteEntryTypeRequest): google.cloud.dataplex.v1.DeleteEntryTypeRequest; + + /** + * Encodes the specified DeleteEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. + * @param message DeleteEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. + * @param message DeleteEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntryTypeRequest; + + /** + * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntryTypeRequest; + + /** + * Verifies a DeleteEntryTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEntryTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntryTypeRequest; + + /** + * Creates a plain object from a DeleteEntryTypeRequest message. Also converts values to other types if specified. + * @param message DeleteEntryTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEntryTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEntryTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEntryTypesRequest. */ + interface IListEntryTypesRequest { + + /** ListEntryTypesRequest parent */ + parent?: (string|null); + + /** ListEntryTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntryTypesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntryTypesRequest filter */ + filter?: (string|null); + + /** ListEntryTypesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListEntryTypesRequest. */ + class ListEntryTypesRequest implements IListEntryTypesRequest { + + /** + * Constructs a new ListEntryTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntryTypesRequest); + + /** ListEntryTypesRequest parent. */ + public parent: string; + + /** ListEntryTypesRequest pageSize. */ + public pageSize: number; + + /** ListEntryTypesRequest pageToken. */ + public pageToken: string; + + /** ListEntryTypesRequest filter. */ + public filter: string; + + /** ListEntryTypesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListEntryTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntryTypesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntryTypesRequest): google.cloud.dataplex.v1.ListEntryTypesRequest; + + /** + * Encodes the specified ListEntryTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. + * @param message ListEntryTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntryTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntryTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. + * @param message ListEntryTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntryTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntryTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntryTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntryTypesRequest; + + /** + * Decodes a ListEntryTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntryTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntryTypesRequest; + + /** + * Verifies a ListEntryTypesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntryTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntryTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntryTypesRequest; + + /** + * Creates a plain object from a ListEntryTypesRequest message. Also converts values to other types if specified. + * @param message ListEntryTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntryTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntryTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntryTypesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEntryTypesResponse. */ + interface IListEntryTypesResponse { + + /** ListEntryTypesResponse entryTypes */ + entryTypes?: (google.cloud.dataplex.v1.IEntryType[]|null); + + /** ListEntryTypesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListEntryTypesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListEntryTypesResponse. */ + class ListEntryTypesResponse implements IListEntryTypesResponse { + + /** + * Constructs a new ListEntryTypesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntryTypesResponse); + + /** ListEntryTypesResponse entryTypes. */ + public entryTypes: google.cloud.dataplex.v1.IEntryType[]; + + /** ListEntryTypesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListEntryTypesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListEntryTypesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntryTypesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntryTypesResponse): google.cloud.dataplex.v1.ListEntryTypesResponse; + + /** + * Encodes the specified ListEntryTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. + * @param message ListEntryTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntryTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntryTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. + * @param message ListEntryTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntryTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntryTypesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntryTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntryTypesResponse; + + /** + * Decodes a ListEntryTypesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntryTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntryTypesResponse; + + /** + * Verifies a ListEntryTypesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntryTypesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntryTypesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntryTypesResponse; + + /** + * Creates a plain object from a ListEntryTypesResponse message. Also converts values to other types if specified. + * @param message ListEntryTypesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntryTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntryTypesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntryTypesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEntryTypeRequest. */ + interface IGetEntryTypeRequest { + + /** GetEntryTypeRequest name */ + name?: (string|null); + } + + /** Represents a GetEntryTypeRequest. */ + class GetEntryTypeRequest implements IGetEntryTypeRequest { + + /** + * Constructs a new GetEntryTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntryTypeRequest); + + /** GetEntryTypeRequest name. */ + public name: string; + + /** + * Creates a new GetEntryTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntryTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntryTypeRequest): google.cloud.dataplex.v1.GetEntryTypeRequest; + + /** + * Encodes the specified GetEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. + * @param message GetEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. + * @param message GetEntryTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntryTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntryTypeRequest; + + /** + * Decodes a GetEntryTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntryTypeRequest; + + /** + * Verifies a GetEntryTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntryTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntryTypeRequest; + + /** + * Creates a plain object from a GetEntryTypeRequest message. Also converts values to other types if specified. + * @param message GetEntryTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntryTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEntryTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAspectTypeRequest. */ + interface ICreateAspectTypeRequest { + + /** CreateAspectTypeRequest parent */ + parent?: (string|null); + + /** CreateAspectTypeRequest aspectTypeId */ + aspectTypeId?: (string|null); + + /** CreateAspectTypeRequest aspectType */ + aspectType?: (google.cloud.dataplex.v1.IAspectType|null); + + /** CreateAspectTypeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAspectTypeRequest. */ + class CreateAspectTypeRequest implements ICreateAspectTypeRequest { + + /** + * Constructs a new CreateAspectTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateAspectTypeRequest); + + /** CreateAspectTypeRequest parent. */ + public parent: string; + + /** CreateAspectTypeRequest aspectTypeId. */ + public aspectTypeId: string; + + /** CreateAspectTypeRequest aspectType. */ + public aspectType?: (google.cloud.dataplex.v1.IAspectType|null); + + /** CreateAspectTypeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAspectTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAspectTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateAspectTypeRequest): google.cloud.dataplex.v1.CreateAspectTypeRequest; + + /** + * Encodes the specified CreateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. + * @param message CreateAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. + * @param message CreateAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAspectTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAspectTypeRequest; + + /** + * Decodes a CreateAspectTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAspectTypeRequest; + + /** + * Verifies a CreateAspectTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAspectTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAspectTypeRequest; + + /** + * Creates a plain object from a CreateAspectTypeRequest message. Also converts values to other types if specified. + * @param message CreateAspectTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAspectTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAspectTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAspectTypeRequest. */ + interface IUpdateAspectTypeRequest { + + /** UpdateAspectTypeRequest aspectType */ + aspectType?: (google.cloud.dataplex.v1.IAspectType|null); + + /** UpdateAspectTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAspectTypeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateAspectTypeRequest. */ + class UpdateAspectTypeRequest implements IUpdateAspectTypeRequest { + + /** + * Constructs a new UpdateAspectTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateAspectTypeRequest); + + /** UpdateAspectTypeRequest aspectType. */ + public aspectType?: (google.cloud.dataplex.v1.IAspectType|null); + + /** UpdateAspectTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAspectTypeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateAspectTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAspectTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateAspectTypeRequest): google.cloud.dataplex.v1.UpdateAspectTypeRequest; + + /** + * Encodes the specified UpdateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. + * @param message UpdateAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. + * @param message UpdateAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAspectTypeRequest; + + /** + * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAspectTypeRequest; + + /** + * Verifies an UpdateAspectTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAspectTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAspectTypeRequest; + + /** + * Creates a plain object from an UpdateAspectTypeRequest message. Also converts values to other types if specified. + * @param message UpdateAspectTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAspectTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAspectTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAspectTypeRequest. */ + interface IDeleteAspectTypeRequest { + + /** DeleteAspectTypeRequest name */ + name?: (string|null); + + /** DeleteAspectTypeRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteAspectTypeRequest. */ + class DeleteAspectTypeRequest implements IDeleteAspectTypeRequest { + + /** + * Constructs a new DeleteAspectTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteAspectTypeRequest); + + /** DeleteAspectTypeRequest name. */ + public name: string; + + /** DeleteAspectTypeRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteAspectTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAspectTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteAspectTypeRequest): google.cloud.dataplex.v1.DeleteAspectTypeRequest; + + /** + * Encodes the specified DeleteAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. + * @param message DeleteAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. + * @param message DeleteAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAspectTypeRequest; + + /** + * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAspectTypeRequest; + + /** + * Verifies a DeleteAspectTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAspectTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAspectTypeRequest; + + /** + * Creates a plain object from a DeleteAspectTypeRequest message. Also converts values to other types if specified. + * @param message DeleteAspectTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAspectTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAspectTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAspectTypesRequest. */ + interface IListAspectTypesRequest { + + /** ListAspectTypesRequest parent */ + parent?: (string|null); + + /** ListAspectTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListAspectTypesRequest pageToken */ + pageToken?: (string|null); + + /** ListAspectTypesRequest filter */ + filter?: (string|null); + + /** ListAspectTypesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAspectTypesRequest. */ + class ListAspectTypesRequest implements IListAspectTypesRequest { + + /** + * Constructs a new ListAspectTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAspectTypesRequest); + + /** ListAspectTypesRequest parent. */ + public parent: string; + + /** ListAspectTypesRequest pageSize. */ + public pageSize: number; + + /** ListAspectTypesRequest pageToken. */ + public pageToken: string; + + /** ListAspectTypesRequest filter. */ + public filter: string; + + /** ListAspectTypesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAspectTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAspectTypesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAspectTypesRequest): google.cloud.dataplex.v1.ListAspectTypesRequest; + + /** + * Encodes the specified ListAspectTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. + * @param message ListAspectTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAspectTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAspectTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. + * @param message ListAspectTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAspectTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAspectTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAspectTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAspectTypesRequest; + + /** + * Decodes a ListAspectTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAspectTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAspectTypesRequest; + + /** + * Verifies a ListAspectTypesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAspectTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAspectTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAspectTypesRequest; + + /** + * Creates a plain object from a ListAspectTypesRequest message. Also converts values to other types if specified. + * @param message ListAspectTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAspectTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAspectTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAspectTypesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAspectTypesResponse. */ + interface IListAspectTypesResponse { + + /** ListAspectTypesResponse aspectTypes */ + aspectTypes?: (google.cloud.dataplex.v1.IAspectType[]|null); + + /** ListAspectTypesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAspectTypesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListAspectTypesResponse. */ + class ListAspectTypesResponse implements IListAspectTypesResponse { + + /** + * Constructs a new ListAspectTypesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAspectTypesResponse); + + /** ListAspectTypesResponse aspectTypes. */ + public aspectTypes: google.cloud.dataplex.v1.IAspectType[]; + + /** ListAspectTypesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAspectTypesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListAspectTypesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAspectTypesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAspectTypesResponse): google.cloud.dataplex.v1.ListAspectTypesResponse; + + /** + * Encodes the specified ListAspectTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. + * @param message ListAspectTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAspectTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAspectTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. + * @param message ListAspectTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAspectTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAspectTypesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAspectTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAspectTypesResponse; + + /** + * Decodes a ListAspectTypesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAspectTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAspectTypesResponse; + + /** + * Verifies a ListAspectTypesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAspectTypesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAspectTypesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAspectTypesResponse; + + /** + * Creates a plain object from a ListAspectTypesResponse message. Also converts values to other types if specified. + * @param message ListAspectTypesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAspectTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAspectTypesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAspectTypesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAspectTypeRequest. */ + interface IGetAspectTypeRequest { + + /** GetAspectTypeRequest name */ + name?: (string|null); + } + + /** Represents a GetAspectTypeRequest. */ + class GetAspectTypeRequest implements IGetAspectTypeRequest { + + /** + * Constructs a new GetAspectTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetAspectTypeRequest); + + /** GetAspectTypeRequest name. */ + public name: string; + + /** + * Creates a new GetAspectTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAspectTypeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetAspectTypeRequest): google.cloud.dataplex.v1.GetAspectTypeRequest; + + /** + * Encodes the specified GetAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. + * @param message GetAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. + * @param message GetAspectTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAspectTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAspectTypeRequest; + + /** + * Decodes a GetAspectTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAspectTypeRequest; + + /** + * Verifies a GetAspectTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAspectTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAspectTypeRequest; + + /** + * Creates a plain object from a GetAspectTypeRequest message. Also converts values to other types if specified. + * @param message GetAspectTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAspectTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAspectTypeRequest + * @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.dataplex.v1.IEntry|null); + } + + /** Represents a CreateEntryRequest. */ + class CreateEntryRequest implements ICreateEntryRequest { + + /** + * Constructs a new CreateEntryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEntryRequest); + + /** CreateEntryRequest parent. */ + public parent: string; + + /** CreateEntryRequest entryId. */ + public entryId: string; + + /** CreateEntryRequest entry. */ + public entry?: (google.cloud.dataplex.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.dataplex.v1.ICreateEntryRequest): google.cloud.dataplex.v1.CreateEntryRequest; + + /** + * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntry|null); + + /** UpdateEntryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateEntryRequest deleteMissingAspects */ + deleteMissingAspects?: (boolean|null); + + /** UpdateEntryRequest aspectKeys */ + aspectKeys?: (string[]|null); + } + + /** Represents an UpdateEntryRequest. */ + class UpdateEntryRequest implements IUpdateEntryRequest { + + /** + * Constructs a new UpdateEntryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryRequest); + + /** UpdateEntryRequest entry. */ + public entry?: (google.cloud.dataplex.v1.IEntry|null); + + /** UpdateEntryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEntryRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateEntryRequest deleteMissingAspects. */ + public deleteMissingAspects: boolean; + + /** UpdateEntryRequest aspectKeys. */ + public aspectKeys: string[]; + + /** + * Creates a new UpdateEntryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntryRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryRequest): google.cloud.dataplex.v1.UpdateEntryRequest; + + /** + * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IDeleteEntryRequest): google.cloud.dataplex.v1.DeleteEntryRequest; + + /** + * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 ListEntriesRequest. */ + interface IListEntriesRequest { + + /** ListEntriesRequest parent */ + parent?: (string|null); + + /** ListEntriesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntriesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntriesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListEntriesRequest. */ + class ListEntriesRequest implements IListEntriesRequest { + + /** + * Constructs a new ListEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntriesRequest); + + /** ListEntriesRequest parent. */ + public parent: string; + + /** ListEntriesRequest pageSize. */ + public pageSize: number; + + /** ListEntriesRequest pageToken. */ + public pageToken: string; + + /** ListEntriesRequest filter. */ + public filter: string; + + /** + * Creates a new ListEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntriesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntriesRequest): google.cloud.dataplex.v1.ListEntriesRequest; + + /** + * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IListEntriesResponse); + + /** ListEntriesResponse entries. */ + public entries: google.cloud.dataplex.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.dataplex.v1.IListEntriesResponse): google.cloud.dataplex.v1.ListEntriesResponse; + + /** + * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 GetEntryRequest. */ + interface IGetEntryRequest { + + /** GetEntryRequest name */ + name?: (string|null); + + /** GetEntryRequest view */ + view?: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView|null); + + /** GetEntryRequest aspectTypes */ + aspectTypes?: (string[]|null); + + /** GetEntryRequest paths */ + paths?: (string[]|null); + } + + /** Represents a GetEntryRequest. */ + class GetEntryRequest implements IGetEntryRequest { + + /** + * Constructs a new GetEntryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntryRequest); + + /** GetEntryRequest name. */ + public name: string; + + /** GetEntryRequest view. */ + public view: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView); + + /** GetEntryRequest aspectTypes. */ + public aspectTypes: string[]; + + /** GetEntryRequest paths. */ + public paths: string[]; + + /** + * Creates a new GetEntryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntryRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntryRequest): google.cloud.dataplex.v1.GetEntryRequest; + + /** + * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 name */ + name?: (string|null); + + /** LookupEntryRequest view */ + view?: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView|null); + + /** LookupEntryRequest aspectTypes */ + aspectTypes?: (string[]|null); + + /** LookupEntryRequest paths */ + paths?: (string[]|null); + + /** LookupEntryRequest entry */ + entry?: (string|null); + } + + /** Represents a LookupEntryRequest. */ + class LookupEntryRequest implements ILookupEntryRequest { + + /** + * Constructs a new LookupEntryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ILookupEntryRequest); + + /** LookupEntryRequest name. */ + public name: string; + + /** LookupEntryRequest view. */ + public view: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView); + + /** LookupEntryRequest aspectTypes. */ + public aspectTypes: string[]; + + /** LookupEntryRequest paths. */ + public paths: string[]; + + /** LookupEntryRequest entry. */ + public entry: string; + + /** + * Creates a new LookupEntryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LookupEntryRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ILookupEntryRequest): google.cloud.dataplex.v1.LookupEntryRequest; + + /** + * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 a SearchEntriesRequest. */ + interface ISearchEntriesRequest { + + /** SearchEntriesRequest name */ + name?: (string|null); + + /** SearchEntriesRequest query */ + query?: (string|null); + + /** SearchEntriesRequest pageSize */ + pageSize?: (number|null); + + /** SearchEntriesRequest pageToken */ + pageToken?: (string|null); + + /** SearchEntriesRequest orderBy */ + orderBy?: (string|null); + + /** SearchEntriesRequest scope */ + scope?: (string|null); + } + + /** Represents a SearchEntriesRequest. */ + class SearchEntriesRequest implements ISearchEntriesRequest { + + /** + * Constructs a new SearchEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesRequest); + + /** SearchEntriesRequest name. */ + public name: string; + + /** SearchEntriesRequest query. */ + public query: string; + + /** SearchEntriesRequest pageSize. */ + public pageSize: number; + + /** SearchEntriesRequest pageToken. */ + public pageToken: string; + + /** SearchEntriesRequest orderBy. */ + public orderBy: string; + + /** SearchEntriesRequest scope. */ + public scope: string; + + /** + * Creates a new SearchEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchEntriesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesRequest): google.cloud.dataplex.v1.SearchEntriesRequest; + + /** + * Encodes the specified SearchEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. + * @param message SearchEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISearchEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. + * @param message SearchEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesRequest; + + /** + * Decodes a SearchEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesRequest; + + /** + * Verifies a SearchEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchEntriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesRequest; + + /** + * Creates a plain object from a SearchEntriesRequest message. Also converts values to other types if specified. + * @param message SearchEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SearchEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchEntriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchEntriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchEntriesResult. */ + interface ISearchEntriesResult { + + /** SearchEntriesResult linkedResource */ + linkedResource?: (string|null); + + /** SearchEntriesResult dataplexEntry */ + dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); + + /** SearchEntriesResult snippets */ + snippets?: (google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null); + } + + /** Represents a SearchEntriesResult. */ + class SearchEntriesResult implements ISearchEntriesResult { + + /** + * Constructs a new SearchEntriesResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesResult); + + /** SearchEntriesResult linkedResource. */ + public linkedResource: string; + + /** SearchEntriesResult dataplexEntry. */ + public dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); + + /** SearchEntriesResult snippets. */ + public snippets?: (google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null); + + /** + * Creates a new SearchEntriesResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchEntriesResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesResult): google.cloud.dataplex.v1.SearchEntriesResult; + + /** + * Encodes the specified SearchEntriesResult message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. + * @param message SearchEntriesResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISearchEntriesResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchEntriesResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. + * @param message SearchEntriesResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchEntriesResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchEntriesResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResult; + + /** + * Decodes a SearchEntriesResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchEntriesResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResult; + + /** + * Verifies a SearchEntriesResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchEntriesResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchEntriesResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResult; + + /** + * Creates a plain object from a SearchEntriesResult message. Also converts values to other types if specified. + * @param message SearchEntriesResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchEntriesResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchEntriesResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchEntriesResult { + + /** Properties of a Snippets. */ + interface ISnippets { + + /** Snippets dataplexEntry */ + dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); + } + + /** Represents a Snippets. */ + class Snippets implements ISnippets { + + /** + * Constructs a new Snippets. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets); + + /** Snippets dataplexEntry. */ + public dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); + + /** + * Creates a new Snippets instance using the specified properties. + * @param [properties] Properties to set + * @returns Snippets instance + */ + public static create(properties?: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; + + /** + * Encodes the specified Snippets message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. + * @param message Snippets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Snippets message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. + * @param message Snippets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Snippets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Snippets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; + + /** + * Decodes a Snippets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Snippets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; + + /** + * Verifies a Snippets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Snippets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Snippets + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; + + /** + * Creates a plain object from a Snippets message. Also converts values to other types if specified. + * @param message Snippets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResult.Snippets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Snippets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Snippets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SearchEntriesResponse. */ + interface ISearchEntriesResponse { + + /** SearchEntriesResponse results */ + results?: (google.cloud.dataplex.v1.ISearchEntriesResult[]|null); + + /** SearchEntriesResponse totalSize */ + totalSize?: (number|null); + + /** SearchEntriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** SearchEntriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a SearchEntriesResponse. */ + class SearchEntriesResponse implements ISearchEntriesResponse { + + /** + * Constructs a new SearchEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesResponse); + + /** SearchEntriesResponse results. */ + public results: google.cloud.dataplex.v1.ISearchEntriesResult[]; + + /** SearchEntriesResponse totalSize. */ + public totalSize: number; + + /** SearchEntriesResponse nextPageToken. */ + public nextPageToken: string; + + /** SearchEntriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new SearchEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchEntriesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesResponse): google.cloud.dataplex.v1.SearchEntriesResponse; + + /** + * Encodes the specified SearchEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. + * @param message SearchEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISearchEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. + * @param message SearchEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResponse; + + /** + * Decodes a SearchEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResponse; + + /** + * Verifies a SearchEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchEntriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResponse; + + /** + * Creates a plain object from a SearchEntriesResponse message. Also converts values to other types if specified. + * @param message SearchEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchEntriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchEntriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportItem. */ + interface IImportItem { + + /** ImportItem entry */ + entry?: (google.cloud.dataplex.v1.IEntry|null); + + /** ImportItem updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportItem aspectKeys */ + aspectKeys?: (string[]|null); + } + + /** Represents an ImportItem. */ + class ImportItem implements IImportItem { + + /** + * Constructs a new ImportItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IImportItem); + + /** ImportItem entry. */ + public entry?: (google.cloud.dataplex.v1.IEntry|null); + + /** ImportItem updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportItem aspectKeys. */ + public aspectKeys: string[]; + + /** + * Creates a new ImportItem instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportItem instance + */ + public static create(properties?: google.cloud.dataplex.v1.IImportItem): google.cloud.dataplex.v1.ImportItem; + + /** + * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @param message ImportItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @param message ImportItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ImportItem; + + /** + * Decodes an ImportItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ImportItem; + + /** + * Verifies an ImportItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ImportItem; + + /** + * Creates a plain object from an ImportItem message. Also converts values to other types if specified. + * @param message ImportItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ImportItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMetadataJobRequest. */ + interface ICreateMetadataJobRequest { + + /** CreateMetadataJobRequest parent */ + parent?: (string|null); + + /** CreateMetadataJobRequest metadataJob */ + metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); + + /** CreateMetadataJobRequest metadataJobId */ + metadataJobId?: (string|null); + + /** CreateMetadataJobRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateMetadataJobRequest. */ + class CreateMetadataJobRequest implements ICreateMetadataJobRequest { + + /** + * Constructs a new CreateMetadataJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest); + + /** CreateMetadataJobRequest parent. */ + public parent: string; + + /** CreateMetadataJobRequest metadataJob. */ + public metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); + + /** CreateMetadataJobRequest metadataJobId. */ + public metadataJobId: string; + + /** CreateMetadataJobRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMetadataJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest): google.cloud.dataplex.v1.CreateMetadataJobRequest; + + /** + * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @param message CreateMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @param message CreateMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateMetadataJobRequest; + + /** + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateMetadataJobRequest; + + /** + * Verifies a CreateMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMetadataJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateMetadataJobRequest; + + /** + * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. + * @param message CreateMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMetadataJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMetadataJobRequest. */ + interface IGetMetadataJobRequest { + + /** GetMetadataJobRequest name */ + name?: (string|null); + } + + /** Represents a GetMetadataJobRequest. */ + class GetMetadataJobRequest implements IGetMetadataJobRequest { + + /** + * Constructs a new GetMetadataJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest); + + /** GetMetadataJobRequest name. */ + public name: string; + + /** + * Creates a new GetMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetadataJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest): google.cloud.dataplex.v1.GetMetadataJobRequest; + + /** + * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @param message GetMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @param message GetMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetMetadataJobRequest; + + /** + * Decodes a GetMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetMetadataJobRequest; + + /** + * Verifies a GetMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetadataJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetMetadataJobRequest; + + /** + * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. + * @param message GetMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMetadataJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMetadataJobsRequest. */ + interface IListMetadataJobsRequest { + + /** ListMetadataJobsRequest parent */ + parent?: (string|null); + + /** ListMetadataJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListMetadataJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListMetadataJobsRequest filter */ + filter?: (string|null); + + /** ListMetadataJobsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListMetadataJobsRequest. */ + class ListMetadataJobsRequest implements IListMetadataJobsRequest { + + /** + * Constructs a new ListMetadataJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest); + + /** ListMetadataJobsRequest parent. */ + public parent: string; + + /** ListMetadataJobsRequest pageSize. */ + public pageSize: number; + + /** ListMetadataJobsRequest pageToken. */ + public pageToken: string; + + /** ListMetadataJobsRequest filter. */ + public filter: string; + + /** ListMetadataJobsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListMetadataJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetadataJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest): google.cloud.dataplex.v1.ListMetadataJobsRequest; + + /** + * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @param message ListMetadataJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @param message ListMetadataJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsRequest; + + /** + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsRequest; + + /** + * Verifies a ListMetadataJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetadataJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsRequest; + + /** + * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. + * @param message ListMetadataJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetadataJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMetadataJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMetadataJobsResponse. */ + interface IListMetadataJobsResponse { + + /** ListMetadataJobsResponse metadataJobs */ + metadataJobs?: (google.cloud.dataplex.v1.IMetadataJob[]|null); + + /** ListMetadataJobsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMetadataJobsResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListMetadataJobsResponse. */ + class ListMetadataJobsResponse implements IListMetadataJobsResponse { + + /** + * Constructs a new ListMetadataJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse); + + /** ListMetadataJobsResponse metadataJobs. */ + public metadataJobs: google.cloud.dataplex.v1.IMetadataJob[]; + + /** ListMetadataJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMetadataJobsResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListMetadataJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetadataJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse): google.cloud.dataplex.v1.ListMetadataJobsResponse; + + /** + * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @param message ListMetadataJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @param message ListMetadataJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsResponse; + + /** + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsResponse; + + /** + * Verifies a ListMetadataJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetadataJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsResponse; + + /** + * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. + * @param message ListMetadataJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetadataJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMetadataJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelMetadataJobRequest. */ + interface ICancelMetadataJobRequest { + + /** CancelMetadataJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelMetadataJobRequest. */ + class CancelMetadataJobRequest implements ICancelMetadataJobRequest { + + /** + * Constructs a new CancelMetadataJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest); + + /** CancelMetadataJobRequest name. */ + public name: string; + + /** + * Creates a new CancelMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelMetadataJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @param message CancelMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @param message CancelMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Verifies a CancelMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelMetadataJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. + * @param message CancelMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CancelMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelMetadataJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataJob. */ + interface IMetadataJob { + + /** MetadataJob name */ + name?: (string|null); + + /** MetadataJob uid */ + uid?: (string|null); + + /** MetadataJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob labels */ + labels?: ({ [k: string]: string }|null); + + /** MetadataJob type */ + type?: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type|null); + + /** MetadataJob importSpec */ + importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); + + /** MetadataJob importResult */ + importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); + + /** MetadataJob status */ + status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); + } + + /** Represents a MetadataJob. */ + class MetadataJob implements IMetadataJob { + + /** + * Constructs a new MetadataJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IMetadataJob); + + /** MetadataJob name. */ + public name: string; + + /** MetadataJob uid. */ + public uid: string; + + /** MetadataJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob labels. */ + public labels: { [k: string]: string }; + + /** MetadataJob type. */ + public type: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type); + + /** MetadataJob importSpec. */ + public importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); + + /** MetadataJob importResult. */ + public importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); + + /** MetadataJob status. */ + public status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); + + /** MetadataJob spec. */ + public spec?: "importSpec"; + + /** MetadataJob result. */ + public result?: "importResult"; + + /** + * Creates a new MetadataJob instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataJob instance + */ + public static create(properties?: google.cloud.dataplex.v1.IMetadataJob): google.cloud.dataplex.v1.MetadataJob; + + /** + * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @param message MetadataJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @param message MetadataJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob; + + /** + * Decodes a MetadataJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob; + + /** + * Verifies a MetadataJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob; + + /** + * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. + * @param message MetadataJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetadataJob { + + /** Properties of an ImportJobResult. */ + interface IImportJobResult { + + /** ImportJobResult deletedEntries */ + deletedEntries?: (number|Long|string|null); + + /** ImportJobResult updatedEntries */ + updatedEntries?: (number|Long|string|null); + + /** ImportJobResult createdEntries */ + createdEntries?: (number|Long|string|null); + + /** ImportJobResult unchangedEntries */ + unchangedEntries?: (number|Long|string|null); + + /** ImportJobResult recreatedEntries */ + recreatedEntries?: (number|Long|string|null); + + /** ImportJobResult updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ImportJobResult. */ + class ImportJobResult implements IImportJobResult { + + /** + * Constructs a new ImportJobResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult); + + /** ImportJobResult deletedEntries. */ + public deletedEntries: (number|Long|string); + + /** ImportJobResult updatedEntries. */ + public updatedEntries: (number|Long|string); + + /** ImportJobResult createdEntries. */ + public createdEntries: (number|Long|string); + + /** ImportJobResult unchangedEntries. */ + public unchangedEntries: (number|Long|string); + + /** ImportJobResult recreatedEntries. */ + public recreatedEntries: (number|Long|string); + + /** ImportJobResult updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ImportJobResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @param message ImportJobResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @param message ImportJobResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Verifies an ImportJobResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. + * @param message ImportJobResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportJobSpec. */ + interface IImportJobSpec { + + /** ImportJobSpec sourceStorageUri */ + sourceStorageUri?: (string|null); + + /** ImportJobSpec sourceCreateTime */ + sourceCreateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJobSpec scope */ + scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); + + /** ImportJobSpec entrySyncMode */ + entrySyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); + + /** ImportJobSpec aspectSyncMode */ + aspectSyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); + + /** ImportJobSpec logLevel */ + logLevel?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null); + } + + /** Represents an ImportJobSpec. */ + class ImportJobSpec implements IImportJobSpec { + + /** + * Constructs a new ImportJobSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec); + + /** ImportJobSpec sourceStorageUri. */ + public sourceStorageUri: string; + + /** ImportJobSpec sourceCreateTime. */ + public sourceCreateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJobSpec scope. */ + public scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); + + /** ImportJobSpec entrySyncMode. */ + public entrySyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); + + /** ImportJobSpec aspectSyncMode. */ + public aspectSyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); + + /** ImportJobSpec logLevel. */ + public logLevel: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel); + + /** + * Creates a new ImportJobSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @param message ImportJobSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @param message ImportJobSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Verifies an ImportJobSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. + * @param message ImportJobSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportJobSpec { + + /** SyncMode enum. */ + enum SyncMode { + SYNC_MODE_UNSPECIFIED = 0, + FULL = 1, + INCREMENTAL = 2 + } + + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + DEBUG = 1, + INFO = 2 + } + + /** Properties of an ImportJobScope. */ + interface IImportJobScope { + + /** ImportJobScope entryGroups */ + entryGroups?: (string[]|null); + + /** ImportJobScope entryTypes */ + entryTypes?: (string[]|null); + + /** ImportJobScope aspectTypes */ + aspectTypes?: (string[]|null); + } + + /** Represents an ImportJobScope. */ + class ImportJobScope implements IImportJobScope { + + /** + * Constructs a new ImportJobScope. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope); + + /** ImportJobScope entryGroups. */ + public entryGroups: string[]; + + /** ImportJobScope entryTypes. */ + public entryTypes: string[]; + + /** ImportJobScope aspectTypes. */ + public aspectTypes: string[]; + + /** + * Creates a new ImportJobScope instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobScope instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @param message ImportJobScope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @param message ImportJobScope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Verifies an ImportJobScope message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobScope + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. + * @param message ImportJobScope + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobScope to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobScope + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + IMPORT = 1 + } + + /** Properties of a Status. */ + interface IStatus { + + /** Status state */ + state?: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State|null); + + /** Status message */ + message?: (string|null); + + /** Status completionPercent */ + completionPercent?: (number|null); + + /** Status updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus); + + /** Status state. */ + public state: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State); + + /** Status message. */ + public message: string; + + /** Status completionPercent. */ + public completionPercent: number; + + /** Status updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus): google.cloud.dataplex.v1.MetadataJob.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Status { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + QUEUED = 1, + RUNNING = 2, + CANCELING = 3, + CANCELED = 4, + SUCCEEDED = 5, + FAILED = 6, + SUCCEEDED_WITH_ERRORS = 7 + } + } + } + + /** EntryView enum. */ + enum EntryView { + ENTRY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2, + CUSTOM = 3, + ALL = 4 + } + + /** TransferStatus enum. */ + enum TransferStatus { + TRANSFER_STATUS_UNSPECIFIED = 0, + TRANSFER_STATUS_MIGRATED = 1, + TRANSFER_STATUS_TRANSFERRED = 2 + } + + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataplexService 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 DataplexService 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): DataplexService; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunTaskResponse + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.RunTaskCallback): void; + + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @returns Promise + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): Promise; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest): Promise; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest): Promise; + + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSessionsResponse + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListSessionsCallback): void; + + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @returns Promise + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest): Promise; + } + + namespace DataplexService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. + * @param error Error, if any + * @param [response] ListLakesResponse + */ + type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. + * @param error Error, if any + * @param [response] Lake + */ + type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. + * @param error Error, if any + * @param [response] ListZonesResponse + */ + type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. + * @param error Error, if any + * @param [response] Zone + */ + type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. + * @param error Error, if any + * @param [response] ListTasksResponse + */ + type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. + * @param error Error, if any + * @param [response] RunTaskResponse + */ + type RunTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunTaskResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. + * @param error Error, if any + * @param [response] ListSessionsResponse + */ + type ListSessionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListSessionsResponse) => void; + } + + /** Properties of a CreateLakeRequest. */ + interface ICreateLakeRequest { + + /** CreateLakeRequest parent */ + parent?: (string|null); + + /** CreateLakeRequest lakeId */ + lakeId?: (string|null); + + /** CreateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateLakeRequest. */ + class CreateLakeRequest implements ICreateLakeRequest { + + /** + * Constructs a new CreateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); + + /** CreateLakeRequest parent. */ + public parent: string; + + /** CreateLakeRequest lakeId. */ + public lakeId: string; + + /** CreateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** CreateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Verifies a CreateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @param message CreateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateLakeRequest. */ + interface IUpdateLakeRequest { + + /** UpdateLakeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateLakeRequest. */ + class UpdateLakeRequest implements IUpdateLakeRequest { + + /** + * Constructs a new UpdateLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); + + /** UpdateLakeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); + + /** UpdateLakeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Verifies an UpdateLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @param message UpdateLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteLakeRequest. */ + interface IDeleteLakeRequest { + + /** DeleteLakeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteLakeRequest. */ + class DeleteLakeRequest implements IDeleteLakeRequest { + + /** + * Constructs a new DeleteLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + + /** DeleteLakeRequest name. */ + public name: string; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Verifies a DeleteLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @param message DeleteLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLakesRequest. */ + interface IListLakesRequest { + + /** ListLakesRequest parent */ + parent?: (string|null); + + /** ListLakesRequest pageSize */ + pageSize?: (number|null); + + /** ListLakesRequest pageToken */ + pageToken?: (string|null); + + /** ListLakesRequest filter */ + filter?: (string|null); + + /** ListLakesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListLakesRequest. */ + class ListLakesRequest implements IListLakesRequest { + + /** + * Constructs a new ListLakesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); + + /** ListLakesRequest parent. */ + public parent: string; + + /** ListLakesRequest pageSize. */ + public pageSize: number; + + /** ListLakesRequest pageToken. */ + public pageToken: string; + + /** ListLakesRequest filter. */ + public filter: string; + + /** ListLakesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Verifies a ListLakesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; + + /** + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @param message ListLakesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLakesResponse. */ + interface IListLakesResponse { + + /** ListLakesResponse lakes */ + lakes?: (google.cloud.dataplex.v1.ILake[]|null); + + /** ListLakesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListLakesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListLakesResponse. */ + class ListLakesResponse implements IListLakesResponse { + + /** + * Constructs a new ListLakesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); + + /** ListLakesResponse lakes. */ + public lakes: google.cloud.dataplex.v1.ILake[]; + + /** ListLakesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListLakesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Verifies a ListLakesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @param message ListLakesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListLakeActionsRequest. */ + interface IListLakeActionsRequest { + + /** ListLakeActionsRequest parent */ + parent?: (string|null); + + /** ListLakeActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListLakeActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListLakeActionsRequest. */ + class ListLakeActionsRequest implements IListLakeActionsRequest { + + /** + * Constructs a new ListLakeActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + + /** ListLakeActionsRequest parent. */ + public parent: string; + + /** ListLakeActionsRequest pageSize. */ + public pageSize: number; + + /** ListLakeActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakeActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Verifies a ListLakeActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakeActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; + + /** + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @param message ListLakeActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListLakeActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListLakeActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListActionsResponse. */ + interface IListActionsResponse { + + /** ListActionsResponse actions */ + actions?: (google.cloud.dataplex.v1.IAction[]|null); + + /** ListActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListActionsResponse. */ + class ListActionsResponse implements IListActionsResponse { + + /** + * Constructs a new ListActionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); + + /** ListActionsResponse actions. */ + public actions: google.cloud.dataplex.v1.IAction[]; + + /** ListActionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Verifies a ListActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @param message ListActionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLakeRequest. */ + interface IGetLakeRequest { + + /** GetLakeRequest name */ + name?: (string|null); + } + + /** Represents a GetLakeRequest. */ + class GetLakeRequest implements IGetLakeRequest { + + /** + * Constructs a new GetLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + + /** GetLakeRequest name. */ + public name: string; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Verifies a GetLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @param message GetLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateZoneRequest. */ + interface ICreateZoneRequest { + + /** CreateZoneRequest parent */ + parent?: (string|null); + + /** CreateZoneRequest zoneId */ + zoneId?: (string|null); + + /** CreateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateZoneRequest. */ + class CreateZoneRequest implements ICreateZoneRequest { + + /** + * Constructs a new CreateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); + + /** CreateZoneRequest parent. */ + public parent: string; + + /** CreateZoneRequest zoneId. */ + public zoneId: string; + + /** CreateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Verifies a CreateZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @param message CreateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateZoneRequest. */ + interface IUpdateZoneRequest { + + /** UpdateZoneRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateZoneRequest. */ + class UpdateZoneRequest implements IUpdateZoneRequest { + + /** + * Constructs a new UpdateZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); + + /** UpdateZoneRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Verifies an UpdateZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @param message UpdateZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteZoneRequest. */ + interface IDeleteZoneRequest { + + /** DeleteZoneRequest name */ + name?: (string|null); + } + + /** Represents a DeleteZoneRequest. */ + class DeleteZoneRequest implements IDeleteZoneRequest { + + /** + * Constructs a new DeleteZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); + + /** DeleteZoneRequest name. */ + public name: string; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Verifies a DeleteZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @param message DeleteZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListZonesRequest. */ + interface IListZonesRequest { + + /** ListZonesRequest parent */ + parent?: (string|null); + + /** ListZonesRequest pageSize */ + pageSize?: (number|null); + + /** ListZonesRequest pageToken */ + pageToken?: (string|null); + + /** ListZonesRequest filter */ + filter?: (string|null); + + /** ListZonesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListZonesRequest. */ + class ListZonesRequest implements IListZonesRequest { + + /** + * Constructs a new ListZonesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); + + /** ListZonesRequest parent. */ + public parent: string; + + /** ListZonesRequest pageSize. */ + public pageSize: number; + + /** ListZonesRequest pageToken. */ + public pageToken: string; + + /** ListZonesRequest filter. */ + public filter: string; + + /** ListZonesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Verifies a ListZonesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; + + /** + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @param message ListZonesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListZonesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListZonesResponse. */ + interface IListZonesResponse { + + /** ListZonesResponse zones */ + zones?: (google.cloud.dataplex.v1.IZone[]|null); + + /** ListZonesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListZonesResponse. */ + class ListZonesResponse implements IListZonesResponse { + + /** + * Constructs a new ListZonesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); + + /** ListZonesResponse zones. */ + public zones: google.cloud.dataplex.v1.IZone[]; + + /** ListZonesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZonesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Verifies a ListZonesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZonesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @param message ListZonesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZonesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListZonesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListZoneActionsRequest. */ + interface IListZoneActionsRequest { + + /** ListZoneActionsRequest parent */ + parent?: (string|null); + + /** ListZoneActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListZoneActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListZoneActionsRequest. */ + class ListZoneActionsRequest implements IListZoneActionsRequest { + + /** + * Constructs a new ListZoneActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); + + /** ListZoneActionsRequest parent. */ + public parent: string; + + /** ListZoneActionsRequest pageSize. */ + public pageSize: number; + + /** ListZoneActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListZoneActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Verifies a ListZoneActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListZoneActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; + + /** + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @param message ListZoneActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListZoneActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListZoneActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetZoneRequest. */ + interface IGetZoneRequest { + + /** GetZoneRequest name */ + name?: (string|null); + } + + /** Represents a GetZoneRequest. */ + class GetZoneRequest implements IGetZoneRequest { + + /** + * Constructs a new GetZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); + + /** GetZoneRequest name. */ + public name: string; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetZoneRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Verifies a GetZoneRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @param message GetZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { + + /** CreateAssetRequest parent */ + parent?: (string|null); + + /** CreateAssetRequest assetId */ + assetId?: (string|null); + + /** CreateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { + + /** + * Constructs a new CreateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); + + /** CreateAssetRequest parent. */ + public parent: string; + + /** CreateAssetRequest assetId. */ + public assetId: string; + + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Verifies a CreateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAssetRequest. */ + interface IUpdateAssetRequest { + + /** UpdateAssetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateAssetRequest. */ + class UpdateAssetRequest implements IUpdateAssetRequest { + + /** + * Constructs a new UpdateAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); + + /** UpdateAssetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Verifies an UpdateAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @param message UpdateAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { + + /** DeleteAssetRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { + + /** + * Constructs a new DeleteAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); + + /** DeleteAssetRequest name. */ + public name: string; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Verifies a DeleteAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { + + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { + + /** + * Constructs a new ListAssetsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); + + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Verifies a ListAssetsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { + + /** ListAssetsResponse assets */ + assets?: (google.cloud.dataplex.v1.IAsset[]|null); + + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { + + /** + * Constructs a new ListAssetsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); + + /** ListAssetsResponse assets. */ + public assets: google.cloud.dataplex.v1.IAsset[]; + + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Verifies a ListAssetsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAssetActionsRequest. */ + interface IListAssetActionsRequest { + + /** ListAssetActionsRequest parent */ + parent?: (string|null); + + /** ListAssetActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetActionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAssetActionsRequest. */ + class ListAssetActionsRequest implements IListAssetActionsRequest { + + /** + * Constructs a new ListAssetActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); + + /** ListAssetActionsRequest parent. */ + public parent: string; + + /** ListAssetActionsRequest pageSize. */ + public pageSize: number; + + /** ListAssetActionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Verifies a ListAssetActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; + + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @param message ListAssetActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAssetActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAssetActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { + + /** GetAssetRequest name */ + name?: (string|null); + } + + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { + + /** + * Constructs a new GetAssetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); + + /** GetAssetRequest name. */ + public name: string; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAssetRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Verifies a GetAssetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAssetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAssetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAssetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTaskRequest. */ + interface ICreateTaskRequest { + + /** CreateTaskRequest parent */ + parent?: (string|null); + + /** CreateTaskRequest taskId */ + taskId?: (string|null); + + /** CreateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTaskRequest. */ + class CreateTaskRequest implements ICreateTaskRequest { + + /** + * Constructs a new CreateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); + + /** CreateTaskRequest parent. */ + public parent: string; + + /** CreateTaskRequest taskId. */ + public taskId: string; + + /** CreateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** CreateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Verifies a CreateTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @param message CreateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTaskRequest. */ + interface IUpdateTaskRequest { + + /** UpdateTaskRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateTaskRequest. */ + class UpdateTaskRequest implements IUpdateTaskRequest { + + /** + * Constructs a new UpdateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); + + /** UpdateTaskRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); + + /** UpdateTaskRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Verifies an UpdateTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @param message UpdateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTaskRequest. */ + interface IDeleteTaskRequest { + + /** DeleteTaskRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTaskRequest. */ + class DeleteTaskRequest implements IDeleteTaskRequest { + + /** + * Constructs a new DeleteTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + + /** DeleteTaskRequest name. */ + public name: string; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Verifies a DeleteTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @param message DeleteTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTasksRequest. */ + interface IListTasksRequest { + + /** ListTasksRequest parent */ + parent?: (string|null); + + /** ListTasksRequest pageSize */ + pageSize?: (number|null); + + /** ListTasksRequest pageToken */ + pageToken?: (string|null); + + /** ListTasksRequest filter */ + filter?: (string|null); + + /** ListTasksRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListTasksRequest. */ + class ListTasksRequest implements IListTasksRequest { + + /** + * Constructs a new ListTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); + + /** ListTasksRequest parent. */ + public parent: string; + + /** ListTasksRequest pageSize. */ + public pageSize: number; + + /** ListTasksRequest pageToken. */ + public pageToken: string; + + /** ListTasksRequest filter. */ + public filter: string; + + /** ListTasksRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Verifies a ListTasksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; + + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @param message ListTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTasksResponse. */ + interface IListTasksResponse { + + /** ListTasksResponse tasks */ + tasks?: (google.cloud.dataplex.v1.ITask[]|null); + + /** ListTasksResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTasksResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListTasksResponse. */ + class ListTasksResponse implements IListTasksResponse { + + /** + * Constructs a new ListTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); + + /** ListTasksResponse tasks. */ + public tasks: google.cloud.dataplex.v1.ITask[]; + + /** ListTasksResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTasksResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Verifies a ListTasksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @param message ListTasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTaskRequest. */ + interface IGetTaskRequest { + + /** GetTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetTaskRequest. */ + class GetTaskRequest implements IGetTaskRequest { + + /** + * Constructs a new GetTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); + + /** GetTaskRequest name. */ + public name: string; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Verifies a GetTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @param message GetTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { + + /** + * Constructs a new GetJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunTaskRequest. */ + interface IRunTaskRequest { + + /** RunTaskRequest name */ + name?: (string|null); + + /** RunTaskRequest labels */ + labels?: ({ [k: string]: string }|null); + + /** RunTaskRequest args */ + args?: ({ [k: string]: string }|null); + } + + /** Represents a RunTaskRequest. */ + class RunTaskRequest implements IRunTaskRequest { + + /** + * Constructs a new RunTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunTaskRequest); + + /** RunTaskRequest name. */ + public name: string; + + /** RunTaskRequest labels. */ + public labels: { [k: string]: string }; + + /** RunTaskRequest args. */ + public args: { [k: string]: string }; + + /** + * Creates a new RunTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunTaskRequest): google.cloud.dataplex.v1.RunTaskRequest; + + /** + * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @param message RunTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @param message RunTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskRequest; + + /** + * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskRequest; + + /** + * Verifies a RunTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskRequest; + + /** + * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. + * @param message RunTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunTaskResponse. */ + interface IRunTaskResponse { + + /** RunTaskResponse job */ + job?: (google.cloud.dataplex.v1.IJob|null); + } + + /** Represents a RunTaskResponse. */ + class RunTaskResponse implements IRunTaskResponse { + + /** + * Constructs a new RunTaskResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunTaskResponse); + + /** RunTaskResponse job. */ + public job?: (google.cloud.dataplex.v1.IJob|null); + + /** + * Creates a new RunTaskResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunTaskResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunTaskResponse): google.cloud.dataplex.v1.RunTaskResponse; + + /** + * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @param message RunTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @param message RunTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunTaskResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskResponse; + + /** + * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskResponse; + + /** + * Verifies a RunTaskResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunTaskResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskResponse; + + /** + * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. + * @param message RunTaskResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunTaskResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunTaskResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { + + /** + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; + + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.dataplex.v1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { + + /** + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); + + /** ListJobsResponse jobs. */ + public jobs: google.cloud.dataplex.v1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelJobRequest. */ + interface ICancelJobRequest { + + /** CancelJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelJobRequest. */ + class CancelJobRequest implements ICancelJobRequest { + + /** + * Constructs a new CancelJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + + /** CancelJobRequest name. */ + public name: string; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Verifies a CancelJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @param message CancelJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environmentId */ + environmentId?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + + /** + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environmentId. */ + public environmentId: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest): google.cloud.dataplex.v1.CreateEnvironmentRequest; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEnvironmentRequest; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEnvironmentRequest; + + /** + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEnvironmentRequest; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { + + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest); + + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { + + /** DeleteEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + + /** + * Constructs a new DeleteEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest); + + /** DeleteEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { + + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + + /** ListEnvironmentsRequest filter */ + filter?: (string|null); + + /** ListEnvironmentsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { + + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest); + + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** ListEnvironmentsRequest filter. */ + public filter: string; + + /** ListEnvironmentsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest): google.cloud.dataplex.v1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.dataplex.v1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { + + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse); + + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.dataplex.v1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse): google.cloud.dataplex.v1.ListEnvironmentsResponse; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsResponse; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsResponse; + + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsResponse; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest): google.cloud.dataplex.v1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSessionsRequest. */ + interface IListSessionsRequest { + + /** ListSessionsRequest parent */ + parent?: (string|null); + + /** ListSessionsRequest pageSize */ + pageSize?: (number|null); + + /** ListSessionsRequest pageToken */ + pageToken?: (string|null); + + /** ListSessionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListSessionsRequest. */ + class ListSessionsRequest implements IListSessionsRequest { + + /** + * Constructs a new ListSessionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListSessionsRequest); + + /** ListSessionsRequest parent. */ + public parent: string; + + /** ListSessionsRequest pageSize. */ + public pageSize: number; + + /** ListSessionsRequest pageToken. */ + public pageToken: string; + + /** ListSessionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListSessionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSessionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListSessionsRequest): google.cloud.dataplex.v1.ListSessionsRequest; + + /** + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSessionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsRequest; + + /** + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsRequest; + + /** + * Verifies a ListSessionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSessionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsRequest; + + /** + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * @param message ListSessionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListSessionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSessionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSessionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSessionsResponse. */ + interface IListSessionsResponse { + + /** ListSessionsResponse sessions */ + sessions?: (google.cloud.dataplex.v1.ISession[]|null); + + /** ListSessionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSessionsResponse. */ + class ListSessionsResponse implements IListSessionsResponse { + + /** + * Constructs a new ListSessionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListSessionsResponse); + + /** ListSessionsResponse sessions. */ + public sessions: google.cloud.dataplex.v1.ISession[]; + + /** ListSessionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSessionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSessionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListSessionsResponse): google.cloud.dataplex.v1.ListSessionsResponse; + + /** + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsResponse; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsResponse; + + /** + * Verifies a ListSessionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSessionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsResponse; + + /** + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * @param message ListSessionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListSessionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSessionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSessionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Task. */ + interface ITask { + + /** Task name */ + name?: (string|null); + + /** Task uid */ + uid?: (string|null); + + /** Task createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description */ + description?: (string|null); + + /** Task displayName */ + displayName?: (string|null); + + /** Task state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Task labels */ + labels?: ({ [k: string]: string }|null); + + /** Task triggerSpec */ + triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task executionStatus */ + executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + + /** Task spark */ + spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task notebook */ + notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); + } + + /** Represents a Task. */ + class Task implements ITask { + + /** + * Constructs a new Task. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITask); + + /** Task name. */ + public name: string; + + /** Task uid. */ + public uid: string; + + /** Task createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description. */ + public description: string; + + /** Task displayName. */ + public displayName: string; + + /** Task state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Task labels. */ + public labels: { [k: string]: string }; + + /** Task triggerSpec. */ + public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task executionStatus. */ + public executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + + /** Task spark. */ + public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task notebook. */ + public notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); + + /** Task config. */ + public config?: ("spark"|"notebook"); + + /** + * Creates a new Task instance using the specified properties. + * @param [properties] Properties to set + * @returns Task instance + */ + public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Task message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task; + + /** + * Verifies a Task message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Task + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @param message Task + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Task to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Task + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Task { + + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { + + /** InfrastructureSpec batch */ + batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage */ + containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork */ + vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + } + + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { + + /** + * Constructs a new InfrastructureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); + + /** InfrastructureSpec batch. */ + public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage. */ + public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork. */ + public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + + /** InfrastructureSpec resources. */ + public resources?: "batch"; + + /** InfrastructureSpec runtime. */ + public runtime?: "containerImage"; + + /** InfrastructureSpec network. */ + public network?: "vpcNetwork"; + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InfrastructureSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Verifies an InfrastructureSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfrastructureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfrastructureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfrastructureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfrastructureSpec { + + /** Properties of a BatchComputeResources. */ + interface IBatchComputeResources { + + /** BatchComputeResources executorsCount */ + executorsCount?: (number|null); + + /** BatchComputeResources maxExecutorsCount */ + maxExecutorsCount?: (number|null); + } + + /** Represents a BatchComputeResources. */ + class BatchComputeResources implements IBatchComputeResources { + + /** + * Constructs a new BatchComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); + + /** BatchComputeResources executorsCount. */ + public executorsCount: number; + + /** BatchComputeResources maxExecutorsCount. */ + public maxExecutorsCount: number; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Verifies a BatchComputeResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @param message BatchComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchComputeResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContainerImageRuntime. */ + interface IContainerImageRuntime { + + /** ContainerImageRuntime image */ + image?: (string|null); + + /** ContainerImageRuntime javaJars */ + javaJars?: (string[]|null); + + /** ContainerImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); + + /** ContainerImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } + + /** Represents a ContainerImageRuntime. */ + class ContainerImageRuntime implements IContainerImageRuntime { + + /** + * Constructs a new ContainerImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); + + /** ContainerImageRuntime image. */ + public image: string; + + /** ContainerImageRuntime javaJars. */ + public javaJars: string[]; + + /** ContainerImageRuntime pythonPackages. */ + public pythonPackages: string[]; + + /** ContainerImageRuntime properties. */ + public properties: { [k: string]: string }; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Verifies a ContainerImageRuntime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @param message ContainerImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContainerImageRuntime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcNetwork. */ + interface IVpcNetwork { + + /** VpcNetwork network */ + network?: (string|null); + + /** VpcNetwork subNetwork */ + subNetwork?: (string|null); + + /** VpcNetwork networkTags */ + networkTags?: (string[]|null); + } + + /** Represents a VpcNetwork. */ + class VpcNetwork implements IVpcNetwork { + + /** + * Constructs a new VpcNetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); + + /** VpcNetwork network. */ + public network?: (string|null); + + /** VpcNetwork subNetwork. */ + public subNetwork?: (string|null); + + /** VpcNetwork networkTags. */ + public networkTags: string[]; + + /** VpcNetwork networkName. */ + public networkName?: ("network"|"subNetwork"); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcNetwork instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Verifies a VpcNetwork message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcNetwork + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @param message VpcNetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcNetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcNetwork + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TriggerSpec. */ + interface ITriggerSpec { + + /** TriggerSpec type */ + type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); + + /** TriggerSpec startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled */ + disabled?: (boolean|null); + + /** TriggerSpec maxRetries */ + maxRetries?: (number|null); + + /** TriggerSpec schedule */ + schedule?: (string|null); + } + + /** Represents a TriggerSpec. */ + class TriggerSpec implements ITriggerSpec { + + /** + * Constructs a new TriggerSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); + + /** TriggerSpec type. */ + public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); + + /** TriggerSpec startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled. */ + public disabled: boolean; + + /** TriggerSpec maxRetries. */ + public maxRetries: number; + + /** TriggerSpec schedule. */ + public schedule?: (string|null); + + /** TriggerSpec trigger. */ + public trigger?: "schedule"; + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Verifies a TriggerSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @param message TriggerSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TriggerSpec { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + RECURRING = 2 + } + } + + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { + + /** ExecutionSpec args */ + args?: ({ [k: string]: string }|null); + + /** ExecutionSpec serviceAccount */ + serviceAccount?: (string|null); + + /** ExecutionSpec project */ + project?: (string|null); + + /** ExecutionSpec maxJobExecutionLifetime */ + maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + + /** ExecutionSpec kmsKey */ + kmsKey?: (string|null); + } + + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { + + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); + + /** ExecutionSpec args. */ + public args: { [k: string]: string }; + + /** ExecutionSpec serviceAccount. */ + public serviceAccount: string; + + /** ExecutionSpec project. */ + public project: string; + + /** ExecutionSpec maxJobExecutionLifetime. */ + public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + + /** ExecutionSpec kmsKey. */ + public kmsKey: string; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Verifies an ExecutionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SparkTaskConfig. */ + interface ISparkTaskConfig { + + /** SparkTaskConfig mainJarFileUri */ + mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass */ + mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile */ + pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile */ + sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript */ + sqlScript?: (string|null); + + /** SparkTaskConfig fileUris */ + fileUris?: (string[]|null); + + /** SparkTaskConfig archiveUris */ + archiveUris?: (string[]|null); + + /** SparkTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + } + + /** Represents a SparkTaskConfig. */ + class SparkTaskConfig implements ISparkTaskConfig { + + /** + * Constructs a new SparkTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); + + /** SparkTaskConfig mainJarFileUri. */ + public mainJarFileUri?: (string|null); + + /** SparkTaskConfig mainClass. */ + public mainClass?: (string|null); + + /** SparkTaskConfig pythonScriptFile. */ + public pythonScriptFile?: (string|null); + + /** SparkTaskConfig sqlScriptFile. */ + public sqlScriptFile?: (string|null); + + /** SparkTaskConfig sqlScript. */ + public sqlScript?: (string|null); + + /** SparkTaskConfig fileUris. */ + public fileUris: string[]; + + /** SparkTaskConfig archiveUris. */ + public archiveUris: string[]; + + /** SparkTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** SparkTaskConfig driver. */ + public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Verifies a SparkTaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @param message SparkTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SparkTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SparkTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NotebookTaskConfig. */ + interface INotebookTaskConfig { + + /** NotebookTaskConfig notebook */ + notebook?: (string|null); + + /** NotebookTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** NotebookTaskConfig fileUris */ + fileUris?: (string[]|null); + + /** NotebookTaskConfig archiveUris */ + archiveUris?: (string[]|null); + } + + /** Represents a NotebookTaskConfig. */ + class NotebookTaskConfig implements INotebookTaskConfig { + + /** + * Constructs a new NotebookTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig); + + /** NotebookTaskConfig notebook. */ + public notebook: string; + + /** NotebookTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + + /** NotebookTaskConfig fileUris. */ + public fileUris: string[]; + + /** NotebookTaskConfig archiveUris. */ + public archiveUris: string[]; + + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotebookTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Verifies a NotebookTaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotebookTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @param message NotebookTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.NotebookTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotebookTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotebookTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecutionStatus. */ + interface IExecutionStatus { + + /** ExecutionStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJob */ + latestJob?: (google.cloud.dataplex.v1.IJob|null); + } + + /** Represents an ExecutionStatus. */ + class ExecutionStatus implements IExecutionStatus { + + /** + * Constructs a new ExecutionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus); + + /** ExecutionStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJob. */ + public latestJob?: (google.cloud.dataplex.v1.IJob|null); + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Verifies an ExecutionStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionStatus; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @param message ExecutionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Job. */ + interface IJob { + + /** Job name */ + name?: (string|null); + + /** Job uid */ + uid?: (string|null); + + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Job state */ + state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); + + /** Job retryCount */ + retryCount?: (number|null); + + /** Job service */ + service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); + + /** Job serviceJob */ + serviceJob?: (string|null); + + /** Job message */ + message?: (string|null); + + /** Job labels */ + labels?: ({ [k: string]: string }|null); + + /** Job trigger */ + trigger?: (google.cloud.dataplex.v1.Job.Trigger|keyof typeof google.cloud.dataplex.v1.Job.Trigger|null); + + /** Job executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + } + + /** Represents a Job. */ + class Job implements IJob { + + /** + * Constructs a new Job. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJob); + + /** Job name. */ + public name: string; + + /** Job uid. */ + public uid: string; + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job state. */ + public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); + + /** Job retryCount. */ + public retryCount: number; + + /** Job service. */ + public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); + + /** Job serviceJob. */ + public serviceJob: string; + + /** Job message. */ + public message: string; + + /** Job labels. */ + public labels: { [k: string]: string }; + + /** Job trigger. */ + public trigger: (google.cloud.dataplex.v1.Job.Trigger|keyof typeof google.cloud.dataplex.v1.Job.Trigger); + + /** Job executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** + * Creates a new Job instance using the specified properties. + * @param [properties] Properties to set + * @returns Job instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Job message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Job; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Job; + + /** + * Verifies a Job message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Job + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Job to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Job + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Job { + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + ABORTED = 6 + } + + /** Trigger enum. */ + enum Trigger { + TRIGGER_UNSPECIFIED = 0, + TASK_CONFIG = 1, + RUN_REQUEST = 2 + } + } + + /** Represents a ContentService */ + class ContentService extends $protobuf.rpc.Service { + + /** + * Constructs a new ContentService 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 ContentService 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): ContentService; + + /** + * Calls CreateContent. + * @param request CreateContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest, callback: google.cloud.dataplex.v1.ContentService.CreateContentCallback): void; + + /** + * Calls CreateContent. + * @param request CreateContentRequest message or plain object + * @returns Promise + */ + public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest): Promise; + + /** + * Calls UpdateContent. + * @param request UpdateContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest, callback: google.cloud.dataplex.v1.ContentService.UpdateContentCallback): void; + + /** + * Calls UpdateContent. + * @param request UpdateContentRequest message or plain object + * @returns Promise + */ + public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest): Promise; + + /** + * Calls DeleteContent. + * @param request DeleteContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest, callback: google.cloud.dataplex.v1.ContentService.DeleteContentCallback): void; + + /** + * Calls DeleteContent. + * @param request DeleteContentRequest message or plain object + * @returns Promise + */ + public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest): Promise; + + /** + * Calls GetContent. + * @param request GetContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Content + */ + public getContent(request: google.cloud.dataplex.v1.IGetContentRequest, callback: google.cloud.dataplex.v1.ContentService.GetContentCallback): void; + + /** + * Calls GetContent. + * @param request GetContentRequest message or plain object + * @returns Promise + */ + public getContent(request: google.cloud.dataplex.v1.IGetContentRequest): 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.dataplex.v1.ContentService.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.dataplex.v1.ContentService.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.dataplex.v1.ContentService.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls ListContent. + * @param request ListContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContentResponse + */ + public listContent(request: google.cloud.dataplex.v1.IListContentRequest, callback: google.cloud.dataplex.v1.ContentService.ListContentCallback): void; + + /** + * Calls ListContent. + * @param request ListContentRequest message or plain object + * @returns Promise + */ + public listContent(request: google.cloud.dataplex.v1.IListContentRequest): Promise; + } + + namespace ContentService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. + * @param error Error, if any + * @param [response] Content + */ + type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. + * @param error Error, if any + * @param [response] Content + */ + type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. + * @param error Error, if any + * @param [response] Content + */ + type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|listContent}. + * @param error Error, if any + * @param [response] ListContentResponse + */ + type ListContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListContentResponse) => void; + } + + /** Properties of a CreateContentRequest. */ + interface ICreateContentRequest { + + /** CreateContentRequest parent */ + parent?: (string|null); + + /** CreateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); + + /** CreateContentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateContentRequest. */ + class CreateContentRequest implements ICreateContentRequest { + + /** + * Constructs a new CreateContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateContentRequest); + + /** CreateContentRequest parent. */ + public parent: string; + + /** CreateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); + + /** CreateContentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateContentRequest): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Verifies a CreateContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * @param message CreateContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateContentRequest. */ + interface IUpdateContentRequest { + + /** UpdateContentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); + + /** UpdateContentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateContentRequest. */ + class UpdateContentRequest implements IUpdateContentRequest { + + /** + * Constructs a new UpdateContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateContentRequest); + + /** UpdateContentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); + + /** UpdateContentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateContentRequest): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Verifies an UpdateContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @param message UpdateContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteContentRequest. */ + interface IDeleteContentRequest { + + /** DeleteContentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteContentRequest. */ + class DeleteContentRequest implements IDeleteContentRequest { + + /** + * Constructs a new DeleteContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteContentRequest); + + /** DeleteContentRequest name. */ + public name: string; + + /** + * Creates a new DeleteContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteContentRequest): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Verifies a DeleteContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. + * @param message DeleteContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListContentRequest. */ + interface IListContentRequest { + + /** ListContentRequest parent */ + parent?: (string|null); + + /** ListContentRequest pageSize */ + pageSize?: (number|null); + + /** ListContentRequest pageToken */ + pageToken?: (string|null); + + /** ListContentRequest filter */ + filter?: (string|null); + } + + /** Represents a ListContentRequest. */ + class ListContentRequest implements IListContentRequest { + + /** + * Constructs a new ListContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListContentRequest); + + /** ListContentRequest parent. */ + public parent: string; + + /** ListContentRequest pageSize. */ + public pageSize: number; + + /** ListContentRequest pageToken. */ + public pageToken: string; + + /** ListContentRequest filter. */ + public filter: string; + + /** + * Creates a new ListContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListContentRequest): google.cloud.dataplex.v1.ListContentRequest; + + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentRequest; + + /** + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentRequest; + + /** + * Verifies a ListContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentRequest; + + /** + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @param message ListContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListContentResponse. */ + interface IListContentResponse { + + /** ListContentResponse content */ + content?: (google.cloud.dataplex.v1.IContent[]|null); + + /** ListContentResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListContentResponse. */ + class ListContentResponse implements IListContentResponse { + + /** + * Constructs a new ListContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListContentResponse); + + /** ListContentResponse content. */ + public content: google.cloud.dataplex.v1.IContent[]; + + /** ListContentResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContentResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListContentResponse): google.cloud.dataplex.v1.ListContentResponse; + + /** + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentResponse; + + /** + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentResponse; + + /** + * Verifies a ListContentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentResponse; + + /** + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @param message ListContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetContentRequest. */ + interface IGetContentRequest { + + /** GetContentRequest name */ + name?: (string|null); + + /** GetContentRequest view */ + view?: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView|null); + } + + /** Represents a GetContentRequest. */ + class GetContentRequest implements IGetContentRequest { + + /** + * Constructs a new GetContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetContentRequest); + + /** GetContentRequest name. */ + public name: string; + + /** GetContentRequest view. */ + public view: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView); + + /** + * Creates a new GetContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetContentRequest): google.cloud.dataplex.v1.GetContentRequest; + + /** + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetContentRequest; + + /** + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetContentRequest; + + /** + * Verifies a GetContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetContentRequest; + + /** + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @param message GetContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetContentRequest { + + /** ContentView enum. */ + enum ContentView { + CONTENT_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } + } + + /** Properties of a DataDiscoverySpec. */ + interface IDataDiscoverySpec { + + /** DataDiscoverySpec bigqueryPublishingConfig */ + bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); + + /** DataDiscoverySpec storageConfig */ + storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); + } + + /** Represents a DataDiscoverySpec. */ + class DataDiscoverySpec implements IDataDiscoverySpec { + + /** + * Constructs a new DataDiscoverySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec); + + /** DataDiscoverySpec bigqueryPublishingConfig. */ + public bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); + + /** DataDiscoverySpec storageConfig. */ + public storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); + + /** DataDiscoverySpec resourceConfig. */ + public resourceConfig?: "storageConfig"; + + /** + * Creates a new DataDiscoverySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataDiscoverySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec): google.cloud.dataplex.v1.DataDiscoverySpec; + + /** + * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @param message DataDiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @param message DataDiscoverySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataDiscoverySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataDiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec; + + /** + * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataDiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec; + + /** + * Verifies a DataDiscoverySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataDiscoverySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec; + + /** + * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. + * @param message DataDiscoverySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataDiscoverySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataDiscoverySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataDiscoverySpec { + + /** Properties of a BigQueryPublishingConfig. */ + interface IBigQueryPublishingConfig { + + /** BigQueryPublishingConfig tableType */ + tableType?: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null); + + /** BigQueryPublishingConfig connection */ + connection?: (string|null); + } + + /** Represents a BigQueryPublishingConfig. */ + class BigQueryPublishingConfig implements IBigQueryPublishingConfig { + + /** + * Constructs a new BigQueryPublishingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig); + + /** BigQueryPublishingConfig tableType. */ + public tableType: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType); + + /** BigQueryPublishingConfig connection. */ + public connection: string; + + /** + * Creates a new BigQueryPublishingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryPublishingConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Encodes the specified BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @param message BigQueryPublishingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @param message BigQueryPublishingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Verifies a BigQueryPublishingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryPublishingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. + * @param message BigQueryPublishingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryPublishingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryPublishingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryPublishingConfig { + + /** TableType enum. */ + enum TableType { + TABLE_TYPE_UNSPECIFIED = 0, + EXTERNAL = 1, + BIGLAKE = 2 + } + } + + /** Properties of a StorageConfig. */ + interface IStorageConfig { + + /** StorageConfig includePatterns */ + includePatterns?: (string[]|null); + + /** StorageConfig excludePatterns */ + excludePatterns?: (string[]|null); + + /** StorageConfig csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); + + /** StorageConfig jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); + } + + /** Represents a StorageConfig. */ + class StorageConfig implements IStorageConfig { + + /** + * Constructs a new StorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig); + + /** StorageConfig includePatterns. */ + public includePatterns: string[]; + + /** StorageConfig excludePatterns. */ + public excludePatterns: string[]; + + /** StorageConfig csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); + + /** StorageConfig jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); + + /** + * Creates a new StorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Verifies a StorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @param message StorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StorageConfig { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions typeInferenceDisabled */ + typeInferenceDisabled?: (boolean|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions typeInferenceDisabled. */ + public typeInferenceDisabled: boolean; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + + /** JsonOptions typeInferenceDisabled */ + typeInferenceDisabled?: (boolean|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** JsonOptions typeInferenceDisabled. */ + public typeInferenceDisabled: boolean; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DataDiscoveryResult. */ + interface IDataDiscoveryResult { + + /** DataDiscoveryResult bigqueryPublishing */ + bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); + } + + /** Represents a DataDiscoveryResult. */ + class DataDiscoveryResult implements IDataDiscoveryResult { + + /** + * Constructs a new DataDiscoveryResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult); + + /** DataDiscoveryResult bigqueryPublishing. */ + public bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); + + /** + * Creates a new DataDiscoveryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataDiscoveryResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult): google.cloud.dataplex.v1.DataDiscoveryResult; + + /** + * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @param message DataDiscoveryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @param message DataDiscoveryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataDiscoveryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataDiscoveryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult; + + /** + * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataDiscoveryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult; + + /** + * Verifies a DataDiscoveryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataDiscoveryResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult; + + /** + * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. + * @param message DataDiscoveryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataDiscoveryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataDiscoveryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataDiscoveryResult { + + /** Properties of a BigQueryPublishing. */ + interface IBigQueryPublishing { + + /** BigQueryPublishing dataset */ + dataset?: (string|null); + } + + /** Represents a BigQueryPublishing. */ + class BigQueryPublishing implements IBigQueryPublishing { + + /** + * Constructs a new BigQueryPublishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing); + + /** BigQueryPublishing dataset. */ + public dataset: string; + + /** + * Creates a new BigQueryPublishing instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryPublishing instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; + + /** + * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @param message BigQueryPublishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @param message BigQueryPublishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; + + /** + * Verifies a BigQueryPublishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryPublishing + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; + + /** + * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. + * @param message BigQueryPublishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryPublishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryPublishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataProfileSpec. */ + interface IDataProfileSpec { + + /** DataProfileSpec samplingPercent */ + samplingPercent?: (number|null); + + /** DataProfileSpec rowFilter */ + rowFilter?: (string|null); + + /** DataProfileSpec postScanActions */ + postScanActions?: (google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null); + + /** DataProfileSpec includeFields */ + includeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); + + /** DataProfileSpec excludeFields */ + excludeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); + } + + /** Represents a DataProfileSpec. */ + class DataProfileSpec implements IDataProfileSpec { + + /** + * Constructs a new DataProfileSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataProfileSpec); + + /** DataProfileSpec samplingPercent. */ + public samplingPercent: number; + + /** DataProfileSpec rowFilter. */ + public rowFilter: string; + + /** DataProfileSpec postScanActions. */ + public postScanActions?: (google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null); + + /** DataProfileSpec includeFields. */ + public includeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); + + /** DataProfileSpec excludeFields. */ + public excludeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); + + /** + * Creates a new DataProfileSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataProfileSpec): google.cloud.dataplex.v1.DataProfileSpec; + + /** + * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @param message DataProfileSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @param message DataProfileSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec; + + /** + * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec; + + /** + * Verifies a DataProfileSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec; + + /** + * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. + * @param message DataProfileSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataProfileSpec { + + /** Properties of a PostScanActions. */ + interface IPostScanActions { + + /** PostScanActions bigqueryExport */ + bigqueryExport?: (google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null); + } + + /** Represents a PostScanActions. */ + class PostScanActions implements IPostScanActions { + + /** + * Constructs a new PostScanActions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions); + + /** PostScanActions bigqueryExport. */ + public bigqueryExport?: (google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null); + + /** + * Creates a new PostScanActions instance using the specified properties. + * @param [properties] Properties to set + * @returns PostScanActions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; + + /** + * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. + * @param message PostScanActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. + * @param message PostScanActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostScanActions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; + + /** + * Decodes a PostScanActions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; + + /** + * Verifies a PostScanActions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostScanActions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; + + /** + * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. + * @param message PostScanActions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostScanActions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostScanActions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostScanActions { + + /** Properties of a BigQueryExport. */ + interface IBigQueryExport { + + /** BigQueryExport resultsTable */ + resultsTable?: (string|null); + } + + /** Represents a BigQueryExport. */ + class BigQueryExport implements IBigQueryExport { + + /** + * Constructs a new BigQueryExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport); + + /** BigQueryExport resultsTable. */ + public resultsTable: string; + + /** + * Creates a new BigQueryExport instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryExport instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; + + /** + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; + + /** + * Verifies a BigQueryExport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryExport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; + + /** + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * @param message BigQueryExport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryExport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryExport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SelectedFields. */ + interface ISelectedFields { + + /** SelectedFields fieldNames */ + fieldNames?: (string[]|null); + } + + /** Represents a SelectedFields. */ + class SelectedFields implements ISelectedFields { + + /** + * Constructs a new SelectedFields. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields); + + /** SelectedFields fieldNames. */ + public fieldNames: string[]; + + /** + * Creates a new SelectedFields instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectedFields instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; + + /** + * Encodes the specified SelectedFields message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. + * @param message SelectedFields message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectedFields message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. + * @param message SelectedFields message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectedFields message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectedFields + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; + + /** + * Decodes a SelectedFields message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectedFields + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; + + /** + * Verifies a SelectedFields message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectedFields message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectedFields + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; + + /** + * Creates a plain object from a SelectedFields message. Also converts values to other types if specified. + * @param message SelectedFields + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectedFields to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectedFields + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataProfileResult. */ + interface IDataProfileResult { + + /** DataProfileResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataProfileResult profile */ + profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); + + /** DataProfileResult scannedData */ + scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + + /** DataProfileResult postScanActionsResult */ + postScanActionsResult?: (google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null); + } + + /** Represents a DataProfileResult. */ + class DataProfileResult implements IDataProfileResult { + + /** + * Constructs a new DataProfileResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataProfileResult); + + /** DataProfileResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataProfileResult profile. */ + public profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); + + /** DataProfileResult scannedData. */ + public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + + /** DataProfileResult postScanActionsResult. */ + public postScanActionsResult?: (google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null); + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataProfileResult): google.cloud.dataplex.v1.DataProfileResult; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult; + + /** + * Verifies a DataProfileResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult; + + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @param message DataProfileResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataProfileResult { + + /** Properties of a Profile. */ + interface IProfile { + + /** Profile fields */ + fields?: (google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]|null); + } + + /** Represents a Profile. */ + class Profile implements IProfile { + + /** + * Constructs a new Profile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile); + + /** Profile fields. */ + public fields: google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]; + + /** + * Creates a new Profile instance using the specified properties. + * @param [properties] Properties to set + * @returns Profile instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile): google.cloud.dataplex.v1.DataProfileResult.Profile; + + /** + * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @param message Profile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @param message Profile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Profile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Profile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile; + + /** + * Decodes a Profile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Profile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile; + + /** + * Verifies a Profile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Profile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Profile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile; + + /** + * Creates a plain object from a Profile message. Also converts values to other types if specified. + * @param message Profile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Profile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Profile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Profile { + + /** Properties of a Field. */ + interface IField { + + /** Field name */ + name?: (string|null); + + /** Field type */ + type?: (string|null); + + /** Field mode */ + mode?: (string|null); + + /** Field profile */ + profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField); + + /** Field name. */ + public name: string; + + /** Field type. */ + public type: string; + + /** Field mode. */ + public mode: string; + + /** Field profile. */ + public profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Field { + + /** Properties of a ProfileInfo. */ + interface IProfileInfo { + + /** ProfileInfo nullRatio */ + nullRatio?: (number|null); + + /** ProfileInfo distinctRatio */ + distinctRatio?: (number|null); + + /** ProfileInfo topNValues */ + topNValues?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]|null); + + /** ProfileInfo stringProfile */ + stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); + + /** ProfileInfo integerProfile */ + integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); + + /** ProfileInfo doubleProfile */ + doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); + } + + /** Represents a ProfileInfo. */ + class ProfileInfo implements IProfileInfo { + + /** + * Constructs a new ProfileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo); + + /** ProfileInfo nullRatio. */ + public nullRatio: number; + + /** ProfileInfo distinctRatio. */ + public distinctRatio: number; + + /** ProfileInfo topNValues. */ + public topNValues: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]; + + /** ProfileInfo stringProfile. */ + public stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); + + /** ProfileInfo integerProfile. */ + public integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); + + /** ProfileInfo doubleProfile. */ + public doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); + + /** ProfileInfo fieldInfo. */ + public fieldInfo?: ("stringProfile"|"integerProfile"|"doubleProfile"); + + /** + * Creates a new ProfileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProfileInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @param message ProfileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @param message ProfileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Verifies a ProfileInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProfileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProfileInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. + * @param message ProfileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProfileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProfileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProfileInfo { + + /** Properties of a StringFieldInfo. */ + interface IStringFieldInfo { + + /** StringFieldInfo minLength */ + minLength?: (number|Long|string|null); + + /** StringFieldInfo maxLength */ + maxLength?: (number|Long|string|null); + + /** StringFieldInfo averageLength */ + averageLength?: (number|null); + } + + /** Represents a StringFieldInfo. */ + class StringFieldInfo implements IStringFieldInfo { + + /** + * Constructs a new StringFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo); + + /** StringFieldInfo minLength. */ + public minLength: (number|Long|string); + + /** StringFieldInfo maxLength. */ + public maxLength: (number|Long|string); + + /** StringFieldInfo averageLength. */ + public averageLength: number; + + /** + * Creates a new StringFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @param message StringFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @param message StringFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Verifies a StringFieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. + * @param message StringFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntegerFieldInfo. */ + interface IIntegerFieldInfo { + + /** IntegerFieldInfo average */ + average?: (number|null); + + /** IntegerFieldInfo standardDeviation */ + standardDeviation?: (number|null); + + /** IntegerFieldInfo min */ + min?: (number|Long|string|null); + + /** IntegerFieldInfo quartiles */ + quartiles?: ((number|Long|string)[]|null); + + /** IntegerFieldInfo max */ + max?: (number|Long|string|null); + } + + /** Represents an IntegerFieldInfo. */ + class IntegerFieldInfo implements IIntegerFieldInfo { + + /** + * Constructs a new IntegerFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo); + + /** IntegerFieldInfo average. */ + public average: number; + + /** IntegerFieldInfo standardDeviation. */ + public standardDeviation: number; + + /** IntegerFieldInfo min. */ + public min: (number|Long|string); + + /** IntegerFieldInfo quartiles. */ + public quartiles: (number|Long|string)[]; + + /** IntegerFieldInfo max. */ + public max: (number|Long|string); + + /** + * Creates a new IntegerFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns IntegerFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @param message IntegerFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @param message IntegerFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Verifies an IntegerFieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntegerFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. + * @param message IntegerFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntegerFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntegerFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleFieldInfo. */ + interface IDoubleFieldInfo { + + /** DoubleFieldInfo average */ + average?: (number|null); + + /** DoubleFieldInfo standardDeviation */ + standardDeviation?: (number|null); + + /** DoubleFieldInfo min */ + min?: (number|null); + + /** DoubleFieldInfo quartiles */ + quartiles?: (number[]|null); + + /** DoubleFieldInfo max */ + max?: (number|null); + } + + /** Represents a DoubleFieldInfo. */ + class DoubleFieldInfo implements IDoubleFieldInfo { + + /** + * Constructs a new DoubleFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo); + + /** DoubleFieldInfo average. */ + public average: number; + + /** DoubleFieldInfo standardDeviation. */ + public standardDeviation: number; + + /** DoubleFieldInfo min. */ + public min: number; + + /** DoubleFieldInfo quartiles. */ + public quartiles: number[]; + + /** DoubleFieldInfo max. */ + public max: number; + + /** + * Creates a new DoubleFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @param message DoubleFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @param message DoubleFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Verifies a DoubleFieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. + * @param message DoubleFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TopNValue. */ + interface ITopNValue { + + /** TopNValue value */ + value?: (string|null); + + /** TopNValue count */ + count?: (number|Long|string|null); + + /** TopNValue ratio */ + ratio?: (number|null); + } + + /** Represents a TopNValue. */ + class TopNValue implements ITopNValue { + + /** + * Constructs a new TopNValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue); + + /** TopNValue value. */ + public value: string; + + /** TopNValue count. */ + public count: (number|Long|string); + + /** TopNValue ratio. */ + public ratio: number; + + /** + * Creates a new TopNValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TopNValue instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @param message TopNValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @param message TopNValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TopNValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Decodes a TopNValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Verifies a TopNValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TopNValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TopNValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Creates a plain object from a TopNValue message. Also converts values to other types if specified. + * @param message TopNValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TopNValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TopNValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Properties of a PostScanActionsResult. */ + interface IPostScanActionsResult { + + /** PostScanActionsResult bigqueryExportResult */ + bigqueryExportResult?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null); + } + + /** Represents a PostScanActionsResult. */ + class PostScanActionsResult implements IPostScanActionsResult { + + /** + * Constructs a new PostScanActionsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult); + + /** PostScanActionsResult bigqueryExportResult. */ + public bigqueryExportResult?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null); + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PostScanActionsResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; + + /** + * Verifies a PostScanActionsResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostScanActionsResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @param message PostScanActionsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostScanActionsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostScanActionsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostScanActionsResult { + + /** Properties of a BigQueryExportResult. */ + interface IBigQueryExportResult { + + /** BigQueryExportResult state */ + state?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|null); + + /** BigQueryExportResult message */ + message?: (string|null); + } + + /** Represents a BigQueryExportResult. */ + class BigQueryExportResult implements IBigQueryExportResult { + + /** + * Constructs a new BigQueryExportResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult); + + /** BigQueryExportResult state. */ + public state: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State); + + /** BigQueryExportResult message. */ + public message: string; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryExportResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Verifies a BigQueryExportResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryExportResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @param message BigQueryExportResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryExportResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryExportResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryExportResult { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + SKIPPED = 3 + } + } + } + } + + /** Properties of a Trigger. */ + interface ITrigger { + + /** Trigger onDemand */ + onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); + + /** Trigger schedule */ + schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); + } + + /** Represents a Trigger. */ + class Trigger implements ITrigger { + + /** + * Constructs a new Trigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITrigger); + + /** Trigger onDemand. */ + public onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); + + /** Trigger schedule. */ + public schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); + + /** Trigger mode. */ + public mode?: ("onDemand"|"schedule"); + + /** + * Creates a new Trigger instance using the specified properties. + * @param [properties] Properties to set + * @returns Trigger instance + */ + public static create(properties?: google.cloud.dataplex.v1.ITrigger): google.cloud.dataplex.v1.Trigger; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger; + + /** + * Verifies a Trigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trigger + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @param message Trigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Trigger { + + /** Properties of an OnDemand. */ + interface IOnDemand { + } + + /** Represents an OnDemand. */ + class OnDemand implements IOnDemand { + + /** + * Constructs a new OnDemand. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand); + + /** + * Creates a new OnDemand instance using the specified properties. + * @param [properties] Properties to set + * @returns OnDemand instance + */ + public static create(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand): google.cloud.dataplex.v1.Trigger.OnDemand; + + /** + * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @param message OnDemand message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @param message OnDemand message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OnDemand message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.OnDemand; + + /** + * Decodes an OnDemand message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.OnDemand; + + /** + * Verifies an OnDemand message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OnDemand + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.OnDemand; + + /** + * Creates a plain object from an OnDemand message. Also converts values to other types if specified. + * @param message OnDemand + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Trigger.OnDemand, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OnDemand to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OnDemand + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schedule. */ + interface ISchedule { + + /** Schedule cron */ + cron?: (string|null); + } + + /** Represents a Schedule. */ + class Schedule implements ISchedule { + + /** + * Constructs a new Schedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Trigger.ISchedule); + + /** Schedule cron. */ + public cron: string; + + /** + * Creates a new Schedule instance using the specified properties. + * @param [properties] Properties to set + * @returns Schedule instance + */ + public static create(properties?: google.cloud.dataplex.v1.Trigger.ISchedule): google.cloud.dataplex.v1.Trigger.Schedule; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.Schedule; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.Schedule; + + /** + * Verifies a Schedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.Schedule; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @param message Schedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Trigger.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource entity */ + entity?: (string|null); + + /** DataSource resource */ + resource?: (string|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataSource); + + /** DataSource entity. */ + public entity?: (string|null); + + /** DataSource resource. */ + public resource?: (string|null); + + /** DataSource source. */ + public source?: ("entity"|"resource"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataSource): google.cloud.dataplex.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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; + } + + /** Properties of a ScannedData. */ + interface IScannedData { + + /** ScannedData incrementalField */ + incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); + } + + /** Represents a ScannedData. */ + class ScannedData implements IScannedData { + + /** + * Constructs a new ScannedData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IScannedData); + + /** ScannedData incrementalField. */ + public incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); + + /** ScannedData dataRange. */ + public dataRange?: "incrementalField"; + + /** + * Creates a new ScannedData instance using the specified properties. + * @param [properties] Properties to set + * @returns ScannedData instance + */ + public static create(properties?: google.cloud.dataplex.v1.IScannedData): google.cloud.dataplex.v1.ScannedData; + + /** + * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @param message ScannedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @param message ScannedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScannedData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScannedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ScannedData; + + /** + * Decodes a ScannedData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScannedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ScannedData; + + /** + * Verifies a ScannedData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScannedData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScannedData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData; + + /** + * Creates a plain object from a ScannedData message. Also converts values to other types if specified. + * @param message ScannedData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ScannedData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScannedData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScannedData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScannedData { + + /** Properties of an IncrementalField. */ + interface IIncrementalField { + + /** IncrementalField field */ + field?: (string|null); + + /** IncrementalField start */ + start?: (string|null); + + /** IncrementalField end */ + end?: (string|null); + } + + /** Represents an IncrementalField. */ + class IncrementalField implements IIncrementalField { + + /** + * Constructs a new IncrementalField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField); + + /** IncrementalField field. */ + public field: string; + + /** IncrementalField start. */ + public start: string; + + /** IncrementalField end. */ + public end: string; + + /** + * Creates a new IncrementalField instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalField instance + */ + public static create(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @param message IncrementalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @param message IncrementalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Decodes an IncrementalField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Verifies an IncrementalField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IncrementalField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. + * @param message IncrementalField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ScannedData.IncrementalField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataQualitySpec. */ + interface IDataQualitySpec { + + /** DataQualitySpec rules */ + rules?: (google.cloud.dataplex.v1.IDataQualityRule[]|null); + + /** DataQualitySpec samplingPercent */ + samplingPercent?: (number|null); + + /** DataQualitySpec rowFilter */ + rowFilter?: (string|null); + + /** DataQualitySpec postScanActions */ + postScanActions?: (google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null); + } + + /** Represents a DataQualitySpec. */ + class DataQualitySpec implements IDataQualitySpec { + + /** + * Constructs a new DataQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualitySpec); + + /** DataQualitySpec rules. */ + public rules: google.cloud.dataplex.v1.IDataQualityRule[]; + + /** DataQualitySpec samplingPercent. */ + public samplingPercent: number; + + /** DataQualitySpec rowFilter. */ + public rowFilter: string; + + /** DataQualitySpec postScanActions. */ + public postScanActions?: (google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null); + + /** + * Creates a new DataQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualitySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualitySpec): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @param message DataQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @param message DataQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Verifies a DataQualitySpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. + * @param message DataQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataQualitySpec { + + /** Properties of a PostScanActions. */ + interface IPostScanActions { + + /** PostScanActions bigqueryExport */ + bigqueryExport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null); + + /** PostScanActions notificationReport */ + notificationReport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null); + } + + /** Represents a PostScanActions. */ + class PostScanActions implements IPostScanActions { + + /** + * Constructs a new PostScanActions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions); + + /** PostScanActions bigqueryExport. */ + public bigqueryExport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null); + + /** PostScanActions notificationReport. */ + public notificationReport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null); + + /** + * Creates a new PostScanActions instance using the specified properties. + * @param [properties] Properties to set + * @returns PostScanActions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; + + /** + * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. + * @param message PostScanActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. + * @param message PostScanActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostScanActions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; + + /** + * Decodes a PostScanActions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; + + /** + * Verifies a PostScanActions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostScanActions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; + + /** + * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. + * @param message PostScanActions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostScanActions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostScanActions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostScanActions { + + /** Properties of a BigQueryExport. */ + interface IBigQueryExport { + + /** BigQueryExport resultsTable */ + resultsTable?: (string|null); + } + + /** Represents a BigQueryExport. */ + class BigQueryExport implements IBigQueryExport { + + /** + * Constructs a new BigQueryExport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport); + + /** BigQueryExport resultsTable. */ + public resultsTable: string; + + /** + * Creates a new BigQueryExport instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryExport instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; + + /** + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @param message BigQueryExport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; + + /** + * Verifies a BigQueryExport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryExport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; + + /** + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * @param message BigQueryExport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryExport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryExport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Recipients. */ + interface IRecipients { + + /** Recipients emails */ + emails?: (string[]|null); + } + + /** Represents a Recipients. */ + class Recipients implements IRecipients { + + /** + * Constructs a new Recipients. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients); + + /** Recipients emails. */ + public emails: string[]; + + /** + * Creates a new Recipients instance using the specified properties. + * @param [properties] Properties to set + * @returns Recipients instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; + + /** + * Encodes the specified Recipients message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. + * @param message Recipients message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Recipients message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. + * @param message Recipients message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Recipients message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Recipients + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; + + /** + * Decodes a Recipients message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Recipients + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; + + /** + * Verifies a Recipients message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Recipients message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Recipients + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; + + /** + * Creates a plain object from a Recipients message. Also converts values to other types if specified. + * @param message Recipients + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Recipients to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Recipients + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScoreThresholdTrigger. */ + interface IScoreThresholdTrigger { + + /** ScoreThresholdTrigger scoreThreshold */ + scoreThreshold?: (number|null); + } + + /** Represents a ScoreThresholdTrigger. */ + class ScoreThresholdTrigger implements IScoreThresholdTrigger { + + /** + * Constructs a new ScoreThresholdTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger); + + /** ScoreThresholdTrigger scoreThreshold. */ + public scoreThreshold: number; + + /** + * Creates a new ScoreThresholdTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns ScoreThresholdTrigger instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; + + /** + * Encodes the specified ScoreThresholdTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. + * @param message ScoreThresholdTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScoreThresholdTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. + * @param message ScoreThresholdTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScoreThresholdTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScoreThresholdTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; + + /** + * Decodes a ScoreThresholdTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScoreThresholdTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; + + /** + * Verifies a ScoreThresholdTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScoreThresholdTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScoreThresholdTrigger + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; + + /** + * Creates a plain object from a ScoreThresholdTrigger message. Also converts values to other types if specified. + * @param message ScoreThresholdTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScoreThresholdTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScoreThresholdTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JobFailureTrigger. */ + interface IJobFailureTrigger { + } + + /** Represents a JobFailureTrigger. */ + class JobFailureTrigger implements IJobFailureTrigger { + + /** + * Constructs a new JobFailureTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger); + + /** + * Creates a new JobFailureTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns JobFailureTrigger instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; + + /** + * Encodes the specified JobFailureTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. + * @param message JobFailureTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobFailureTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. + * @param message JobFailureTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobFailureTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobFailureTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; + + /** + * Decodes a JobFailureTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobFailureTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; + + /** + * Verifies a JobFailureTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobFailureTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobFailureTrigger + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; + + /** + * Creates a plain object from a JobFailureTrigger message. Also converts values to other types if specified. + * @param message JobFailureTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobFailureTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobFailureTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JobEndTrigger. */ + interface IJobEndTrigger { + } + + /** Represents a JobEndTrigger. */ + class JobEndTrigger implements IJobEndTrigger { + + /** + * Constructs a new JobEndTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger); + + /** + * Creates a new JobEndTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEndTrigger instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; + + /** + * Encodes the specified JobEndTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. + * @param message JobEndTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEndTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. + * @param message JobEndTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEndTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEndTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; + + /** + * Decodes a JobEndTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEndTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; + + /** + * Verifies a JobEndTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobEndTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEndTrigger + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; + + /** + * Creates a plain object from a JobEndTrigger message. Also converts values to other types if specified. + * @param message JobEndTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEndTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobEndTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NotificationReport. */ + interface INotificationReport { + + /** NotificationReport recipients */ + recipients?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null); + + /** NotificationReport scoreThresholdTrigger */ + scoreThresholdTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null); + + /** NotificationReport jobFailureTrigger */ + jobFailureTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null); + + /** NotificationReport jobEndTrigger */ + jobEndTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null); + } + + /** Represents a NotificationReport. */ + class NotificationReport implements INotificationReport { + + /** + * Constructs a new NotificationReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport); + + /** NotificationReport recipients. */ + public recipients?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null); + + /** NotificationReport scoreThresholdTrigger. */ + public scoreThresholdTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null); + + /** NotificationReport jobFailureTrigger. */ + public jobFailureTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null); + + /** NotificationReport jobEndTrigger. */ + public jobEndTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null); + + /** + * Creates a new NotificationReport instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationReport instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; + + /** + * Encodes the specified NotificationReport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. + * @param message NotificationReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationReport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. + * @param message NotificationReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; + + /** + * Decodes a NotificationReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; + + /** + * Verifies a NotificationReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; + + /** + * Creates a plain object from a NotificationReport message. Also converts values to other types if specified. + * @param message NotificationReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DataQualityResult. */ + interface IDataQualityResult { + + /** DataQualityResult passed */ + passed?: (boolean|null); + + /** DataQualityResult score */ + score?: (number|null); + + /** DataQualityResult dimensions */ + dimensions?: (google.cloud.dataplex.v1.IDataQualityDimensionResult[]|null); + + /** DataQualityResult columns */ + columns?: (google.cloud.dataplex.v1.IDataQualityColumnResult[]|null); + + /** DataQualityResult rules */ + rules?: (google.cloud.dataplex.v1.IDataQualityRuleResult[]|null); + + /** DataQualityResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataQualityResult scannedData */ + scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + + /** DataQualityResult postScanActionsResult */ + postScanActionsResult?: (google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null); + } + + /** Represents a DataQualityResult. */ + class DataQualityResult implements IDataQualityResult { + + /** + * Constructs a new DataQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityResult); + + /** DataQualityResult passed. */ + public passed: boolean; + + /** DataQualityResult score. */ + public score?: (number|null); + + /** DataQualityResult dimensions. */ + public dimensions: google.cloud.dataplex.v1.IDataQualityDimensionResult[]; + + /** DataQualityResult columns. */ + public columns: google.cloud.dataplex.v1.IDataQualityColumnResult[]; + + /** DataQualityResult rules. */ + public rules: google.cloud.dataplex.v1.IDataQualityRuleResult[]; + + /** DataQualityResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataQualityResult scannedData. */ + public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + + /** DataQualityResult postScanActionsResult. */ + public postScanActionsResult?: (google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null); + + /** DataQualityResult _score. */ + public _score?: "score"; + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityResult): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Verifies a DataQualityResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @param message DataQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataQualityResult { + + /** Properties of a PostScanActionsResult. */ + interface IPostScanActionsResult { + + /** PostScanActionsResult bigqueryExportResult */ + bigqueryExportResult?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null); + } + + /** Represents a PostScanActionsResult. */ + class PostScanActionsResult implements IPostScanActionsResult { + + /** + * Constructs a new PostScanActionsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult); + + /** PostScanActionsResult bigqueryExportResult. */ + public bigqueryExportResult?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null); + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PostScanActionsResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; + + /** + * Verifies a PostScanActionsResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostScanActionsResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @param message PostScanActionsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostScanActionsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostScanActionsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostScanActionsResult { + + /** Properties of a BigQueryExportResult. */ + interface IBigQueryExportResult { + + /** BigQueryExportResult state */ + state?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|null); + + /** BigQueryExportResult message */ + message?: (string|null); + } + + /** Represents a BigQueryExportResult. */ + class BigQueryExportResult implements IBigQueryExportResult { + + /** + * Constructs a new BigQueryExportResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult); + + /** BigQueryExportResult state. */ + public state: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State); + + /** BigQueryExportResult message. */ + public message: string; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryExportResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Verifies a BigQueryExportResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryExportResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @param message BigQueryExportResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryExportResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryExportResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryExportResult { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + SKIPPED = 3 + } + } + } + } + + /** Properties of a DataQualityRuleResult. */ + interface IDataQualityRuleResult { + + /** DataQualityRuleResult rule */ + rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); + + /** DataQualityRuleResult passed */ + passed?: (boolean|null); + + /** DataQualityRuleResult evaluatedCount */ + evaluatedCount?: (number|Long|string|null); + + /** DataQualityRuleResult passedCount */ + passedCount?: (number|Long|string|null); + + /** DataQualityRuleResult nullCount */ + nullCount?: (number|Long|string|null); + + /** DataQualityRuleResult passRatio */ + passRatio?: (number|null); + + /** DataQualityRuleResult failingRowsQuery */ + failingRowsQuery?: (string|null); + + /** DataQualityRuleResult assertionRowCount */ + assertionRowCount?: (number|Long|string|null); + } + + /** Represents a DataQualityRuleResult. */ + class DataQualityRuleResult implements IDataQualityRuleResult { + + /** + * Constructs a new DataQualityRuleResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult); + + /** DataQualityRuleResult rule. */ + public rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); + + /** DataQualityRuleResult passed. */ + public passed: boolean; + + /** DataQualityRuleResult evaluatedCount. */ + public evaluatedCount: (number|Long|string); + + /** DataQualityRuleResult passedCount. */ + public passedCount: (number|Long|string); + + /** DataQualityRuleResult nullCount. */ + public nullCount: (number|Long|string); + + /** DataQualityRuleResult passRatio. */ + public passRatio: number; + + /** DataQualityRuleResult failingRowsQuery. */ + public failingRowsQuery: string; + + /** DataQualityRuleResult assertionRowCount. */ + public assertionRowCount: (number|Long|string); + + /** + * Creates a new DataQualityRuleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityRuleResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @param message DataQualityRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @param message DataQualityRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Verifies a DataQualityRuleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityRuleResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. + * @param message DataQualityRuleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRuleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityRuleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityRuleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityDimensionResult. */ + interface IDataQualityDimensionResult { + + /** DataQualityDimensionResult dimension */ + dimension?: (google.cloud.dataplex.v1.IDataQualityDimension|null); + + /** DataQualityDimensionResult passed */ + passed?: (boolean|null); + + /** DataQualityDimensionResult score */ + score?: (number|null); + } + + /** Represents a DataQualityDimensionResult. */ + class DataQualityDimensionResult implements IDataQualityDimensionResult { + + /** + * Constructs a new DataQualityDimensionResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult); + + /** DataQualityDimensionResult dimension. */ + public dimension?: (google.cloud.dataplex.v1.IDataQualityDimension|null); + + /** DataQualityDimensionResult passed. */ + public passed: boolean; + + /** DataQualityDimensionResult score. */ + public score?: (number|null); + + /** DataQualityDimensionResult _score. */ + public _score?: "score"; + + /** + * Creates a new DataQualityDimensionResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityDimensionResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @param message DataQualityDimensionResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @param message DataQualityDimensionResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Verifies a DataQualityDimensionResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityDimensionResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. + * @param message DataQualityDimensionResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityDimensionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityDimensionResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityDimensionResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityDimension. */ + interface IDataQualityDimension { + + /** DataQualityDimension name */ + name?: (string|null); + } + + /** Represents a DataQualityDimension. */ + class DataQualityDimension implements IDataQualityDimension { + + /** + * Constructs a new DataQualityDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityDimension); + + /** DataQualityDimension name. */ + public name: string; + + /** + * Creates a new DataQualityDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityDimension instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityDimension): google.cloud.dataplex.v1.DataQualityDimension; + + /** + * Encodes the specified DataQualityDimension message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. + * @param message DataQualityDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityDimension message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. + * @param message DataQualityDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityDimension; + + /** + * Decodes a DataQualityDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityDimension; + + /** + * Verifies a DataQualityDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityDimension + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityDimension; + + /** + * Creates a plain object from a DataQualityDimension message. Also converts values to other types if specified. + * @param message DataQualityDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityRule. */ + interface IDataQualityRule { + + /** DataQualityRule rangeExpectation */ + rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); + + /** DataQualityRule nonNullExpectation */ + nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); + + /** DataQualityRule setExpectation */ + setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); + + /** DataQualityRule regexExpectation */ + regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); + + /** DataQualityRule uniquenessExpectation */ + uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); + + /** DataQualityRule statisticRangeExpectation */ + statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); + + /** DataQualityRule rowConditionExpectation */ + rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); + + /** DataQualityRule tableConditionExpectation */ + tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); + + /** DataQualityRule sqlAssertion */ + sqlAssertion?: (google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null); + + /** DataQualityRule column */ + column?: (string|null); + + /** DataQualityRule ignoreNull */ + ignoreNull?: (boolean|null); + + /** DataQualityRule dimension */ + dimension?: (string|null); + + /** DataQualityRule threshold */ + threshold?: (number|null); + + /** DataQualityRule name */ + name?: (string|null); + + /** DataQualityRule description */ + description?: (string|null); + + /** DataQualityRule suspended */ + suspended?: (boolean|null); + } + + /** Represents a DataQualityRule. */ + class DataQualityRule implements IDataQualityRule { + + /** + * Constructs a new DataQualityRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityRule); + + /** DataQualityRule rangeExpectation. */ + public rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); + + /** DataQualityRule nonNullExpectation. */ + public nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); + + /** DataQualityRule setExpectation. */ + public setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); + + /** DataQualityRule regexExpectation. */ + public regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); + + /** DataQualityRule uniquenessExpectation. */ + public uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); + + /** DataQualityRule statisticRangeExpectation. */ + public statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); + + /** DataQualityRule rowConditionExpectation. */ + public rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); + + /** DataQualityRule tableConditionExpectation. */ + public tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); + + /** DataQualityRule sqlAssertion. */ + public sqlAssertion?: (google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null); + + /** DataQualityRule column. */ + public column: string; + + /** DataQualityRule ignoreNull. */ + public ignoreNull: boolean; + + /** DataQualityRule dimension. */ + public dimension: string; + + /** DataQualityRule threshold. */ + public threshold: number; + + /** DataQualityRule name. */ + public name: string; + + /** DataQualityRule description. */ + public description: string; + + /** DataQualityRule suspended. */ + public suspended: boolean; + + /** DataQualityRule ruleType. */ + public ruleType?: ("rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|"sqlAssertion"); + + /** + * Creates a new DataQualityRule instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityRule instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityRule): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @param message DataQualityRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @param message DataQualityRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Verifies a DataQualityRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. + * @param message DataQualityRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataQualityRule { + + /** Properties of a RangeExpectation. */ + interface IRangeExpectation { + + /** RangeExpectation minValue */ + minValue?: (string|null); + + /** RangeExpectation maxValue */ + maxValue?: (string|null); + + /** RangeExpectation strictMinEnabled */ + strictMinEnabled?: (boolean|null); + + /** RangeExpectation strictMaxEnabled */ + strictMaxEnabled?: (boolean|null); + } + + /** Represents a RangeExpectation. */ + class RangeExpectation implements IRangeExpectation { + + /** + * Constructs a new RangeExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation); + + /** RangeExpectation minValue. */ + public minValue: string; + + /** RangeExpectation maxValue. */ + public maxValue: string; + + /** RangeExpectation strictMinEnabled. */ + public strictMinEnabled: boolean; + + /** RangeExpectation strictMaxEnabled. */ + public strictMaxEnabled: boolean; + + /** + * Creates a new RangeExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RangeExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @param message RangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @param message RangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Verifies a RangeExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RangeExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RangeExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. + * @param message RangeExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RangeExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RangeExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NonNullExpectation. */ + interface INonNullExpectation { + } + + /** Represents a NonNullExpectation. */ + class NonNullExpectation implements INonNullExpectation { + + /** + * Constructs a new NonNullExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation); + + /** + * Creates a new NonNullExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns NonNullExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @param message NonNullExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @param message NonNullExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Verifies a NonNullExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NonNullExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NonNullExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. + * @param message NonNullExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NonNullExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NonNullExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetExpectation. */ + interface ISetExpectation { + + /** SetExpectation values */ + values?: (string[]|null); + } + + /** Represents a SetExpectation. */ + class SetExpectation implements ISetExpectation { + + /** + * Constructs a new SetExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation); + + /** SetExpectation values. */ + public values: string[]; + + /** + * Creates a new SetExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns SetExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @param message SetExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @param message SetExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Decodes a SetExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Verifies a SetExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. + * @param message SetExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.SetExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegexExpectation. */ + interface IRegexExpectation { + + /** RegexExpectation regex */ + regex?: (string|null); + } + + /** Represents a RegexExpectation. */ + class RegexExpectation implements IRegexExpectation { + + /** + * Constructs a new RegexExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation); + + /** RegexExpectation regex. */ + public regex: string; + + /** + * Creates a new RegexExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RegexExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @param message RegexExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @param message RegexExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Verifies a RegexExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegexExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegexExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. + * @param message RegexExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RegexExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegexExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegexExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UniquenessExpectation. */ + interface IUniquenessExpectation { + } + + /** Represents an UniquenessExpectation. */ + class UniquenessExpectation implements IUniquenessExpectation { + + /** + * Constructs a new UniquenessExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation); + + /** + * Creates a new UniquenessExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns UniquenessExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @param message UniquenessExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @param message UniquenessExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Verifies an UniquenessExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UniquenessExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UniquenessExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. + * @param message UniquenessExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UniquenessExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UniquenessExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatisticRangeExpectation. */ + interface IStatisticRangeExpectation { + + /** StatisticRangeExpectation statistic */ + statistic?: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null); + + /** StatisticRangeExpectation minValue */ + minValue?: (string|null); + + /** StatisticRangeExpectation maxValue */ + maxValue?: (string|null); + + /** StatisticRangeExpectation strictMinEnabled */ + strictMinEnabled?: (boolean|null); + + /** StatisticRangeExpectation strictMaxEnabled */ + strictMaxEnabled?: (boolean|null); + } + + /** Represents a StatisticRangeExpectation. */ + class StatisticRangeExpectation implements IStatisticRangeExpectation { + + /** + * Constructs a new StatisticRangeExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation); + + /** StatisticRangeExpectation statistic. */ + public statistic: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic); + + /** StatisticRangeExpectation minValue. */ + public minValue: string; + + /** StatisticRangeExpectation maxValue. */ + public maxValue: string; + + /** StatisticRangeExpectation strictMinEnabled. */ + public strictMinEnabled: boolean; + + /** StatisticRangeExpectation strictMaxEnabled. */ + public strictMaxEnabled: boolean; + + /** + * Creates a new StatisticRangeExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns StatisticRangeExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @param message StatisticRangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @param message StatisticRangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Verifies a StatisticRangeExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatisticRangeExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. + * @param message StatisticRangeExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatisticRangeExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatisticRangeExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatisticRangeExpectation { + + /** ColumnStatistic enum. */ + enum ColumnStatistic { + STATISTIC_UNDEFINED = 0, + MEAN = 1, + MIN = 2, + MAX = 3 + } + } + + /** Properties of a RowConditionExpectation. */ + interface IRowConditionExpectation { + + /** RowConditionExpectation sqlExpression */ + sqlExpression?: (string|null); + } + + /** Represents a RowConditionExpectation. */ + class RowConditionExpectation implements IRowConditionExpectation { + + /** + * Constructs a new RowConditionExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation); + + /** RowConditionExpectation sqlExpression. */ + public sqlExpression: string; + + /** + * Creates a new RowConditionExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RowConditionExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @param message RowConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @param message RowConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Verifies a RowConditionExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RowConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowConditionExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. + * @param message RowConditionExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowConditionExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowConditionExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableConditionExpectation. */ + interface ITableConditionExpectation { + + /** TableConditionExpectation sqlExpression */ + sqlExpression?: (string|null); + } + + /** Represents a TableConditionExpectation. */ + class TableConditionExpectation implements ITableConditionExpectation { + + /** + * Constructs a new TableConditionExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation); + + /** TableConditionExpectation sqlExpression. */ + public sqlExpression: string; + + /** + * Creates a new TableConditionExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns TableConditionExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @param message TableConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @param message TableConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Verifies a TableConditionExpectation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableConditionExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. + * @param message TableConditionExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableConditionExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableConditionExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlAssertion. */ + interface ISqlAssertion { + + /** SqlAssertion sqlStatement */ + sqlStatement?: (string|null); + } + + /** Represents a SqlAssertion. */ + class SqlAssertion implements ISqlAssertion { + + /** + * Constructs a new SqlAssertion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion); + + /** SqlAssertion sqlStatement. */ + public sqlStatement: string; + + /** + * Creates a new SqlAssertion instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlAssertion instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; + + /** + * Encodes the specified SqlAssertion message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. + * @param message SqlAssertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlAssertion message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. + * @param message SqlAssertion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlAssertion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlAssertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; + + /** + * Decodes a SqlAssertion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlAssertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; + + /** + * Verifies a SqlAssertion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SqlAssertion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlAssertion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; + + /** + * Creates a plain object from a SqlAssertion message. Also converts values to other types if specified. + * @param message SqlAssertion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.SqlAssertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlAssertion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlAssertion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataQualityColumnResult. */ + interface IDataQualityColumnResult { + + /** DataQualityColumnResult column */ + column?: (string|null); + + /** DataQualityColumnResult score */ + score?: (number|null); + } + + /** Represents a DataQualityColumnResult. */ + class DataQualityColumnResult implements IDataQualityColumnResult { + + /** + * Constructs a new DataQualityColumnResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityColumnResult); + + /** DataQualityColumnResult column. */ + public column: string; + + /** DataQualityColumnResult score. */ + public score?: (number|null); + + /** DataQualityColumnResult _score. */ + public _score?: "score"; + + /** + * Creates a new DataQualityColumnResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityColumnResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityColumnResult): google.cloud.dataplex.v1.DataQualityColumnResult; + + /** + * Encodes the specified DataQualityColumnResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. + * @param message DataQualityColumnResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityColumnResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityColumnResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. + * @param message DataQualityColumnResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityColumnResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityColumnResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityColumnResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityColumnResult; + + /** + * Decodes a DataQualityColumnResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityColumnResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityColumnResult; + + /** + * Verifies a DataQualityColumnResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityColumnResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityColumnResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityColumnResult; + + /** + * Creates a plain object from a DataQualityColumnResult message. Also converts values to other types if specified. + * @param message DataQualityColumnResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityColumnResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityColumnResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityColumnResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataTaxonomyService */ + class DataTaxonomyService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataTaxonomyService 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 DataTaxonomyService 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): DataTaxonomyService; + + /** + * Calls CreateDataTaxonomy. + * @param request CreateDataTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataTaxonomy(request: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomyCallback): void; + + /** + * Calls CreateDataTaxonomy. + * @param request CreateDataTaxonomyRequest message or plain object + * @returns Promise + */ + public createDataTaxonomy(request: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest): Promise; + + /** + * Calls UpdateDataTaxonomy. + * @param request UpdateDataTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataTaxonomy(request: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomyCallback): void; + + /** + * Calls UpdateDataTaxonomy. + * @param request UpdateDataTaxonomyRequest message or plain object + * @returns Promise + */ + public updateDataTaxonomy(request: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest): Promise; + + /** + * Calls DeleteDataTaxonomy. + * @param request DeleteDataTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataTaxonomy(request: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomyCallback): void; + + /** + * Calls DeleteDataTaxonomy. + * @param request DeleteDataTaxonomyRequest message or plain object + * @returns Promise + */ + public deleteDataTaxonomy(request: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest): Promise; + + /** + * Calls ListDataTaxonomies. + * @param request ListDataTaxonomiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataTaxonomiesResponse + */ + public listDataTaxonomies(request: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomiesCallback): void; + + /** + * Calls ListDataTaxonomies. + * @param request ListDataTaxonomiesRequest message or plain object + * @returns Promise + */ + public listDataTaxonomies(request: google.cloud.dataplex.v1.IListDataTaxonomiesRequest): Promise; + + /** + * Calls GetDataTaxonomy. + * @param request GetDataTaxonomyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataTaxonomy + */ + public getDataTaxonomy(request: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomyCallback): void; + + /** + * Calls GetDataTaxonomy. + * @param request GetDataTaxonomyRequest message or plain object + * @returns Promise + */ + public getDataTaxonomy(request: google.cloud.dataplex.v1.IGetDataTaxonomyRequest): Promise; + + /** + * Calls CreateDataAttributeBinding. + * @param request CreateDataAttributeBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataAttributeBinding(request: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBindingCallback): void; + + /** + * Calls CreateDataAttributeBinding. + * @param request CreateDataAttributeBindingRequest message or plain object + * @returns Promise + */ + public createDataAttributeBinding(request: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest): Promise; + + /** + * Calls UpdateDataAttributeBinding. + * @param request UpdateDataAttributeBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataAttributeBinding(request: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBindingCallback): void; + + /** + * Calls UpdateDataAttributeBinding. + * @param request UpdateDataAttributeBindingRequest message or plain object + * @returns Promise + */ + public updateDataAttributeBinding(request: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest): Promise; + + /** + * Calls DeleteDataAttributeBinding. + * @param request DeleteDataAttributeBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataAttributeBinding(request: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBindingCallback): void; + + /** + * Calls DeleteDataAttributeBinding. + * @param request DeleteDataAttributeBindingRequest message or plain object + * @returns Promise + */ + public deleteDataAttributeBinding(request: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest): Promise; + + /** + * Calls ListDataAttributeBindings. + * @param request ListDataAttributeBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataAttributeBindingsResponse + */ + public listDataAttributeBindings(request: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindingsCallback): void; + + /** + * Calls ListDataAttributeBindings. + * @param request ListDataAttributeBindingsRequest message or plain object + * @returns Promise + */ + public listDataAttributeBindings(request: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest): Promise; + + /** + * Calls GetDataAttributeBinding. + * @param request GetDataAttributeBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataAttributeBinding + */ + public getDataAttributeBinding(request: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBindingCallback): void; + + /** + * Calls GetDataAttributeBinding. + * @param request GetDataAttributeBindingRequest message or plain object + * @returns Promise + */ + public getDataAttributeBinding(request: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest): Promise; + + /** + * Calls CreateDataAttribute. + * @param request CreateDataAttributeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataAttribute(request: google.cloud.dataplex.v1.ICreateDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeCallback): void; + + /** + * Calls CreateDataAttribute. + * @param request CreateDataAttributeRequest message or plain object + * @returns Promise + */ + public createDataAttribute(request: google.cloud.dataplex.v1.ICreateDataAttributeRequest): Promise; + + /** + * Calls UpdateDataAttribute. + * @param request UpdateDataAttributeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataAttribute(request: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeCallback): void; + + /** + * Calls UpdateDataAttribute. + * @param request UpdateDataAttributeRequest message or plain object + * @returns Promise + */ + public updateDataAttribute(request: google.cloud.dataplex.v1.IUpdateDataAttributeRequest): Promise; + + /** + * Calls DeleteDataAttribute. + * @param request DeleteDataAttributeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataAttribute(request: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeCallback): void; + + /** + * Calls DeleteDataAttribute. + * @param request DeleteDataAttributeRequest message or plain object + * @returns Promise + */ + public deleteDataAttribute(request: google.cloud.dataplex.v1.IDeleteDataAttributeRequest): Promise; + + /** + * Calls ListDataAttributes. + * @param request ListDataAttributesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataAttributesResponse + */ + public listDataAttributes(request: google.cloud.dataplex.v1.IListDataAttributesRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributesCallback): void; + + /** + * Calls ListDataAttributes. + * @param request ListDataAttributesRequest message or plain object + * @returns Promise + */ + public listDataAttributes(request: google.cloud.dataplex.v1.IListDataAttributesRequest): Promise; + + /** + * Calls GetDataAttribute. + * @param request GetDataAttributeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataAttribute + */ + public getDataAttribute(request: google.cloud.dataplex.v1.IGetDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeCallback): void; + + /** + * Calls GetDataAttribute. + * @param request GetDataAttributeRequest message or plain object + * @returns Promise + */ + public getDataAttribute(request: google.cloud.dataplex.v1.IGetDataAttributeRequest): Promise; + } + + namespace DataTaxonomyService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataTaxonomy}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataTaxonomy}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataTaxonomy}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataTaxonomies}. + * @param error Error, if any + * @param [response] ListDataTaxonomiesResponse + */ + type ListDataTaxonomiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataTaxonomiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataTaxonomy}. + * @param error Error, if any + * @param [response] DataTaxonomy + */ + type GetDataTaxonomyCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataTaxonomy) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttributeBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttributeBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttributeBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributeBindings}. + * @param error Error, if any + * @param [response] ListDataAttributeBindingsResponse + */ + type ListDataAttributeBindingsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttributeBinding}. + * @param error Error, if any + * @param [response] DataAttributeBinding + */ + type GetDataAttributeBindingCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataAttributeBinding) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttribute}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttribute}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttribute}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributes}. + * @param error Error, if any + * @param [response] ListDataAttributesResponse + */ + type ListDataAttributesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataAttributesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttribute}. + * @param error Error, if any + * @param [response] DataAttribute + */ + type GetDataAttributeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataAttribute) => void; + } + + /** Properties of a DataTaxonomy. */ + interface IDataTaxonomy { + + /** DataTaxonomy name */ + name?: (string|null); + + /** DataTaxonomy uid */ + uid?: (string|null); + + /** DataTaxonomy createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataTaxonomy updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTaxonomy description */ + description?: (string|null); + + /** DataTaxonomy displayName */ + displayName?: (string|null); + + /** DataTaxonomy labels */ + labels?: ({ [k: string]: string }|null); + + /** DataTaxonomy attributeCount */ + attributeCount?: (number|null); + + /** DataTaxonomy etag */ + etag?: (string|null); + + /** DataTaxonomy classCount */ + classCount?: (number|null); + } + + /** Represents a DataTaxonomy. */ + class DataTaxonomy implements IDataTaxonomy { + + /** + * Constructs a new DataTaxonomy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataTaxonomy); + + /** DataTaxonomy name. */ + public name: string; + + /** DataTaxonomy uid. */ + public uid: string; + + /** DataTaxonomy createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataTaxonomy updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataTaxonomy description. */ + public description: string; + + /** DataTaxonomy displayName. */ + public displayName: string; + + /** DataTaxonomy labels. */ + public labels: { [k: string]: string }; + + /** DataTaxonomy attributeCount. */ + public attributeCount: number; + + /** DataTaxonomy etag. */ + public etag: string; + + /** DataTaxonomy classCount. */ + public classCount: number; + + /** + * Creates a new DataTaxonomy instance using the specified properties. + * @param [properties] Properties to set + * @returns DataTaxonomy instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataTaxonomy): google.cloud.dataplex.v1.DataTaxonomy; + + /** + * Encodes the specified DataTaxonomy message. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. + * @param message DataTaxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataTaxonomy message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. + * @param message DataTaxonomy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataTaxonomy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataTaxonomy; + + /** + * Decodes a DataTaxonomy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataTaxonomy; + + /** + * Verifies a DataTaxonomy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataTaxonomy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataTaxonomy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataTaxonomy; + + /** + * Creates a plain object from a DataTaxonomy message. Also converts values to other types if specified. + * @param message DataTaxonomy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataTaxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataTaxonomy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataTaxonomy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAttribute. */ + interface IDataAttribute { + + /** DataAttribute name */ + name?: (string|null); + + /** DataAttribute uid */ + uid?: (string|null); + + /** DataAttribute createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataAttribute updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAttribute description */ + description?: (string|null); + + /** DataAttribute displayName */ + displayName?: (string|null); + + /** DataAttribute labels */ + labels?: ({ [k: string]: string }|null); + + /** DataAttribute parentId */ + parentId?: (string|null); + + /** DataAttribute attributeCount */ + attributeCount?: (number|null); + + /** DataAttribute etag */ + etag?: (string|null); + + /** DataAttribute resourceAccessSpec */ + resourceAccessSpec?: (google.cloud.dataplex.v1.IResourceAccessSpec|null); + + /** DataAttribute dataAccessSpec */ + dataAccessSpec?: (google.cloud.dataplex.v1.IDataAccessSpec|null); + } + + /** Represents a DataAttribute. */ + class DataAttribute implements IDataAttribute { + + /** + * Constructs a new DataAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataAttribute); + + /** DataAttribute name. */ + public name: string; + + /** DataAttribute uid. */ + public uid: string; + + /** DataAttribute createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataAttribute updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAttribute description. */ + public description: string; + + /** DataAttribute displayName. */ + public displayName: string; + + /** DataAttribute labels. */ + public labels: { [k: string]: string }; + + /** DataAttribute parentId. */ + public parentId: string; + + /** DataAttribute attributeCount. */ + public attributeCount: number; + + /** DataAttribute etag. */ + public etag: string; + + /** DataAttribute resourceAccessSpec. */ + public resourceAccessSpec?: (google.cloud.dataplex.v1.IResourceAccessSpec|null); + + /** DataAttribute dataAccessSpec. */ + public dataAccessSpec?: (google.cloud.dataplex.v1.IDataAccessSpec|null); + + /** + * Creates a new DataAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAttribute instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataAttribute): google.cloud.dataplex.v1.DataAttribute; + + /** + * Encodes the specified DataAttribute message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. + * @param message DataAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAttribute message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. + * @param message DataAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttribute; + + /** + * Decodes a DataAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttribute; + + /** + * Verifies a DataAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAttribute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttribute; + + /** + * Creates a plain object from a DataAttribute message. Also converts values to other types if specified. + * @param message DataAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAttributeBinding. */ + interface IDataAttributeBinding { + + /** DataAttributeBinding name */ + name?: (string|null); + + /** DataAttributeBinding uid */ + uid?: (string|null); + + /** DataAttributeBinding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataAttributeBinding updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAttributeBinding description */ + description?: (string|null); + + /** DataAttributeBinding displayName */ + displayName?: (string|null); + + /** DataAttributeBinding labels */ + labels?: ({ [k: string]: string }|null); + + /** DataAttributeBinding etag */ + etag?: (string|null); + + /** DataAttributeBinding resource */ + resource?: (string|null); + + /** DataAttributeBinding attributes */ + attributes?: (string[]|null); + + /** DataAttributeBinding paths */ + paths?: (google.cloud.dataplex.v1.DataAttributeBinding.IPath[]|null); + } + + /** Represents a DataAttributeBinding. */ + class DataAttributeBinding implements IDataAttributeBinding { + + /** + * Constructs a new DataAttributeBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataAttributeBinding); + + /** DataAttributeBinding name. */ + public name: string; + + /** DataAttributeBinding uid. */ + public uid: string; + + /** DataAttributeBinding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataAttributeBinding updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataAttributeBinding description. */ + public description: string; + + /** DataAttributeBinding displayName. */ + public displayName: string; + + /** DataAttributeBinding labels. */ + public labels: { [k: string]: string }; + + /** DataAttributeBinding etag. */ + public etag: string; + + /** DataAttributeBinding resource. */ + public resource?: (string|null); + + /** DataAttributeBinding attributes. */ + public attributes: string[]; + + /** DataAttributeBinding paths. */ + public paths: google.cloud.dataplex.v1.DataAttributeBinding.IPath[]; + + /** DataAttributeBinding resourceReference. */ + public resourceReference?: "resource"; + + /** + * Creates a new DataAttributeBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAttributeBinding instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataAttributeBinding): google.cloud.dataplex.v1.DataAttributeBinding; + + /** + * Encodes the specified DataAttributeBinding message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. + * @param message DataAttributeBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataAttributeBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAttributeBinding message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. + * @param message DataAttributeBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAttributeBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAttributeBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAttributeBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttributeBinding; + + /** + * Decodes a DataAttributeBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAttributeBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttributeBinding; + + /** + * Verifies a DataAttributeBinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAttributeBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAttributeBinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttributeBinding; + + /** + * Creates a plain object from a DataAttributeBinding message. Also converts values to other types if specified. + * @param message DataAttributeBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataAttributeBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAttributeBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAttributeBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataAttributeBinding { + + /** Properties of a Path. */ + interface IPath { + + /** Path name */ + name?: (string|null); + + /** Path attributes */ + attributes?: (string[]|null); + } + + /** Represents a Path. */ + class Path implements IPath { + + /** + * Constructs a new Path. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataAttributeBinding.IPath); + + /** Path name. */ + public name: string; + + /** Path attributes. */ + public attributes: string[]; + + /** + * Creates a new Path instance using the specified properties. + * @param [properties] Properties to set + * @returns Path instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataAttributeBinding.IPath): google.cloud.dataplex.v1.DataAttributeBinding.Path; + + /** + * Encodes the specified Path message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. + * @param message Path message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataAttributeBinding.IPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Path message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. + * @param message Path message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataAttributeBinding.IPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Path message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Path + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttributeBinding.Path; + + /** + * Decodes a Path message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Path + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttributeBinding.Path; + + /** + * Verifies a Path message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Path message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Path + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttributeBinding.Path; + + /** + * Creates a plain object from a Path message. Also converts values to other types if specified. + * @param message Path + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataAttributeBinding.Path, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Path to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Path + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateDataTaxonomyRequest. */ + interface ICreateDataTaxonomyRequest { + + /** CreateDataTaxonomyRequest parent */ + parent?: (string|null); + + /** CreateDataTaxonomyRequest dataTaxonomyId */ + dataTaxonomyId?: (string|null); + + /** CreateDataTaxonomyRequest dataTaxonomy */ + dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); + + /** CreateDataTaxonomyRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateDataTaxonomyRequest. */ + class CreateDataTaxonomyRequest implements ICreateDataTaxonomyRequest { + + /** + * Constructs a new CreateDataTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest); + + /** CreateDataTaxonomyRequest parent. */ + public parent: string; + + /** CreateDataTaxonomyRequest dataTaxonomyId. */ + public dataTaxonomyId: string; + + /** CreateDataTaxonomyRequest dataTaxonomy. */ + public dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); + + /** CreateDataTaxonomyRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateDataTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataTaxonomyRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; + + /** + * Encodes the specified CreateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. + * @param message CreateDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. + * @param message CreateDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; + + /** + * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; + + /** + * Verifies a CreateDataTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; + + /** + * Creates a plain object from a CreateDataTaxonomyRequest message. Also converts values to other types if specified. + * @param message CreateDataTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataTaxonomyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataTaxonomyRequest. */ + interface IUpdateDataTaxonomyRequest { + + /** UpdateDataTaxonomyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataTaxonomyRequest dataTaxonomy */ + dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); + + /** UpdateDataTaxonomyRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateDataTaxonomyRequest. */ + class UpdateDataTaxonomyRequest implements IUpdateDataTaxonomyRequest { + + /** + * Constructs a new UpdateDataTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest); + + /** UpdateDataTaxonomyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataTaxonomyRequest dataTaxonomy. */ + public dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); + + /** UpdateDataTaxonomyRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateDataTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataTaxonomyRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; + + /** + * Encodes the specified UpdateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. + * @param message UpdateDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. + * @param message UpdateDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; + + /** + * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; + + /** + * Verifies an UpdateDataTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; + + /** + * Creates a plain object from an UpdateDataTaxonomyRequest message. Also converts values to other types if specified. + * @param message UpdateDataTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataTaxonomyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataTaxonomyRequest. */ + interface IGetDataTaxonomyRequest { + + /** GetDataTaxonomyRequest name */ + name?: (string|null); + } + + /** Represents a GetDataTaxonomyRequest. */ + class GetDataTaxonomyRequest implements IGetDataTaxonomyRequest { + + /** + * Constructs a new GetDataTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataTaxonomyRequest); + + /** GetDataTaxonomyRequest name. */ + public name: string; + + /** + * Creates a new GetDataTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataTaxonomyRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataTaxonomyRequest): google.cloud.dataplex.v1.GetDataTaxonomyRequest; + + /** + * Encodes the specified GetDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. + * @param message GetDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. + * @param message GetDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataTaxonomyRequest; + + /** + * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataTaxonomyRequest; + + /** + * Verifies a GetDataTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataTaxonomyRequest; + + /** + * Creates a plain object from a GetDataTaxonomyRequest message. Also converts values to other types if specified. + * @param message GetDataTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataTaxonomyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTaxonomiesRequest. */ + interface IListDataTaxonomiesRequest { + + /** ListDataTaxonomiesRequest parent */ + parent?: (string|null); + + /** ListDataTaxonomiesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataTaxonomiesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataTaxonomiesRequest filter */ + filter?: (string|null); + + /** ListDataTaxonomiesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataTaxonomiesRequest. */ + class ListDataTaxonomiesRequest implements IListDataTaxonomiesRequest { + + /** + * Constructs a new ListDataTaxonomiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesRequest); + + /** ListDataTaxonomiesRequest parent. */ + public parent: string; + + /** ListDataTaxonomiesRequest pageSize. */ + public pageSize: number; + + /** ListDataTaxonomiesRequest pageToken. */ + public pageToken: string; + + /** ListDataTaxonomiesRequest filter. */ + public filter: string; + + /** ListDataTaxonomiesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataTaxonomiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTaxonomiesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesRequest): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; + + /** + * Encodes the specified ListDataTaxonomiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. + * @param message ListDataTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. + * @param message ListDataTaxonomiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; + + /** + * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; + + /** + * Verifies a ListDataTaxonomiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTaxonomiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; + + /** + * Creates a plain object from a ListDataTaxonomiesRequest message. Also converts values to other types if specified. + * @param message ListDataTaxonomiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTaxonomiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTaxonomiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataTaxonomiesResponse. */ + interface IListDataTaxonomiesResponse { + + /** ListDataTaxonomiesResponse dataTaxonomies */ + dataTaxonomies?: (google.cloud.dataplex.v1.IDataTaxonomy[]|null); + + /** ListDataTaxonomiesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataTaxonomiesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListDataTaxonomiesResponse. */ + class ListDataTaxonomiesResponse implements IListDataTaxonomiesResponse { + + /** + * Constructs a new ListDataTaxonomiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesResponse); + + /** ListDataTaxonomiesResponse dataTaxonomies. */ + public dataTaxonomies: google.cloud.dataplex.v1.IDataTaxonomy[]; + + /** ListDataTaxonomiesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataTaxonomiesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListDataTaxonomiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataTaxonomiesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesResponse): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; + + /** + * Encodes the specified ListDataTaxonomiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. + * @param message ListDataTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. + * @param message ListDataTaxonomiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; + + /** + * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; + + /** + * Verifies a ListDataTaxonomiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataTaxonomiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; + + /** + * Creates a plain object from a ListDataTaxonomiesResponse message. Also converts values to other types if specified. + * @param message ListDataTaxonomiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataTaxonomiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataTaxonomiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataTaxonomyRequest. */ + interface IDeleteDataTaxonomyRequest { + + /** DeleteDataTaxonomyRequest name */ + name?: (string|null); + + /** DeleteDataTaxonomyRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteDataTaxonomyRequest. */ + class DeleteDataTaxonomyRequest implements IDeleteDataTaxonomyRequest { + + /** + * Constructs a new DeleteDataTaxonomyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest); + + /** DeleteDataTaxonomyRequest name. */ + public name: string; + + /** DeleteDataTaxonomyRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteDataTaxonomyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataTaxonomyRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; + + /** + * Encodes the specified DeleteDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. + * @param message DeleteDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. + * @param message DeleteDataTaxonomyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; + + /** + * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; + + /** + * Verifies a DeleteDataTaxonomyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataTaxonomyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; + + /** + * Creates a plain object from a DeleteDataTaxonomyRequest message. Also converts values to other types if specified. + * @param message DeleteDataTaxonomyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataTaxonomyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataTaxonomyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataAttributeRequest. */ + interface ICreateDataAttributeRequest { + + /** CreateDataAttributeRequest parent */ + parent?: (string|null); + + /** CreateDataAttributeRequest dataAttributeId */ + dataAttributeId?: (string|null); + + /** CreateDataAttributeRequest dataAttribute */ + dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); + + /** CreateDataAttributeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateDataAttributeRequest. */ + class CreateDataAttributeRequest implements ICreateDataAttributeRequest { + + /** + * Constructs a new CreateDataAttributeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateDataAttributeRequest); + + /** CreateDataAttributeRequest parent. */ + public parent: string; + + /** CreateDataAttributeRequest dataAttributeId. */ + public dataAttributeId: string; + + /** CreateDataAttributeRequest dataAttribute. */ + public dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); + + /** CreateDataAttributeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateDataAttributeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataAttributeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateDataAttributeRequest): google.cloud.dataplex.v1.CreateDataAttributeRequest; + + /** + * Encodes the specified CreateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. + * @param message CreateDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. + * @param message CreateDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataAttributeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataAttributeRequest; + + /** + * Decodes a CreateDataAttributeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataAttributeRequest; + + /** + * Verifies a CreateDataAttributeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataAttributeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataAttributeRequest; + + /** + * Creates a plain object from a CreateDataAttributeRequest message. Also converts values to other types if specified. + * @param message CreateDataAttributeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataAttributeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataAttributeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataAttributeRequest. */ + interface IUpdateDataAttributeRequest { + + /** UpdateDataAttributeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAttributeRequest dataAttribute */ + dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); + + /** UpdateDataAttributeRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateDataAttributeRequest. */ + class UpdateDataAttributeRequest implements IUpdateDataAttributeRequest { + + /** + * Constructs a new UpdateDataAttributeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeRequest); + + /** UpdateDataAttributeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAttributeRequest dataAttribute. */ + public dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); + + /** UpdateDataAttributeRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateDataAttributeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataAttributeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeRequest): google.cloud.dataplex.v1.UpdateDataAttributeRequest; + + /** + * Encodes the specified UpdateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. + * @param message UpdateDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. + * @param message UpdateDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataAttributeRequest; + + /** + * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataAttributeRequest; + + /** + * Verifies an UpdateDataAttributeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataAttributeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataAttributeRequest; + + /** + * Creates a plain object from an UpdateDataAttributeRequest message. Also converts values to other types if specified. + * @param message UpdateDataAttributeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataAttributeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataAttributeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataAttributeRequest. */ + interface IGetDataAttributeRequest { + + /** GetDataAttributeRequest name */ + name?: (string|null); + } + + /** Represents a GetDataAttributeRequest. */ + class GetDataAttributeRequest implements IGetDataAttributeRequest { + + /** + * Constructs a new GetDataAttributeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataAttributeRequest); + + /** GetDataAttributeRequest name. */ + public name: string; + + /** + * Creates a new GetDataAttributeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataAttributeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataAttributeRequest): google.cloud.dataplex.v1.GetDataAttributeRequest; + + /** + * Encodes the specified GetDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. + * @param message GetDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. + * @param message GetDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataAttributeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataAttributeRequest; + + /** + * Decodes a GetDataAttributeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataAttributeRequest; + + /** + * Verifies a GetDataAttributeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataAttributeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataAttributeRequest; + + /** + * Creates a plain object from a GetDataAttributeRequest message. Also converts values to other types if specified. + * @param message GetDataAttributeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataAttributeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataAttributeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAttributesRequest. */ + interface IListDataAttributesRequest { + + /** ListDataAttributesRequest parent */ + parent?: (string|null); + + /** ListDataAttributesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataAttributesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataAttributesRequest filter */ + filter?: (string|null); + + /** ListDataAttributesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataAttributesRequest. */ + class ListDataAttributesRequest implements IListDataAttributesRequest { + + /** + * Constructs a new ListDataAttributesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataAttributesRequest); + + /** ListDataAttributesRequest parent. */ + public parent: string; + + /** ListDataAttributesRequest pageSize. */ + public pageSize: number; + + /** ListDataAttributesRequest pageToken. */ + public pageToken: string; + + /** ListDataAttributesRequest filter. */ + public filter: string; + + /** ListDataAttributesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataAttributesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAttributesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataAttributesRequest): google.cloud.dataplex.v1.ListDataAttributesRequest; + + /** + * Encodes the specified ListDataAttributesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. + * @param message ListDataAttributesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAttributesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. + * @param message ListDataAttributesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAttributesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAttributesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributesRequest; + + /** + * Decodes a ListDataAttributesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAttributesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributesRequest; + + /** + * Verifies a ListDataAttributesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAttributesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAttributesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributesRequest; + + /** + * Creates a plain object from a ListDataAttributesRequest message. Also converts values to other types if specified. + * @param message ListDataAttributesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAttributesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAttributesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAttributesResponse. */ + interface IListDataAttributesResponse { + + /** ListDataAttributesResponse dataAttributes */ + dataAttributes?: (google.cloud.dataplex.v1.IDataAttribute[]|null); + + /** ListDataAttributesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataAttributesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListDataAttributesResponse. */ + class ListDataAttributesResponse implements IListDataAttributesResponse { + + /** + * Constructs a new ListDataAttributesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataAttributesResponse); + + /** ListDataAttributesResponse dataAttributes. */ + public dataAttributes: google.cloud.dataplex.v1.IDataAttribute[]; + + /** ListDataAttributesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataAttributesResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListDataAttributesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAttributesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataAttributesResponse): google.cloud.dataplex.v1.ListDataAttributesResponse; + + /** + * Encodes the specified ListDataAttributesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. + * @param message ListDataAttributesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAttributesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. + * @param message ListDataAttributesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAttributesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAttributesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributesResponse; + + /** + * Decodes a ListDataAttributesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAttributesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributesResponse; + + /** + * Verifies a ListDataAttributesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAttributesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAttributesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributesResponse; + + /** + * Creates a plain object from a ListDataAttributesResponse message. Also converts values to other types if specified. + * @param message ListDataAttributesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAttributesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAttributesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataAttributeRequest. */ + interface IDeleteDataAttributeRequest { + + /** DeleteDataAttributeRequest name */ + name?: (string|null); + + /** DeleteDataAttributeRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteDataAttributeRequest. */ + class DeleteDataAttributeRequest implements IDeleteDataAttributeRequest { + + /** + * Constructs a new DeleteDataAttributeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeRequest); + + /** DeleteDataAttributeRequest name. */ + public name: string; + + /** DeleteDataAttributeRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteDataAttributeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataAttributeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeRequest): google.cloud.dataplex.v1.DeleteDataAttributeRequest; + + /** + * Encodes the specified DeleteDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. + * @param message DeleteDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. + * @param message DeleteDataAttributeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataAttributeRequest; + + /** + * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataAttributeRequest; + + /** + * Verifies a DeleteDataAttributeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataAttributeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataAttributeRequest; + + /** + * Creates a plain object from a DeleteDataAttributeRequest message. Also converts values to other types if specified. + * @param message DeleteDataAttributeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataAttributeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataAttributeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataAttributeBindingRequest. */ + interface ICreateDataAttributeBindingRequest { + + /** CreateDataAttributeBindingRequest parent */ + parent?: (string|null); + + /** CreateDataAttributeBindingRequest dataAttributeBindingId */ + dataAttributeBindingId?: (string|null); + + /** CreateDataAttributeBindingRequest dataAttributeBinding */ + dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); + + /** CreateDataAttributeBindingRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateDataAttributeBindingRequest. */ + class CreateDataAttributeBindingRequest implements ICreateDataAttributeBindingRequest { + + /** + * Constructs a new CreateDataAttributeBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest); + + /** CreateDataAttributeBindingRequest parent. */ + public parent: string; + + /** CreateDataAttributeBindingRequest dataAttributeBindingId. */ + public dataAttributeBindingId: string; + + /** CreateDataAttributeBindingRequest dataAttributeBinding. */ + public dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); + + /** CreateDataAttributeBindingRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateDataAttributeBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataAttributeBindingRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; + + /** + * Encodes the specified CreateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. + * @param message CreateDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. + * @param message CreateDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; + + /** + * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; + + /** + * Verifies a CreateDataAttributeBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataAttributeBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; + + /** + * Creates a plain object from a CreateDataAttributeBindingRequest message. Also converts values to other types if specified. + * @param message CreateDataAttributeBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataAttributeBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataAttributeBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataAttributeBindingRequest. */ + interface IUpdateDataAttributeBindingRequest { + + /** UpdateDataAttributeBindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAttributeBindingRequest dataAttributeBinding */ + dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); + + /** UpdateDataAttributeBindingRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateDataAttributeBindingRequest. */ + class UpdateDataAttributeBindingRequest implements IUpdateDataAttributeBindingRequest { + + /** + * Constructs a new UpdateDataAttributeBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest); + + /** UpdateDataAttributeBindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataAttributeBindingRequest dataAttributeBinding. */ + public dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); + + /** UpdateDataAttributeBindingRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateDataAttributeBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataAttributeBindingRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; + + /** + * Encodes the specified UpdateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. + * @param message UpdateDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. + * @param message UpdateDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; + + /** + * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; + + /** + * Verifies an UpdateDataAttributeBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataAttributeBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; + + /** + * Creates a plain object from an UpdateDataAttributeBindingRequest message. Also converts values to other types if specified. + * @param message UpdateDataAttributeBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataAttributeBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataAttributeBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataAttributeBindingRequest. */ + interface IGetDataAttributeBindingRequest { + + /** GetDataAttributeBindingRequest name */ + name?: (string|null); + } + + /** Represents a GetDataAttributeBindingRequest. */ + class GetDataAttributeBindingRequest implements IGetDataAttributeBindingRequest { + + /** + * Constructs a new GetDataAttributeBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest); + + /** GetDataAttributeBindingRequest name. */ + public name: string; + + /** + * Creates a new GetDataAttributeBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataAttributeBindingRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + + /** + * Encodes the specified GetDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. + * @param message GetDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. + * @param message GetDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + + /** + * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + + /** + * Verifies a GetDataAttributeBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataAttributeBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + + /** + * Creates a plain object from a GetDataAttributeBindingRequest message. Also converts values to other types if specified. + * @param message GetDataAttributeBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataAttributeBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataAttributeBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAttributeBindingsRequest. */ + interface IListDataAttributeBindingsRequest { + + /** ListDataAttributeBindingsRequest parent */ + parent?: (string|null); + + /** ListDataAttributeBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataAttributeBindingsRequest pageToken */ + pageToken?: (string|null); + + /** ListDataAttributeBindingsRequest filter */ + filter?: (string|null); + + /** ListDataAttributeBindingsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataAttributeBindingsRequest. */ + class ListDataAttributeBindingsRequest implements IListDataAttributeBindingsRequest { + + /** + * Constructs a new ListDataAttributeBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest); + + /** ListDataAttributeBindingsRequest parent. */ + public parent: string; + + /** ListDataAttributeBindingsRequest pageSize. */ + public pageSize: number; + + /** ListDataAttributeBindingsRequest pageToken. */ + public pageToken: string; + + /** ListDataAttributeBindingsRequest filter. */ + public filter: string; + + /** ListDataAttributeBindingsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataAttributeBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAttributeBindingsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; + + /** + * Encodes the specified ListDataAttributeBindingsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. + * @param message ListDataAttributeBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAttributeBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. + * @param message ListDataAttributeBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAttributeBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; + + /** + * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAttributeBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; + + /** + * Verifies a ListDataAttributeBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAttributeBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAttributeBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; + + /** + * Creates a plain object from a ListDataAttributeBindingsRequest message. Also converts values to other types if specified. + * @param message ListDataAttributeBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAttributeBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAttributeBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataAttributeBindingsResponse. */ + interface IListDataAttributeBindingsResponse { + + /** ListDataAttributeBindingsResponse dataAttributeBindings */ + dataAttributeBindings?: (google.cloud.dataplex.v1.IDataAttributeBinding[]|null); + + /** ListDataAttributeBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataAttributeBindingsResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListDataAttributeBindingsResponse. */ + class ListDataAttributeBindingsResponse implements IListDataAttributeBindingsResponse { + + /** + * Constructs a new ListDataAttributeBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse); + + /** ListDataAttributeBindingsResponse dataAttributeBindings. */ + public dataAttributeBindings: google.cloud.dataplex.v1.IDataAttributeBinding[]; + + /** ListDataAttributeBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataAttributeBindingsResponse unreachableLocations. */ + public unreachableLocations: string[]; + + /** + * Creates a new ListDataAttributeBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataAttributeBindingsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; + + /** + * Encodes the specified ListDataAttributeBindingsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. + * @param message ListDataAttributeBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataAttributeBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. + * @param message ListDataAttributeBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataAttributeBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; + + /** + * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataAttributeBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; + + /** + * Verifies a ListDataAttributeBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataAttributeBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataAttributeBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; + + /** + * Creates a plain object from a ListDataAttributeBindingsResponse message. Also converts values to other types if specified. + * @param message ListDataAttributeBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataAttributeBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataAttributeBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataAttributeBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataAttributeBindingRequest. */ + interface IDeleteDataAttributeBindingRequest { + + /** DeleteDataAttributeBindingRequest name */ + name?: (string|null); + + /** DeleteDataAttributeBindingRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteDataAttributeBindingRequest. */ + class DeleteDataAttributeBindingRequest implements IDeleteDataAttributeBindingRequest { + + /** + * Constructs a new DeleteDataAttributeBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest); + + /** DeleteDataAttributeBindingRequest name. */ + public name: string; + + /** DeleteDataAttributeBindingRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteDataAttributeBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataAttributeBindingRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; + + /** + * Encodes the specified DeleteDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. + * @param message DeleteDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. + * @param message DeleteDataAttributeBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; + + /** + * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; + + /** + * Verifies a DeleteDataAttributeBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataAttributeBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; + + /** + * Creates a plain object from a DeleteDataAttributeBindingRequest message. Also converts values to other types if specified. + * @param message DeleteDataAttributeBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataAttributeBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataAttributeBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceAccessSpec. */ + interface IResourceAccessSpec { + + /** ResourceAccessSpec readers */ + readers?: (string[]|null); + + /** ResourceAccessSpec writers */ + writers?: (string[]|null); + + /** ResourceAccessSpec owners */ + owners?: (string[]|null); + } + + /** Represents a ResourceAccessSpec. */ + class ResourceAccessSpec implements IResourceAccessSpec { + + /** + * Constructs a new ResourceAccessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IResourceAccessSpec); + + /** ResourceAccessSpec readers. */ + public readers: string[]; + + /** ResourceAccessSpec writers. */ + public writers: string[]; + + /** ResourceAccessSpec owners. */ + public owners: string[]; + + /** + * Creates a new ResourceAccessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceAccessSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IResourceAccessSpec): google.cloud.dataplex.v1.ResourceAccessSpec; + + /** + * Encodes the specified ResourceAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. + * @param message ResourceAccessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IResourceAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. + * @param message ResourceAccessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IResourceAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceAccessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ResourceAccessSpec; + + /** + * Decodes a ResourceAccessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ResourceAccessSpec; + + /** + * Verifies a ResourceAccessSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceAccessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceAccessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ResourceAccessSpec; + + /** + * Creates a plain object from a ResourceAccessSpec message. Also converts values to other types if specified. + * @param message ResourceAccessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ResourceAccessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceAccessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceAccessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataAccessSpec. */ + interface IDataAccessSpec { + + /** DataAccessSpec readers */ + readers?: (string[]|null); + } + + /** Represents a DataAccessSpec. */ + class DataAccessSpec implements IDataAccessSpec { + + /** + * Constructs a new DataAccessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataAccessSpec); + + /** DataAccessSpec readers. */ + public readers: string[]; + + /** + * Creates a new DataAccessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataAccessSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataAccessSpec): google.cloud.dataplex.v1.DataAccessSpec; + + /** + * Encodes the specified DataAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. + * @param message DataAccessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. + * @param message DataAccessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataAccessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAccessSpec; + + /** + * Decodes a DataAccessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAccessSpec; + + /** + * Verifies a DataAccessSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataAccessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataAccessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAccessSpec; + + /** + * Creates a plain object from a DataAccessSpec message. Also converts values to other types if specified. + * @param message DataAccessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataAccessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataAccessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataAccessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DataScanService */ + class DataScanService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataScanService 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 DataScanService 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): DataScanService; + + /** + * Calls CreateDataScan. + * @param request CreateDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback): void; + + /** + * Calls CreateDataScan. + * @param request CreateDataScanRequest message or plain object + * @returns Promise + */ + public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest): Promise; + + /** + * Calls UpdateDataScan. + * @param request UpdateDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback): void; + + /** + * Calls UpdateDataScan. + * @param request UpdateDataScanRequest message or plain object + * @returns Promise + */ + public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest): Promise; + + /** + * Calls DeleteDataScan. + * @param request DeleteDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback): void; + + /** + * Calls DeleteDataScan. + * @param request DeleteDataScanRequest message or plain object + * @returns Promise + */ + public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest): Promise; + + /** + * Calls GetDataScan. + * @param request GetDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataScan + */ + public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanCallback): void; + + /** + * Calls GetDataScan. + * @param request GetDataScanRequest message or plain object + * @returns Promise + */ + public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest): Promise; + + /** + * Calls ListDataScans. + * @param request ListDataScansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataScansResponse + */ + public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScansCallback): void; + + /** + * Calls ListDataScans. + * @param request ListDataScansRequest message or plain object + * @returns Promise + */ + public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest): Promise; + + /** + * Calls RunDataScan. + * @param request RunDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunDataScanResponse + */ + public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.RunDataScanCallback): void; + + /** + * Calls RunDataScan. + * @param request RunDataScanRequest message or plain object + * @returns Promise + */ + public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest): Promise; + + /** + * Calls GetDataScanJob. + * @param request GetDataScanJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataScanJob + */ + public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback): void; + + /** + * Calls GetDataScanJob. + * @param request GetDataScanJobRequest message or plain object + * @returns Promise + */ + public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest): Promise; + + /** + * Calls ListDataScanJobs. + * @param request ListDataScanJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataScanJobsResponse + */ + public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback): void; + + /** + * Calls ListDataScanJobs. + * @param request ListDataScanJobsRequest message or plain object + * @returns Promise + */ + public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest): Promise; + + /** + * Calls GenerateDataQualityRules. + * @param request GenerateDataQualityRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateDataQualityRulesResponse + */ + public generateDataQualityRules(request: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, callback: google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRulesCallback): void; + + /** + * Calls GenerateDataQualityRules. + * @param request GenerateDataQualityRulesRequest message or plain object + * @returns Promise + */ + public generateDataQualityRules(request: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest): Promise; + } + + namespace DataScanService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. + * @param error Error, if any + * @param [response] DataScan + */ + type GetDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScan) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. + * @param error Error, if any + * @param [response] ListDataScansResponse + */ + type ListDataScansCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScansResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. + * @param error Error, if any + * @param [response] RunDataScanResponse + */ + type RunDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunDataScanResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. + * @param error Error, if any + * @param [response] DataScanJob + */ + type GetDataScanJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScanJob) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. + * @param error Error, if any + * @param [response] ListDataScanJobsResponse + */ + type ListDataScanJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScanJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|generateDataQualityRules}. + * @param error Error, if any + * @param [response] GenerateDataQualityRulesResponse + */ + type GenerateDataQualityRulesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.GenerateDataQualityRulesResponse) => void; + } + + /** Properties of a CreateDataScanRequest. */ + interface ICreateDataScanRequest { + + /** CreateDataScanRequest parent */ + parent?: (string|null); + + /** CreateDataScanRequest dataScan */ + dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** CreateDataScanRequest dataScanId */ + dataScanId?: (string|null); + + /** CreateDataScanRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateDataScanRequest. */ + class CreateDataScanRequest implements ICreateDataScanRequest { + + /** + * Constructs a new CreateDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest); + + /** CreateDataScanRequest parent. */ + public parent: string; + + /** CreateDataScanRequest dataScan. */ + public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** CreateDataScanRequest dataScanId. */ + public dataScanId: string; + + /** CreateDataScanRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @param message CreateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @param message CreateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Verifies a CreateDataScanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. + * @param message CreateDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataScanRequest. */ + interface IUpdateDataScanRequest { + + /** UpdateDataScanRequest dataScan */ + dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** UpdateDataScanRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataScanRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateDataScanRequest. */ + class UpdateDataScanRequest implements IUpdateDataScanRequest { + + /** + * Constructs a new UpdateDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest); + + /** UpdateDataScanRequest dataScan. */ + public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** UpdateDataScanRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataScanRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @param message UpdateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @param message UpdateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Verifies an UpdateDataScanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. + * @param message UpdateDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataScanRequest. */ + interface IDeleteDataScanRequest { + + /** DeleteDataScanRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataScanRequest. */ + class DeleteDataScanRequest implements IDeleteDataScanRequest { + + /** + * Constructs a new DeleteDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest); + + /** DeleteDataScanRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @param message DeleteDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @param message DeleteDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Verifies a DeleteDataScanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. + * @param message DeleteDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataScanRequest. */ + interface IGetDataScanRequest { + + /** GetDataScanRequest name */ + name?: (string|null); + + /** GetDataScanRequest view */ + view?: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null); + } + + /** Represents a GetDataScanRequest. */ + class GetDataScanRequest implements IGetDataScanRequest { + + /** + * Constructs a new GetDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataScanRequest); + + /** GetDataScanRequest name. */ + public name: string; + + /** GetDataScanRequest view. */ + public view: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView); + + /** + * Creates a new GetDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataScanRequest): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @param message GetDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @param message GetDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Verifies a GetDataScanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. + * @param message GetDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetDataScanRequest { + + /** DataScanView enum. */ + enum DataScanView { + DATA_SCAN_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 10 + } + } + + /** Properties of a ListDataScansRequest. */ + interface IListDataScansRequest { + + /** ListDataScansRequest parent */ + parent?: (string|null); + + /** ListDataScansRequest pageSize */ + pageSize?: (number|null); + + /** ListDataScansRequest pageToken */ + pageToken?: (string|null); + + /** ListDataScansRequest filter */ + filter?: (string|null); + + /** ListDataScansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataScansRequest. */ + class ListDataScansRequest implements IListDataScansRequest { + + /** + * Constructs a new ListDataScansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScansRequest); + + /** ListDataScansRequest parent. */ + public parent: string; + + /** ListDataScansRequest pageSize. */ + public pageSize: number; + + /** ListDataScansRequest pageToken. */ + public pageToken: string; + + /** ListDataScansRequest filter. */ + public filter: string; + + /** ListDataScansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataScansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScansRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScansRequest): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @param message ListDataScansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @param message ListDataScansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Verifies a ListDataScansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataScansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. + * @param message ListDataScansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataScansResponse. */ + interface IListDataScansResponse { + + /** ListDataScansResponse dataScans */ + dataScans?: (google.cloud.dataplex.v1.IDataScan[]|null); + + /** ListDataScansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataScansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataScansResponse. */ + class ListDataScansResponse implements IListDataScansResponse { + + /** + * Constructs a new ListDataScansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScansResponse); + + /** ListDataScansResponse dataScans. */ + public dataScans: google.cloud.dataplex.v1.IDataScan[]; + + /** ListDataScansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataScansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataScansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScansResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScansResponse): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @param message ListDataScansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @param message ListDataScansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Verifies a ListDataScansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataScansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Creates a plain object from a ListDataScansResponse message. Also converts values to other types if specified. + * @param message ListDataScansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunDataScanRequest. */ + interface IRunDataScanRequest { + + /** RunDataScanRequest name */ + name?: (string|null); + } + + /** Represents a RunDataScanRequest. */ + class RunDataScanRequest implements IRunDataScanRequest { + + /** + * Constructs a new RunDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunDataScanRequest); + + /** RunDataScanRequest name. */ + public name: string; + + /** + * Creates a new RunDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunDataScanRequest): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @param message RunDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @param message RunDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Verifies a RunDataScanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. + * @param message RunDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunDataScanResponse. */ + interface IRunDataScanResponse { + + /** RunDataScanResponse job */ + job?: (google.cloud.dataplex.v1.IDataScanJob|null); + } + + /** Represents a RunDataScanResponse. */ + class RunDataScanResponse implements IRunDataScanResponse { + + /** + * Constructs a new RunDataScanResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunDataScanResponse); + + /** RunDataScanResponse job. */ + public job?: (google.cloud.dataplex.v1.IDataScanJob|null); + + /** + * Creates a new RunDataScanResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunDataScanResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunDataScanResponse): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @param message RunDataScanResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @param message RunDataScanResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Verifies a RunDataScanResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunDataScanResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunDataScanResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. + * @param message RunDataScanResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunDataScanResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunDataScanResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunDataScanResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataScanJobRequest. */ + interface IGetDataScanJobRequest { + + /** GetDataScanJobRequest name */ + name?: (string|null); + + /** GetDataScanJobRequest view */ + view?: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null); + } + + /** Represents a GetDataScanJobRequest. */ + class GetDataScanJobRequest implements IGetDataScanJobRequest { + + /** + * Constructs a new GetDataScanJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest); + + /** GetDataScanJobRequest name. */ + public name: string; + + /** GetDataScanJobRequest view. */ + public view: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView); + + /** + * Creates a new GetDataScanJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataScanJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @param message GetDataScanJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @param message GetDataScanJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Verifies a GetDataScanJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataScanJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. + * @param message GetDataScanJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataScanJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataScanJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataScanJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetDataScanJobRequest { + + /** DataScanJobView enum. */ + enum DataScanJobView { + DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 10 + } + } + + /** Properties of a ListDataScanJobsRequest. */ + interface IListDataScanJobsRequest { + + /** ListDataScanJobsRequest parent */ + parent?: (string|null); + + /** ListDataScanJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataScanJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListDataScanJobsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListDataScanJobsRequest. */ + class ListDataScanJobsRequest implements IListDataScanJobsRequest { + + /** + * Constructs a new ListDataScanJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest); + + /** ListDataScanJobsRequest parent. */ + public parent: string; + + /** ListDataScanJobsRequest pageSize. */ + public pageSize: number; + + /** ListDataScanJobsRequest pageToken. */ + public pageToken: string; + + /** ListDataScanJobsRequest filter. */ + public filter: string; + + /** + * Creates a new ListDataScanJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScanJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @param message ListDataScanJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @param message ListDataScanJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Verifies a ListDataScanJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScanJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Creates a plain object from a ListDataScanJobsRequest message. Also converts values to other types if specified. + * @param message ListDataScanJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScanJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScanJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataScanJobsResponse. */ + interface IListDataScanJobsResponse { + + /** ListDataScanJobsResponse dataScanJobs */ + dataScanJobs?: (google.cloud.dataplex.v1.IDataScanJob[]|null); + + /** ListDataScanJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataScanJobsResponse. */ + class ListDataScanJobsResponse implements IListDataScanJobsResponse { + + /** + * Constructs a new ListDataScanJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse); + + /** ListDataScanJobsResponse dataScanJobs. */ + public dataScanJobs: google.cloud.dataplex.v1.IDataScanJob[]; + + /** ListDataScanJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataScanJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScanJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @param message ListDataScanJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @param message ListDataScanJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Verifies a ListDataScanJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScanJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. + * @param message ListDataScanJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScanJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScanJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateDataQualityRulesRequest. */ + interface IGenerateDataQualityRulesRequest { + + /** GenerateDataQualityRulesRequest name */ + name?: (string|null); + } + + /** Represents a GenerateDataQualityRulesRequest. */ + class GenerateDataQualityRulesRequest implements IGenerateDataQualityRulesRequest { + + /** + * Constructs a new GenerateDataQualityRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest); + + /** GenerateDataQualityRulesRequest name. */ + public name: string; + + /** + * Creates a new GenerateDataQualityRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateDataQualityRulesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; + + /** + * Encodes the specified GenerateDataQualityRulesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. + * @param message GenerateDataQualityRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateDataQualityRulesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. + * @param message GenerateDataQualityRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateDataQualityRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; + + /** + * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateDataQualityRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; + + /** + * Verifies a GenerateDataQualityRulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateDataQualityRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateDataQualityRulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; + + /** + * Creates a plain object from a GenerateDataQualityRulesRequest message. Also converts values to other types if specified. + * @param message GenerateDataQualityRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GenerateDataQualityRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateDataQualityRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateDataQualityRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateDataQualityRulesResponse. */ + interface IGenerateDataQualityRulesResponse { + + /** GenerateDataQualityRulesResponse rule */ + rule?: (google.cloud.dataplex.v1.IDataQualityRule[]|null); + } + + /** Represents a GenerateDataQualityRulesResponse. */ + class GenerateDataQualityRulesResponse implements IGenerateDataQualityRulesResponse { + + /** + * Constructs a new GenerateDataQualityRulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse); + + /** GenerateDataQualityRulesResponse rule. */ + public rule: google.cloud.dataplex.v1.IDataQualityRule[]; + + /** + * Creates a new GenerateDataQualityRulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateDataQualityRulesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; + + /** + * Encodes the specified GenerateDataQualityRulesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. + * @param message GenerateDataQualityRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateDataQualityRulesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. + * @param message GenerateDataQualityRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateDataQualityRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; + + /** + * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateDataQualityRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; + + /** + * Verifies a GenerateDataQualityRulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateDataQualityRulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateDataQualityRulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; + + /** + * Creates a plain object from a GenerateDataQualityRulesResponse message. Also converts values to other types if specified. + * @param message GenerateDataQualityRulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GenerateDataQualityRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateDataQualityRulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateDataQualityRulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataScan. */ + interface IDataScan { + + /** DataScan name */ + name?: (string|null); + + /** DataScan uid */ + uid?: (string|null); + + /** DataScan description */ + description?: (string|null); + + /** DataScan displayName */ + displayName?: (string|null); + + /** DataScan labels */ + labels?: ({ [k: string]: string }|null); + + /** DataScan state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** DataScan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataScan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataScan data */ + data?: (google.cloud.dataplex.v1.IDataSource|null); + + /** DataScan executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); + + /** DataScan executionStatus */ + executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); + + /** DataScan type */ + type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); + + /** DataScan dataQualitySpec */ + dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScan dataProfileSpec */ + dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScan dataDiscoverySpec */ + dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + + /** DataScan dataQualityResult */ + dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScan dataProfileResult */ + dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScan dataDiscoveryResult */ + dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + } + + /** Represents a DataScan. */ + class DataScan implements IDataScan { + + /** + * Constructs a new DataScan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataScan); + + /** DataScan name. */ + public name: string; + + /** DataScan uid. */ + public uid: string; + + /** DataScan description. */ + public description: string; + + /** DataScan displayName. */ + public displayName: string; + + /** DataScan labels. */ + public labels: { [k: string]: string }; + + /** DataScan state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** DataScan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataScan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataScan data. */ + public data?: (google.cloud.dataplex.v1.IDataSource|null); + + /** DataScan executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); + + /** DataScan executionStatus. */ + public executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); + + /** DataScan type. */ + public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); + + /** DataScan dataQualitySpec. */ + public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScan dataProfileSpec. */ + public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScan dataDiscoverySpec. */ + public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + + /** DataScan dataQualityResult. */ + public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScan dataProfileResult. */ + public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScan dataDiscoveryResult. */ + public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + + /** DataScan spec. */ + public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); + + /** DataScan result. */ + public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); + + /** + * Creates a new DataScan instance using the specified properties. + * @param [properties] Properties to set + * @returns DataScan instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataScan): google.cloud.dataplex.v1.DataScan; + + /** + * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @param message DataScan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @param message DataScan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataScan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan; + + /** + * Decodes a DataScan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan; + + /** + * Verifies a DataScan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataScan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataScan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan; + + /** + * Creates a plain object from a DataScan message. Also converts values to other types if specified. + * @param message DataScan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataScan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataScan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataScan { + + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { + + /** ExecutionSpec trigger */ + trigger?: (google.cloud.dataplex.v1.ITrigger|null); + + /** ExecutionSpec field */ + field?: (string|null); + } + + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { + + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec); + + /** ExecutionSpec trigger. */ + public trigger?: (google.cloud.dataplex.v1.ITrigger|null); + + /** ExecutionSpec field. */ + public field?: (string|null); + + /** ExecutionSpec incremental. */ + public incremental?: "field"; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Verifies an ExecutionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecutionStatus. */ + interface IExecutionStatus { + + /** ExecutionStatus latestJobStartTime */ + latestJobStartTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobEndTime */ + latestJobEndTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobCreateTime */ + latestJobCreateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ExecutionStatus. */ + class ExecutionStatus implements IExecutionStatus { + + /** + * Constructs a new ExecutionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus); + + /** ExecutionStatus latestJobStartTime. */ + public latestJobStartTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobEndTime. */ + public latestJobEndTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobCreateTime. */ + public latestJobCreateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Verifies an ExecutionStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @param message ExecutionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataScanJob. */ + interface IDataScanJob { + + /** DataScanJob name */ + name?: (string|null); + + /** DataScanJob uid */ + uid?: (string|null); + + /** DataScanJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob state */ + state?: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State|null); + + /** DataScanJob message */ + message?: (string|null); + + /** DataScanJob type */ + type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); + + /** DataScanJob dataQualitySpec */ + dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScanJob dataProfileSpec */ + dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScanJob dataDiscoverySpec */ + dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + + /** DataScanJob dataQualityResult */ + dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScanJob dataProfileResult */ + dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScanJob dataDiscoveryResult */ + dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + } + + /** Represents a DataScanJob. */ + class DataScanJob implements IDataScanJob { + + /** + * Constructs a new DataScanJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataScanJob); + + /** DataScanJob name. */ + public name: string; + + /** DataScanJob uid. */ + public uid: string; + + /** DataScanJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob state. */ + public state: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State); + + /** DataScanJob message. */ + public message: string; + + /** DataScanJob type. */ + public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); + + /** DataScanJob dataQualitySpec. */ + public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScanJob dataProfileSpec. */ + public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScanJob dataDiscoverySpec. */ + public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + + /** DataScanJob dataQualityResult. */ + public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScanJob dataProfileResult. */ + public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScanJob dataDiscoveryResult. */ + public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + + /** DataScanJob spec. */ + public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); + + /** DataScanJob result. */ + public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); + + /** + * Creates a new DataScanJob instance using the specified properties. + * @param [properties] Properties to set + * @returns DataScanJob instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataScanJob): google.cloud.dataplex.v1.DataScanJob; + + /** + * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @param message DataScanJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @param message DataScanJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataScanJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanJob; + + /** + * Decodes a DataScanJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanJob; + + /** + * Verifies a DataScanJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataScanJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataScanJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanJob; + + /** + * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. + * @param message DataScanJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataScanJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataScanJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataScanJob { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + PENDING = 7 + } + } + + /** DataScanType enum. */ + enum DataScanType { + DATA_SCAN_TYPE_UNSPECIFIED = 0, + DATA_QUALITY = 1, + DATA_PROFILE = 2, + DATA_DISCOVERY = 3 + } + + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { + + /** DiscoveryEvent message */ + message?: (string|null); + + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); + + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); + + /** DiscoveryEvent assetId */ + assetId?: (string|null); + + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); + + /** DiscoveryEvent datascanId */ + datascanId?: (string|null); + + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent table */ + table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); + } + + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { + + /** + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + + /** DiscoveryEvent message. */ + public message: string; + + /** DiscoveryEvent lakeId. */ + public lakeId: string; + + /** DiscoveryEvent zoneId. */ + public zoneId: string; + + /** DiscoveryEvent assetId. */ + public assetId: string; + + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; + + /** DiscoveryEvent datascanId. */ + public datascanId: string; + + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent table. */ + public table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); + + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"|"table"); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Verifies a DiscoveryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7, + TABLE_PUBLISHED = 10, + TABLE_UPDATED = 11, + TABLE_IGNORED = 12, + TABLE_DELETED = 13 + } + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** TableType enum. */ + enum TableType { + TABLE_TYPE_UNSPECIFIED = 0, + EXTERNAL_TABLE = 1, + BIGLAKE_TABLE = 2, + OBJECT_TABLE = 3 + } + + /** Properties of a ConfigDetails. */ + interface IConfigDetails { + + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } + + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { + + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Verifies a ConfigDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { + + /** + * Constructs a new EntityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new EntityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Verifies an EntityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableDetails. */ + interface ITableDetails { + + /** TableDetails table */ + table?: (string|null); + + /** TableDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType|null); + } + + /** Represents a TableDetails. */ + class TableDetails implements ITableDetails { + + /** + * Constructs a new TableDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails); + + /** TableDetails table. */ + public table: string; + + /** TableDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType); + + /** + * Creates a new TableDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @param message TableDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @param message TableDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Decodes a TableDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Verifies a TableDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Creates a plain object from a TableDetails message. Also converts values to other types if specified. + * @param message TableDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.TableDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { + + /** PartitionDetails partition */ + partition?: (string|null); + + /** PartitionDetails entity */ + entity?: (string|null); + + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + + /** PartitionDetails sampledDataLocations */ + sampledDataLocations?: (string[]|null); + } + + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { + + /** + * Constructs a new PartitionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + + /** PartitionDetails partition. */ + public partition: string; + + /** PartitionDetails entity. */ + public entity: string; + + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** PartitionDetails sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Verifies a PartitionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActionDetails. */ + interface IActionDetails { + + /** ActionDetails type */ + type?: (string|null); + + /** ActionDetails issue */ + issue?: (string|null); + } + + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { + + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + + /** ActionDetails type. */ + public type: string; + + /** ActionDetails issue. */ + public issue: string; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Verifies an ActionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a JobEvent. */ + interface IJobEvent { + + /** JobEvent message */ + message?: (string|null); + + /** JobEvent jobId */ + jobId?: (string|null); + + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + + /** JobEvent retries */ + retries?: (number|null); + + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + + /** JobEvent serviceJob */ + serviceJob?: (string|null); + + /** JobEvent executionTrigger */ + executionTrigger?: (google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|keyof typeof google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|null); + } + + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { + + /** + * Constructs a new JobEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + + /** JobEvent message. */ + public message: string; + + /** JobEvent jobId. */ + public jobId: string; + + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + + /** JobEvent retries. */ + public retries: number; + + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + + /** JobEvent serviceJob. */ + public serviceJob: string; + + /** JobEvent executionTrigger. */ + public executionTrigger: (google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|keyof typeof google.cloud.dataplex.v1.JobEvent.ExecutionTrigger); + + /** + * Creates a new JobEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; + + /** + * Verifies a JobEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace JobEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + + /** ExecutionTrigger enum. */ + enum ExecutionTrigger { + EXECUTION_TRIGGER_UNSPECIFIED = 0, + TASK_CONFIG = 1, + RUN_REQUEST = 2 + } + } + + /** Properties of a SessionEvent. */ + interface ISessionEvent { + + /** SessionEvent message */ + message?: (string|null); + + /** SessionEvent userId */ + userId?: (string|null); + + /** SessionEvent sessionId */ + sessionId?: (string|null); + + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent eventSucceeded */ + eventSucceeded?: (boolean|null); + + /** SessionEvent fastStartupEnabled */ + fastStartupEnabled?: (boolean|null); + + /** SessionEvent unassignedDuration */ + unassignedDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { + + /** + * Constructs a new SessionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + + /** SessionEvent message. */ + public message: string; + + /** SessionEvent userId. */ + public userId: string; + + /** SessionEvent sessionId. */ + public sessionId: string; + + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent eventSucceeded. */ + public eventSucceeded: boolean; + + /** SessionEvent fastStartupEnabled. */ + public fastStartupEnabled: boolean; + + /** SessionEvent unassignedDuration. */ + public unassignedDuration?: (google.protobuf.IDuration|null); + + /** SessionEvent detail. */ + public detail?: "query"; + + /** + * Creates a new SessionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; + + /** + * Verifies a SessionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SessionEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3, + CREATE = 4 + } + + /** Properties of a QueryDetail. */ + interface IQueryDetail { + + /** QueryDetail queryId */ + queryId?: (string|null); + + /** QueryDetail queryText */ + queryText?: (string|null); + + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); + } + + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } + } + } + + /** Properties of a GovernanceEvent. */ + interface IGovernanceEvent { + + /** GovernanceEvent message */ + message?: (string|null); + + /** GovernanceEvent eventType */ + eventType?: (google.cloud.dataplex.v1.GovernanceEvent.EventType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.EventType|null); + + /** GovernanceEvent entity */ + entity?: (google.cloud.dataplex.v1.GovernanceEvent.IEntity|null); + } + + /** Represents a GovernanceEvent. */ + class GovernanceEvent implements IGovernanceEvent { + + /** + * Constructs a new GovernanceEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGovernanceEvent); + + /** GovernanceEvent message. */ + public message: string; + + /** GovernanceEvent eventType. */ + public eventType: (google.cloud.dataplex.v1.GovernanceEvent.EventType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.EventType); + + /** GovernanceEvent entity. */ + public entity?: (google.cloud.dataplex.v1.GovernanceEvent.IEntity|null); + + /** GovernanceEvent _entity. */ + public _entity?: "entity"; + + /** + * Creates a new GovernanceEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGovernanceEvent): google.cloud.dataplex.v1.GovernanceEvent; + + /** + * Encodes the specified GovernanceEvent message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. + * @param message GovernanceEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGovernanceEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. + * @param message GovernanceEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGovernanceEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GovernanceEvent; + + /** + * Decodes a GovernanceEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GovernanceEvent; + + /** + * Verifies a GovernanceEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GovernanceEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GovernanceEvent; + + /** + * Creates a plain object from a GovernanceEvent message. Also converts values to other types if specified. + * @param message GovernanceEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GovernanceEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceEvent { + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity entity */ + entity?: (string|null); + + /** Entity entityType */ + entityType?: (google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.GovernanceEvent.IEntity); + + /** Entity entity. */ + public entity: string; + + /** Entity entityType. */ + public entityType: (google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dataplex.v1.GovernanceEvent.IEntity): google.cloud.dataplex.v1.GovernanceEvent.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.GovernanceEvent.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.GovernanceEvent.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GovernanceEvent.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GovernanceEvent.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GovernanceEvent.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GovernanceEvent.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Entity { + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + } + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + RESOURCE_IAM_POLICY_UPDATE = 1, + BIGQUERY_TABLE_CREATE = 2, + BIGQUERY_TABLE_UPDATE = 3, + BIGQUERY_TABLE_DELETE = 4, + BIGQUERY_CONNECTION_CREATE = 5, + BIGQUERY_CONNECTION_UPDATE = 6, + BIGQUERY_CONNECTION_DELETE = 7, + BIGQUERY_TAXONOMY_CREATE = 10, + BIGQUERY_POLICY_TAG_CREATE = 11, + BIGQUERY_POLICY_TAG_DELETE = 12, + BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13, + ACCESS_POLICY_UPDATE = 14, + GOVERNANCE_RULE_MATCHED_RESOURCES = 15, + GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16, + GOVERNANCE_RULE_ERRORS = 17, + GOVERNANCE_RULE_PROCESSING = 18 + } + } + + /** Properties of a DataScanEvent. */ + interface IDataScanEvent { + + /** DataScanEvent dataSource */ + dataSource?: (string|null); + + /** DataScanEvent jobId */ + jobId?: (string|null); + + /** DataScanEvent createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent type */ + type?: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType|null); + + /** DataScanEvent state */ + state?: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State|null); + + /** DataScanEvent message */ + message?: (string|null); + + /** DataScanEvent specVersion */ + specVersion?: (string|null); + + /** DataScanEvent trigger */ + trigger?: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger|null); + + /** DataScanEvent scope */ + scope?: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope|null); + + /** DataScanEvent dataProfile */ + dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + + /** DataScanEvent dataQuality */ + dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + + /** DataScanEvent dataProfileConfigs */ + dataProfileConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null); + + /** DataScanEvent dataQualityConfigs */ + dataQualityConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null); + + /** DataScanEvent postScanActionsResult */ + postScanActionsResult?: (google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null); + } + + /** Represents a DataScanEvent. */ + class DataScanEvent implements IDataScanEvent { + + /** + * Constructs a new DataScanEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataScanEvent); + + /** DataScanEvent dataSource. */ + public dataSource: string; + + /** DataScanEvent jobId. */ + public jobId: string; + + /** DataScanEvent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent type. */ + public type: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType); + + /** DataScanEvent state. */ + public state: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State); + + /** DataScanEvent message. */ + public message: string; + + /** DataScanEvent specVersion. */ + public specVersion: string; + + /** DataScanEvent trigger. */ + public trigger: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger); + + /** DataScanEvent scope. */ + public scope: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope); + + /** DataScanEvent dataProfile. */ + public dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + + /** DataScanEvent dataQuality. */ + public dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + + /** DataScanEvent dataProfileConfigs. */ + public dataProfileConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null); + + /** DataScanEvent dataQualityConfigs. */ + public dataQualityConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null); + + /** DataScanEvent postScanActionsResult. */ + public postScanActionsResult?: (google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null); + + /** DataScanEvent result. */ + public result?: ("dataProfile"|"dataQuality"); + + /** DataScanEvent appliedConfigs. */ + public appliedConfigs?: ("dataProfileConfigs"|"dataQualityConfigs"); + + /** + * Creates a new DataScanEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DataScanEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataScanEvent): google.cloud.dataplex.v1.DataScanEvent; + + /** + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataScanEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataScanEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent; + + /** + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataScanEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent; + + /** + * Verifies a DataScanEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataScanEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent; + + /** + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. + * @param message DataScanEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataScanEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataScanEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataScanEvent { + + /** ScanType enum. */ + enum ScanType { + SCAN_TYPE_UNSPECIFIED = 0, + DATA_PROFILE = 1, + DATA_QUALITY = 2, + DATA_DISCOVERY = 4 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4, + CREATED = 5 + } + + /** Trigger enum. */ + enum Trigger { + TRIGGER_UNSPECIFIED = 0, + ON_DEMAND = 1, + SCHEDULE = 2 + } + + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + FULL = 1, + INCREMENTAL = 2 + } + + /** Properties of a DataProfileResult. */ + interface IDataProfileResult { + + /** DataProfileResult rowCount */ + rowCount?: (number|Long|string|null); + } + + /** Represents a DataProfileResult. */ + class DataProfileResult implements IDataProfileResult { + + /** + * Constructs a new DataProfileResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult); + + /** DataProfileResult rowCount. */ + public rowCount: (number|Long|string); + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Verifies a DataProfileResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @param message DataProfileResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityResult. */ + interface IDataQualityResult { + + /** DataQualityResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataQualityResult passed */ + passed?: (boolean|null); + + /** DataQualityResult dimensionPassed */ + dimensionPassed?: ({ [k: string]: boolean }|null); + + /** DataQualityResult score */ + score?: (number|null); + + /** DataQualityResult dimensionScore */ + dimensionScore?: ({ [k: string]: number }|null); + + /** DataQualityResult columnScore */ + columnScore?: ({ [k: string]: number }|null); + } + + /** Represents a DataQualityResult. */ + class DataQualityResult implements IDataQualityResult { + + /** + * Constructs a new DataQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult); + + /** DataQualityResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataQualityResult passed. */ + public passed: boolean; + + /** DataQualityResult dimensionPassed. */ + public dimensionPassed: { [k: string]: boolean }; + + /** DataQualityResult score. */ + public score: number; + + /** DataQualityResult dimensionScore. */ + public dimensionScore: { [k: string]: number }; + + /** DataQualityResult columnScore. */ + public columnScore: { [k: string]: number }; + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Verifies a DataQualityResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @param message DataQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfileAppliedConfigs. */ + interface IDataProfileAppliedConfigs { + + /** DataProfileAppliedConfigs samplingPercent */ + samplingPercent?: (number|null); + + /** DataProfileAppliedConfigs rowFilterApplied */ + rowFilterApplied?: (boolean|null); + + /** DataProfileAppliedConfigs columnFilterApplied */ + columnFilterApplied?: (boolean|null); + } + + /** Represents a DataProfileAppliedConfigs. */ + class DataProfileAppliedConfigs implements IDataProfileAppliedConfigs { + + /** + * Constructs a new DataProfileAppliedConfigs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs); + + /** DataProfileAppliedConfigs samplingPercent. */ + public samplingPercent: number; + + /** DataProfileAppliedConfigs rowFilterApplied. */ + public rowFilterApplied: boolean; + + /** DataProfileAppliedConfigs columnFilterApplied. */ + public columnFilterApplied: boolean; + + /** + * Creates a new DataProfileAppliedConfigs instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileAppliedConfigs instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; + + /** + * Encodes the specified DataProfileAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. + * @param message DataProfileAppliedConfigs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. + * @param message DataProfileAppliedConfigs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; + + /** + * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; + + /** + * Verifies a DataProfileAppliedConfigs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileAppliedConfigs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileAppliedConfigs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; + + /** + * Creates a plain object from a DataProfileAppliedConfigs message. Also converts values to other types if specified. + * @param message DataProfileAppliedConfigs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileAppliedConfigs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileAppliedConfigs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityAppliedConfigs. */ + interface IDataQualityAppliedConfigs { + + /** DataQualityAppliedConfigs samplingPercent */ + samplingPercent?: (number|null); + + /** DataQualityAppliedConfigs rowFilterApplied */ + rowFilterApplied?: (boolean|null); + } + + /** Represents a DataQualityAppliedConfigs. */ + class DataQualityAppliedConfigs implements IDataQualityAppliedConfigs { + + /** + * Constructs a new DataQualityAppliedConfigs. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs); + + /** DataQualityAppliedConfigs samplingPercent. */ + public samplingPercent: number; + + /** DataQualityAppliedConfigs rowFilterApplied. */ + public rowFilterApplied: boolean; + + /** + * Creates a new DataQualityAppliedConfigs instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityAppliedConfigs instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; + + /** + * Encodes the specified DataQualityAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. + * @param message DataQualityAppliedConfigs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. + * @param message DataQualityAppliedConfigs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; + + /** + * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; + + /** + * Verifies a DataQualityAppliedConfigs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityAppliedConfigs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityAppliedConfigs + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; + + /** + * Creates a plain object from a DataQualityAppliedConfigs message. Also converts values to other types if specified. + * @param message DataQualityAppliedConfigs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityAppliedConfigs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityAppliedConfigs + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PostScanActionsResult. */ + interface IPostScanActionsResult { + + /** PostScanActionsResult bigqueryExportResult */ + bigqueryExportResult?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null); + } + + /** Represents a PostScanActionsResult. */ + class PostScanActionsResult implements IPostScanActionsResult { + + /** + * Constructs a new PostScanActionsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult); + + /** PostScanActionsResult bigqueryExportResult. */ + public bigqueryExportResult?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null); + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PostScanActionsResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. + * @param message PostScanActionsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; + + /** + * Verifies a PostScanActionsResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostScanActionsResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @param message PostScanActionsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostScanActionsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostScanActionsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PostScanActionsResult { + + /** Properties of a BigQueryExportResult. */ + interface IBigQueryExportResult { + + /** BigQueryExportResult state */ + state?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|null); + + /** BigQueryExportResult message */ + message?: (string|null); + } + + /** Represents a BigQueryExportResult. */ + class BigQueryExportResult implements IBigQueryExportResult { + + /** + * Constructs a new BigQueryExportResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult); + + /** BigQueryExportResult state. */ + public state: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State); + + /** BigQueryExportResult message. */ + public message: string; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryExportResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @param message BigQueryExportResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; + + /** + * Verifies a BigQueryExportResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryExportResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @param message BigQueryExportResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryExportResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryExportResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryExportResult { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + SKIPPED = 3 + } + } + } + } + + /** Properties of a DataQualityScanRuleResult. */ + interface IDataQualityScanRuleResult { + + /** DataQualityScanRuleResult jobId */ + jobId?: (string|null); + + /** DataQualityScanRuleResult dataSource */ + dataSource?: (string|null); + + /** DataQualityScanRuleResult column */ + column?: (string|null); + + /** DataQualityScanRuleResult ruleName */ + ruleName?: (string|null); + + /** DataQualityScanRuleResult ruleType */ + ruleType?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|null); + + /** DataQualityScanRuleResult evalutionType */ + evalutionType?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|null); + + /** DataQualityScanRuleResult ruleDimension */ + ruleDimension?: (string|null); + + /** DataQualityScanRuleResult thresholdPercent */ + thresholdPercent?: (number|null); + + /** DataQualityScanRuleResult result */ + result?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|null); + + /** DataQualityScanRuleResult evaluatedRowCount */ + evaluatedRowCount?: (number|Long|string|null); + + /** DataQualityScanRuleResult passedRowCount */ + passedRowCount?: (number|Long|string|null); + + /** DataQualityScanRuleResult nullRowCount */ + nullRowCount?: (number|Long|string|null); + + /** DataQualityScanRuleResult assertionRowCount */ + assertionRowCount?: (number|Long|string|null); + } + + /** Represents a DataQualityScanRuleResult. */ + class DataQualityScanRuleResult implements IDataQualityScanRuleResult { + + /** + * Constructs a new DataQualityScanRuleResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityScanRuleResult); + + /** DataQualityScanRuleResult jobId. */ + public jobId: string; + + /** DataQualityScanRuleResult dataSource. */ + public dataSource: string; + + /** DataQualityScanRuleResult column. */ + public column: string; + + /** DataQualityScanRuleResult ruleName. */ + public ruleName: string; + + /** DataQualityScanRuleResult ruleType. */ + public ruleType: (google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType); + + /** DataQualityScanRuleResult evalutionType. */ + public evalutionType: (google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType); + + /** DataQualityScanRuleResult ruleDimension. */ + public ruleDimension: string; + + /** DataQualityScanRuleResult thresholdPercent. */ + public thresholdPercent: number; + + /** DataQualityScanRuleResult result. */ + public result: (google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.Result); + + /** DataQualityScanRuleResult evaluatedRowCount. */ + public evaluatedRowCount: (number|Long|string); + + /** DataQualityScanRuleResult passedRowCount. */ + public passedRowCount: (number|Long|string); + + /** DataQualityScanRuleResult nullRowCount. */ + public nullRowCount: (number|Long|string); + + /** DataQualityScanRuleResult assertionRowCount. */ + public assertionRowCount: (number|Long|string); + + /** + * Creates a new DataQualityScanRuleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityScanRuleResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityScanRuleResult): google.cloud.dataplex.v1.DataQualityScanRuleResult; + + /** + * Encodes the specified DataQualityScanRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. + * @param message DataQualityScanRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityScanRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityScanRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. + * @param message DataQualityScanRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityScanRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityScanRuleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityScanRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityScanRuleResult; + + /** + * Decodes a DataQualityScanRuleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityScanRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityScanRuleResult; + + /** + * Verifies a DataQualityScanRuleResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataQualityScanRuleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityScanRuleResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityScanRuleResult; + + /** + * Creates a plain object from a DataQualityScanRuleResult message. Also converts values to other types if specified. + * @param message DataQualityScanRuleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityScanRuleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityScanRuleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityScanRuleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataQualityScanRuleResult { + + /** RuleType enum. */ + enum RuleType { + RULE_TYPE_UNSPECIFIED = 0, + NON_NULL_EXPECTATION = 1, + RANGE_EXPECTATION = 2, + REGEX_EXPECTATION = 3, + ROW_CONDITION_EXPECTATION = 4, + SET_EXPECTATION = 5, + STATISTIC_RANGE_EXPECTATION = 6, + TABLE_CONDITION_EXPECTATION = 7, + UNIQUENESS_EXPECTATION = 8, + SQL_ASSERTION = 9 + } + + /** EvaluationType enum. */ + enum EvaluationType { + EVALUATION_TYPE_UNSPECIFIED = 0, + PER_ROW = 1, + AGGREGATE = 2 + } + + /** Result enum. */ + enum Result { + RESULT_UNSPECIFIED = 0, + PASSED = 1, + FAILED = 2 + } + } + + /** Represents a MetadataService */ + class MetadataService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetadataService 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 MetadataService 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): MetadataService; + + /** + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.CreateEntityCallback): void; + + /** + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @returns Promise + */ + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest): Promise; + + /** + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback): void; + + /** + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @returns Promise + */ + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest): Promise; + + /** + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback): void; + + /** + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @returns Promise + */ + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest): Promise; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + + /** + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @returns Promise + */ + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + + /** + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @returns Promise + */ + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + + /** + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback): void; + + /** + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @returns Promise + */ + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest): Promise; + + /** + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback): void; + + /** + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @returns Promise + */ + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest): Promise; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @returns Promise + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @returns Promise + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; + } + + namespace MetadataService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. + * @param error Error, if any + * @param [response] Entity + */ + type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. + * @param error Error, if any + * @param [response] ListEntitiesResponse + */ + type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. + * @param error Error, if any + * @param [response] Partition + */ + type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. + * @param error Error, if any + * @param [response] ListPartitionsResponse + */ + type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; + } + + /** Properties of a CreateEntityRequest. */ + interface ICreateEntityRequest { + + /** CreateEntityRequest parent */ + parent?: (string|null); + + /** CreateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** CreateEntityRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEntityRequest. */ + class CreateEntityRequest implements ICreateEntityRequest { + + /** + * Constructs a new CreateEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateEntityRequest); + + /** CreateEntityRequest parent. */ + public parent: string; + + /** CreateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** CreateEntityRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateEntityRequest): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Verifies a CreateEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntityRequest; + + /** + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * @param message CreateEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEntityRequest. */ + interface IUpdateEntityRequest { + + /** UpdateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** UpdateEntityRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEntityRequest. */ + class UpdateEntityRequest implements IUpdateEntityRequest { + + /** + * Constructs a new UpdateEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest); + + /** UpdateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); + + /** UpdateEntityRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Verifies an UpdateEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntityRequest; + + /** + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * @param message UpdateEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEntityRequest. */ + interface IDeleteEntityRequest { + + /** DeleteEntityRequest name */ + name?: (string|null); + + /** DeleteEntityRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteEntityRequest. */ + class DeleteEntityRequest implements IDeleteEntityRequest { + + /** + * Constructs a new DeleteEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest); + + /** DeleteEntityRequest name. */ + public name: string; + + /** DeleteEntityRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Verifies a DeleteEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntityRequest; + + /** + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * @param message DeleteEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEntitiesRequest. */ + interface IListEntitiesRequest { + + /** ListEntitiesRequest parent */ + parent?: (string|null); + + /** ListEntitiesRequest view */ + view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); + + /** ListEntitiesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitiesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListEntitiesRequest. */ + class ListEntitiesRequest implements IListEntitiesRequest { + + /** + * Constructs a new ListEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); + + /** ListEntitiesRequest parent. */ + public parent: string; + + /** ListEntitiesRequest view. */ + public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); + + /** ListEntitiesRequest pageSize. */ + public pageSize: number; + + /** ListEntitiesRequest pageToken. */ + public pageToken: string; + + /** ListEntitiesRequest filter. */ + public filter: string; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Verifies a ListEntitiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + + /** + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @param message ListEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListEntitiesRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + TABLES = 1, + FILESETS = 2 + } + } + + /** Properties of a ListEntitiesResponse. */ + interface IListEntitiesResponse { + + /** ListEntitiesResponse entities */ + entities?: (google.cloud.dataplex.v1.IEntity[]|null); + + /** ListEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEntitiesResponse. */ + class ListEntitiesResponse implements IListEntitiesResponse { + + /** + * Constructs a new ListEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + + /** ListEntitiesResponse entities. */ + public entities: google.cloud.dataplex.v1.IEntity[]; + + /** ListEntitiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEntitiesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Verifies a ListEntitiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @param message ListEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEntitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEntityRequest. */ + interface IGetEntityRequest { + + /** GetEntityRequest name */ + name?: (string|null); + + /** GetEntityRequest view */ + view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); + } + + /** Represents a GetEntityRequest. */ + class GetEntityRequest implements IGetEntityRequest { + + /** + * Constructs a new GetEntityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + + /** GetEntityRequest name. */ + public name: string; + + /** GetEntityRequest view. */ + public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEntityRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Verifies a GetEntityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEntityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @param message GetEntityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEntityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEntityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetEntityRequest { + + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + SCHEMA = 2, + FULL = 4 + } + } + + /** Properties of a ListPartitionsRequest. */ + interface IListPartitionsRequest { + + /** ListPartitionsRequest parent */ + parent?: (string|null); + + /** ListPartitionsRequest pageSize */ + pageSize?: (number|null); + + /** ListPartitionsRequest pageToken */ + pageToken?: (string|null); + + /** ListPartitionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPartitionsRequest. */ + class ListPartitionsRequest implements IListPartitionsRequest { + + /** + * Constructs a new ListPartitionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); + + /** ListPartitionsRequest parent. */ + public parent: string; + + /** ListPartitionsRequest pageSize. */ + public pageSize: number; + + /** ListPartitionsRequest pageToken. */ + public pageToken: string; + + /** ListPartitionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Verifies a ListPartitionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + + /** + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @param message ListPartitionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPartitionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePartitionRequest. */ + interface ICreatePartitionRequest { + + /** CreatePartitionRequest parent */ + parent?: (string|null); + + /** CreatePartitionRequest partition */ + partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreatePartitionRequest. */ + class CreatePartitionRequest implements ICreatePartitionRequest { + + /** + * Constructs a new CreatePartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest); + + /** CreatePartitionRequest parent. */ + public parent: string; + + /** CreatePartitionRequest partition. */ + public partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreatePartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Verifies a CreatePartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreatePartitionRequest; + + /** + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * @param message CreatePartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreatePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePartitionRequest. */ + interface IDeletePartitionRequest { + + /** DeletePartitionRequest name */ + name?: (string|null); + + /** DeletePartitionRequest etag */ + etag?: (string|null); + } + + /** Represents a DeletePartitionRequest. */ + class DeletePartitionRequest implements IDeletePartitionRequest { + + /** + * Constructs a new DeletePartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest); + + /** DeletePartitionRequest name. */ + public name: string; + + /** DeletePartitionRequest etag. */ + public etag: string; + + /** + * Creates a new DeletePartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Verifies a DeletePartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeletePartitionRequest; + + /** + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * @param message DeletePartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeletePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPartitionsResponse. */ + interface IListPartitionsResponse { + + /** ListPartitionsResponse partitions */ + partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + + /** ListPartitionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPartitionsResponse. */ + class ListPartitionsResponse implements IListPartitionsResponse { + + /** + * Constructs a new ListPartitionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); + + /** ListPartitionsResponse partitions. */ + public partitions: google.cloud.dataplex.v1.IPartition[]; + + /** ListPartitionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPartitionsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Verifies a ListPartitionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPartitionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @param message ListPartitionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPartitionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPartitionRequest. */ + interface IGetPartitionRequest { + + /** GetPartitionRequest name */ + name?: (string|null); + } + + /** Represents a GetPartitionRequest. */ + class GetPartitionRequest implements IGetPartitionRequest { + + /** + * Constructs a new GetPartitionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + + /** GetPartitionRequest name. */ + public name: string; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPartitionRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Verifies a GetPartitionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPartitionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @param message GetPartitionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPartitionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPartitionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity name */ + name?: (string|null); + + /** Entity displayName */ + displayName?: (string|null); + + /** Entity description */ + description?: (string|null); + + /** Entity createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id */ + id?: (string|null); + + /** Entity etag */ + etag?: (string|null); + + /** Entity type */ + type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + + /** Entity asset */ + asset?: (string|null); + + /** Entity dataPath */ + dataPath?: (string|null); + + /** Entity dataPathPattern */ + dataPathPattern?: (string|null); + + /** Entity catalogEntry */ + catalogEntry?: (string|null); + + /** Entity system */ + system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); + + /** Entity format */ + format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility */ + compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity access */ + access?: (google.cloud.dataplex.v1.IStorageAccess|null); + + /** Entity uid */ + uid?: (string|null); + + /** Entity schema */ + schema?: (google.cloud.dataplex.v1.ISchema|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IEntity); + + /** Entity name. */ + public name: string; + + /** Entity displayName. */ + public displayName: string; + + /** Entity description. */ + public description: string; + + /** Entity createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Entity updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id. */ + public id: string; + + /** Entity etag. */ + public etag: string; + + /** Entity type. */ + public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); + + /** Entity asset. */ + public asset: string; + + /** Entity dataPath. */ + public dataPath: string; + + /** Entity dataPathPattern. */ + public dataPathPattern: string; + + /** Entity catalogEntry. */ + public catalogEntry: string; + + /** Entity system. */ + public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); + + /** Entity format. */ + public format?: (google.cloud.dataplex.v1.IStorageFormat|null); + + /** Entity compatibility. */ + public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity access. */ + public access?: (google.cloud.dataplex.v1.IStorageAccess|null); + + /** Entity uid. */ + public uid: string; + + /** Entity schema. */ + public schema?: (google.cloud.dataplex.v1.ISchema|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a CompatibilityStatus. */ + interface ICompatibilityStatus { + + /** CompatibilityStatus hiveMetastore */ + hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery */ + bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + } + + /** Represents a CompatibilityStatus. */ + class CompatibilityStatus implements ICompatibilityStatus { + + /** + * Constructs a new CompatibilityStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); + + /** CompatibilityStatus hiveMetastore. */ + public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** CompatibilityStatus bigquery. */ + public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns CompatibilityStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Verifies a CompatibilityStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompatibilityStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @param message CompatibilityStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompatibilityStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompatibilityStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompatibilityStatus { + + /** Properties of a Compatibility. */ + interface ICompatibility { + + /** Compatibility compatible */ + compatible?: (boolean|null); + + /** Compatibility reason */ + reason?: (string|null); + } + + /** Represents a Compatibility. */ + class Compatibility implements ICompatibility { + + /** + * Constructs a new Compatibility. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + + /** Compatibility compatible. */ + public compatible: boolean; + + /** Compatibility reason. */ + public reason: string; + + /** + * Creates a new Compatibility instance using the specified properties. + * @param [properties] Properties to set + * @returns Compatibility instance + */ + public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Verifies a Compatibility message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Compatibility + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @param message Compatibility + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Compatibility to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Compatibility + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Partition. */ + interface IPartition { + + /** Partition name */ + name?: (string|null); + + /** Partition values */ + values?: (string[]|null); + + /** Partition location */ + location?: (string|null); + + /** Partition etag */ + etag?: (string|null); + } + + /** Represents a Partition. */ + class Partition implements IPartition { + + /** + * Constructs a new Partition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IPartition); + + /** Partition name. */ + public name: string; + + /** Partition values. */ + public values: string[]; + + /** Partition location. */ + public location: string; + + /** Partition etag. */ + public etag: string; + + /** + * Creates a new Partition instance using the specified properties. + * @param [properties] Properties to set + * @returns Partition instance + */ + public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; + + /** + * Verifies a Partition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Partition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @param message Partition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Partition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Partition + * @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 userManaged */ + userManaged?: (boolean|null); + + /** Schema fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + + /** Schema partitionFields */ + partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + + /** Schema partitionStyle */ + partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISchema); + + /** Schema userManaged. */ + public userManaged: boolean; + + /** Schema fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** Schema partitionFields. */ + public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; + + /** Schema partitionStyle. */ + public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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; + } + + namespace Schema { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + BOOLEAN = 1, + BYTE = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 6, + DOUBLE = 7, + DECIMAL = 8, + STRING = 9, + BINARY = 10, + TIMESTAMP = 11, + DATE = 12, + TIME = 13, + RECORD = 14, + NULL = 100 + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + REQUIRED = 1, + NULLABLE = 2, + REPEATED = 3 + } + + /** Properties of a SchemaField. */ + interface ISchemaField { + + /** SchemaField name */ + name?: (string|null); + + /** SchemaField description */ + description?: (string|null); + + /** SchemaField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + + /** SchemaField mode */ + mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); + + /** SchemaField fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + } + + /** Represents a SchemaField. */ + class SchemaField implements ISchemaField { + + /** + * Constructs a new SchemaField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); + + /** SchemaField name. */ + public name: string; + + /** SchemaField description. */ + public description: string; + + /** SchemaField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** SchemaField mode. */ + public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); + + /** SchemaField fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + + /** + * Creates a new SchemaField instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Verifies a SchemaField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @param message SchemaField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartitionField. */ + interface IPartitionField { + + /** PartitionField name */ + name?: (string|null); + + /** PartitionField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); + } + + /** Represents a PartitionField. */ + class PartitionField implements IPartitionField { + + /** + * Constructs a new PartitionField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + + /** PartitionField name. */ + public name: string; + + /** PartitionField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + + /** + * Creates a new PartitionField instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionField instance + */ + public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Verifies a PartitionField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @param message PartitionField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PartitionStyle enum. */ + enum PartitionStyle { + PARTITION_STYLE_UNSPECIFIED = 0, + HIVE_COMPATIBLE = 1 + } + } + + /** Properties of a StorageFormat. */ + interface IStorageFormat { + + /** StorageFormat format */ + format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + + /** StorageFormat compressionFormat */ + compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + + /** StorageFormat mimeType */ + mimeType?: (string|null); + + /** StorageFormat csv */ + csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json */ + json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat iceberg */ + iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + } + + /** Represents a StorageFormat. */ + class StorageFormat implements IStorageFormat { + + /** + * Constructs a new StorageFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + + /** StorageFormat format. */ + public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + + /** StorageFormat compressionFormat. */ + public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + + /** StorageFormat mimeType. */ + public mimeType: string; + + /** StorageFormat csv. */ + public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json. */ + public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat iceberg. */ + public iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + + /** StorageFormat options. */ + public options?: ("csv"|"json"|"iceberg"); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; + + /** + * Verifies a StorageFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @param message StorageFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StorageFormat { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JsonOptions. */ + interface IJsonOptions { + + /** JsonOptions encoding */ + encoding?: (string|null); + } + + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { + + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); + + /** JsonOptions encoding. */ + public encoding: string; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IcebergOptions. */ + interface IIcebergOptions { + + /** IcebergOptions metadataLocation */ + metadataLocation?: (string|null); + } + + /** Represents an IcebergOptions. */ + class IcebergOptions implements IIcebergOptions { + + /** + * Constructs a new IcebergOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions); + + /** IcebergOptions metadataLocation. */ + public metadataLocation: string; + + /** + * Creates a new IcebergOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns IcebergOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Verifies an IcebergOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IcebergOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. + * @param message IcebergOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.IcebergOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IcebergOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IcebergOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + PARQUET = 1, + AVRO = 2, + ORC = 3, + CSV = 100, + JSON = 101, + IMAGE = 200, + AUDIO = 201, + VIDEO = 202, + TEXT = 203, + TFRECORD = 204, + OTHER = 1000, + UNKNOWN = 1001 + } + + /** CompressionFormat enum. */ + enum CompressionFormat { + COMPRESSION_FORMAT_UNSPECIFIED = 0, + GZIP = 2, + BZIP2 = 3 + } + } + + /** Properties of a StorageAccess. */ + interface IStorageAccess { + + /** StorageAccess read */ + read?: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode|null); + } + + /** Represents a StorageAccess. */ + class StorageAccess implements IStorageAccess { + + /** + * Constructs a new StorageAccess. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageAccess); + + /** StorageAccess read. */ + public read: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode); + + /** + * Creates a new StorageAccess instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageAccess instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageAccess): google.cloud.dataplex.v1.StorageAccess; + + /** + * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @param message StorageAccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @param message StorageAccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageAccess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageAccess; + + /** + * Decodes a StorageAccess message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageAccess; + + /** + * Verifies a StorageAccess message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageAccess + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageAccess; + + /** + * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. + * @param message StorageAccess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageAccess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageAccess + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StorageAccess { + + /** AccessMode enum. */ + enum AccessMode { + ACCESS_MODE_UNSPECIFIED = 0, + DIRECT = 1, + MANAGED = 2 + } + } + + /** StorageSystem enum. */ + enum StorageSystem { + STORAGE_SYSTEM_UNSPECIFIED = 0, + CLOUD_STORAGE = 1, + BIGQUERY = 2 + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace 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-dataplex/v1/protos/protos.js b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js new file mode 100644 index 00000000000..bf450cf1bba --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js @@ -0,0 +1,114449 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dataplex_protos || ($protobuf.roots._google_cloud_dataplex_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.dataplex = (function() { + + /** + * Namespace dataplex. + * @memberof google.cloud + * @namespace + */ + var dataplex = {}; + + dataplex.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.dataplex + * @namespace + */ + var v1 = {}; + + v1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.dataplex.v1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [displayName] Environment displayName + * @property {string|null} [uid] Environment uid + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + * @property {string|null} [description] Environment description + * @property {google.cloud.dataplex.v1.State|null} [state] Environment state + * @property {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null} [infrastructureSpec] Environment infrastructureSpec + * @property {google.cloud.dataplex.v1.Environment.ISessionSpec|null} [sessionSpec] Environment sessionSpec + * @property {google.cloud.dataplex.v1.Environment.ISessionStatus|null} [sessionStatus] Environment sessionStatus + * @property {google.cloud.dataplex.v1.Environment.IEndpoints|null} [endpoints] Environment endpoints + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set + */ + function Environment(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.displayName = ""; + + /** + * Environment uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.uid = ""; + + /** + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.createTime = null; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.labels = $util.emptyObject; + + /** + * Environment description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.description = ""; + + /** + * Environment state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment infrastructureSpec. + * @member {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.infrastructureSpec = null; + + /** + * Environment sessionSpec. + * @member {google.cloud.dataplex.v1.Environment.ISessionSpec|null|undefined} sessionSpec + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.sessionSpec = null; + + /** + * Environment sessionStatus. + * @member {google.cloud.dataplex.v1.Environment.ISessionStatus|null|undefined} sessionStatus + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.sessionStatus = null; + + /** + * Environment endpoints. + * @member {google.cloud.dataplex.v1.Environment.IEndpoints|null|undefined} endpoints + * @memberof google.cloud.dataplex.v1.Environment + * @instance + */ + Environment.prototype.endpoints = null; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec")) + $root.google.cloud.dataplex.v1.Environment.SessionSpec.encode(message.sessionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.sessionStatus != null && Object.hasOwnProperty.call(message, "sessionStatus")) + $root.google.cloud.dataplex.v1.Environment.SessionStatus.encode(message.sessionStatus, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.endpoints != null && Object.hasOwnProperty.call(message, "endpoints")) + $root.google.cloud.dataplex.v1.Environment.Endpoints.encode(message.endpoints, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 100: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.decode(reader, reader.uint32()); + break; + } + case 102: { + message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.decode(reader, reader.uint32()); + break; + } + case 200: { + message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Environment message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Environment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) { + var error = $root.google.cloud.dataplex.v1.Environment.SessionSpec.verify(message.sessionSpec); + if (error) + return "sessionSpec." + error; + } + if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) { + var error = $root.google.cloud.dataplex.v1.Environment.SessionStatus.verify(message.sessionStatus); + if (error) + return "sessionStatus." + error; + } + if (message.endpoints != null && message.hasOwnProperty("endpoints")) { + var error = $root.google.cloud.dataplex.v1.Environment.Endpoints.verify(message.endpoints); + if (error) + return "endpoints." + error; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + if (object.sessionSpec != null) { + if (typeof object.sessionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.sessionSpec: object expected"); + message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.fromObject(object.sessionSpec); + } + if (object.sessionStatus != null) { + if (typeof object.sessionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.sessionStatus: object expected"); + message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.fromObject(object.sessionStatus); + } + if (object.endpoints != null) { + if (typeof object.endpoints !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.endpoints: object expected"); + message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.fromObject(object.endpoints); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {google.cloud.dataplex.v1.Environment} message Environment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Environment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.infrastructureSpec = null; + object.sessionSpec = null; + object.sessionStatus = null; + object.endpoints = 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.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) + object.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.toObject(message.sessionSpec, options); + if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) + object.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.toObject(message.sessionStatus, options); + if (message.endpoints != null && message.hasOwnProperty("endpoints")) + object.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.toObject(message.endpoints, options); + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment"; + }; + + Environment.InfrastructureSpec = (function() { + + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null} [compute] InfrastructureSpec compute + * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null} [osImage] InfrastructureSpec osImage + */ + + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfrastructureSpec compute. + * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null|undefined} compute + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.compute = null; + + /** + * InfrastructureSpec osImage. + * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null|undefined} osImage + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.osImage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"compute"|undefined} resources + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["compute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"osImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["osImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compute != null && Object.hasOwnProperty.call(message, "compute")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.encode(message.compute, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.osImage != null && Object.hasOwnProperty.call(message, "osImage")) + $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.encode(message.osImage, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 50: { + message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.decode(reader, reader.uint32()); + break; + } + case 100: { + message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.compute != null && message.hasOwnProperty("compute")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify(message.compute); + if (error) + return "compute." + error; + } + } + if (message.osImage != null && message.hasOwnProperty("osImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify(message.osImage); + if (error) + return "osImage." + error; + } + } + return null; + }; + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); + if (object.compute != null) { + if (typeof object.compute !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.compute: object expected"); + message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.fromObject(object.compute); + } + if (object.osImage != null) { + if (typeof object.osImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.osImage: object expected"); + message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.fromObject(object.osImage); + } + return message; + }; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.compute != null && message.hasOwnProperty("compute")) { + object.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.toObject(message.compute, options); + if (options.oneofs) + object.resources = "compute"; + } + if (message.osImage != null && message.hasOwnProperty("osImage")) { + object.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.toObject(message.osImage, options); + if (options.oneofs) + object.runtime = "osImage"; + } + return object; + }; + + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec"; + }; + + InfrastructureSpec.ComputeResources = (function() { + + /** + * Properties of a ComputeResources. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @interface IComputeResources + * @property {number|null} [diskSizeGb] ComputeResources diskSizeGb + * @property {number|null} [nodeCount] ComputeResources nodeCount + * @property {number|null} [maxNodeCount] ComputeResources maxNodeCount + */ + + /** + * Constructs a new ComputeResources. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @classdesc Represents a ComputeResources. + * @implements IComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set + */ + function ComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeResources diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.diskSizeGb = 0; + + /** + * ComputeResources nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.nodeCount = 0; + + /** + * ComputeResources maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + */ + ComputeResources.prototype.maxNodeCount = 0; + + /** + * Creates a new ComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources instance + */ + ComputeResources.create = function create(properties) { + return new ComputeResources(properties); + }; + + /** + * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.diskSizeGb); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); + return writer; + }; + + /** + * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskSizeGb = reader.int32(); + break; + } + case 2: { + message.nodeCount = reader.int32(); + break; + } + case 3: { + message.maxNodeCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + if (!$util.isInteger(message.maxNodeCount)) + return "maxNodeCount: integer expected"; + return null; + }; + + /** + * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources + */ + ComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; + return message; + }; + + /** + * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} message ComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.diskSizeGb = 0; + object.nodeCount = 0; + object.maxNodeCount = 0; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; + return object; + }; + + /** + * Converts this ComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @instance + * @returns {Object.} JSON object + */ + ComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"; + }; + + return ComputeResources; + })(); + + InfrastructureSpec.OsImageRuntime = (function() { + + /** + * Properties of an OsImageRuntime. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @interface IOsImageRuntime + * @property {string|null} [imageVersion] OsImageRuntime imageVersion + * @property {Array.|null} [javaLibraries] OsImageRuntime javaLibraries + * @property {Array.|null} [pythonPackages] OsImageRuntime pythonPackages + * @property {Object.|null} [properties] OsImageRuntime properties + */ + + /** + * Constructs a new OsImageRuntime. + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec + * @classdesc Represents an OsImageRuntime. + * @implements IOsImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set + */ + function OsImageRuntime(properties) { + this.javaLibraries = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OsImageRuntime imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.imageVersion = ""; + + /** + * OsImageRuntime javaLibraries. + * @member {Array.} javaLibraries + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.javaLibraries = $util.emptyArray; + + /** + * OsImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * OsImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + */ + OsImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new OsImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime instance + */ + OsImageRuntime.create = function create(properties) { + return new OsImageRuntime(properties); + }; + + /** + * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.javaLibraries != null && message.javaLibraries.length) + for (var i = 0; i < message.javaLibraries.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaLibraries[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OsImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageVersion = reader.string(); + break; + } + case 2: { + if (!(message.javaLibraries && message.javaLibraries.length)) + message.javaLibraries = []; + message.javaLibraries.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + 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.properties[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OsImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OsImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OsImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.javaLibraries != null && message.hasOwnProperty("javaLibraries")) { + if (!Array.isArray(message.javaLibraries)) + return "javaLibraries: array expected"; + for (var i = 0; i < message.javaLibraries.length; ++i) + if (!$util.isString(message.javaLibraries[i])) + return "javaLibraries: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime + */ + OsImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.javaLibraries) { + if (!Array.isArray(object.javaLibraries)) + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.javaLibraries: array expected"); + message.javaLibraries = []; + for (var i = 0; i < object.javaLibraries.length; ++i) + message.javaLibraries[i] = String(object.javaLibraries[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} message OsImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OsImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaLibraries = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + object.imageVersion = ""; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + if (message.javaLibraries && message.javaLibraries.length) { + object.javaLibraries = []; + for (var j = 0; j < message.javaLibraries.length; ++j) + object.javaLibraries[j] = message.javaLibraries[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this OsImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @instance + * @returns {Object.} JSON object + */ + OsImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OsImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OsImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"; + }; + + return OsImageRuntime; + })(); + + return InfrastructureSpec; + })(); + + Environment.SessionSpec = (function() { + + /** + * Properties of a SessionSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @interface ISessionSpec + * @property {google.protobuf.IDuration|null} [maxIdleDuration] SessionSpec maxIdleDuration + * @property {boolean|null} [enableFastStartup] SessionSpec enableFastStartup + */ + + /** + * Constructs a new SessionSpec. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents a SessionSpec. + * @implements ISessionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set + */ + function SessionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionSpec maxIdleDuration. + * @member {google.protobuf.IDuration|null|undefined} maxIdleDuration + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @instance + */ + SessionSpec.prototype.maxIdleDuration = null; + + /** + * SessionSpec enableFastStartup. + * @member {boolean} enableFastStartup + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @instance + */ + SessionSpec.prototype.enableFastStartup = false; + + /** + * Creates a new SessionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec instance + */ + SessionSpec.create = function create(properties) { + return new SessionSpec(properties); + }; + + /** + * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxIdleDuration != null && Object.hasOwnProperty.call(message, "maxIdleDuration")) + $root.google.protobuf.Duration.encode(message.maxIdleDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enableFastStartup != null && Object.hasOwnProperty.call(message, "enableFastStartup")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableFastStartup); + return writer; + }; + + /** + * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxIdleDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.enableFastStartup = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxIdleDuration); + if (error) + return "maxIdleDuration." + error; + } + if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) + if (typeof message.enableFastStartup !== "boolean") + return "enableFastStartup: boolean expected"; + return null; + }; + + /** + * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec + */ + SessionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); + if (object.maxIdleDuration != null) { + if (typeof object.maxIdleDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Environment.SessionSpec.maxIdleDuration: object expected"); + message.maxIdleDuration = $root.google.protobuf.Duration.fromObject(object.maxIdleDuration); + } + if (object.enableFastStartup != null) + message.enableFastStartup = Boolean(object.enableFastStartup); + return message; + }; + + /** + * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {google.cloud.dataplex.v1.Environment.SessionSpec} message SessionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxIdleDuration = null; + object.enableFastStartup = false; + } + if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) + object.maxIdleDuration = $root.google.protobuf.Duration.toObject(message.maxIdleDuration, options); + if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) + object.enableFastStartup = message.enableFastStartup; + return object; + }; + + /** + * Converts this SessionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @instance + * @returns {Object.} JSON object + */ + SessionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.SessionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionSpec"; + }; + + return SessionSpec; + })(); + + Environment.SessionStatus = (function() { + + /** + * Properties of a SessionStatus. + * @memberof google.cloud.dataplex.v1.Environment + * @interface ISessionStatus + * @property {boolean|null} [active] SessionStatus active + */ + + /** + * Constructs a new SessionStatus. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents a SessionStatus. + * @implements ISessionStatus + * @constructor + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set + */ + function SessionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionStatus active. + * @member {boolean} active + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @instance + */ + SessionStatus.prototype.active = false; + + /** + * Creates a new SessionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus instance + */ + SessionStatus.create = function create(properties) { + return new SessionStatus(properties); + }; + + /** + * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.active != null && Object.hasOwnProperty.call(message, "active")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.active); + return writer; + }; + + /** + * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.active = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.active != null && message.hasOwnProperty("active")) + if (typeof message.active !== "boolean") + return "active: boolean expected"; + return null; + }; + + /** + * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus + */ + SessionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); + if (object.active != null) + message.active = Boolean(object.active); + return message; + }; + + /** + * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {google.cloud.dataplex.v1.Environment.SessionStatus} message SessionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.active = false; + if (message.active != null && message.hasOwnProperty("active")) + object.active = message.active; + return object; + }; + + /** + * Converts this SessionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @instance + * @returns {Object.} JSON object + */ + SessionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.SessionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionStatus"; + }; + + return SessionStatus; + })(); + + Environment.Endpoints = (function() { + + /** + * Properties of an Endpoints. + * @memberof google.cloud.dataplex.v1.Environment + * @interface IEndpoints + * @property {string|null} [notebooks] Endpoints notebooks + * @property {string|null} [sql] Endpoints sql + */ + + /** + * Constructs a new Endpoints. + * @memberof google.cloud.dataplex.v1.Environment + * @classdesc Represents an Endpoints. + * @implements IEndpoints + * @constructor + * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set + */ + function Endpoints(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoints notebooks. + * @member {string} notebooks + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + */ + Endpoints.prototype.notebooks = ""; + + /** + * Endpoints sql. + * @member {string} sql + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + */ + Endpoints.prototype.sql = ""; + + /** + * Creates a new Endpoints instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints instance + */ + Endpoints.create = function create(properties) { + return new Endpoints(properties); + }; + + /** + * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notebooks != null && Object.hasOwnProperty.call(message, "notebooks")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notebooks); + if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sql); + return writer; + }; + + /** + * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoints message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.notebooks = reader.string(); + break; + } + case 2: { + message.sql = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoints message. + * @function verify + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebooks != null && message.hasOwnProperty("notebooks")) + if (!$util.isString(message.notebooks)) + return "notebooks: string expected"; + if (message.sql != null && message.hasOwnProperty("sql")) + if (!$util.isString(message.sql)) + return "sql: string expected"; + return null; + }; + + /** + * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints + */ + Endpoints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Environment.Endpoints) + return object; + var message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); + if (object.notebooks != null) + message.notebooks = String(object.notebooks); + if (object.sql != null) + message.sql = String(object.sql); + return message; + }; + + /** + * Creates a plain object from an Endpoints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {google.cloud.dataplex.v1.Environment.Endpoints} message Endpoints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notebooks = ""; + object.sql = ""; + } + if (message.notebooks != null && message.hasOwnProperty("notebooks")) + object.notebooks = message.notebooks; + if (message.sql != null && message.hasOwnProperty("sql")) + object.sql = message.sql; + return object; + }; + + /** + * Converts this Endpoints to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @instance + * @returns {Object.} JSON object + */ + Endpoints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Endpoints + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Environment.Endpoints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.Endpoints"; + }; + + return Endpoints; + })(); + + return Environment; + })(); + + v1.Content = (function() { + + /** + * Properties of a Content. + * @memberof google.cloud.dataplex.v1 + * @interface IContent + * @property {string|null} [name] Content name + * @property {string|null} [uid] Content uid + * @property {string|null} [path] Content path + * @property {google.protobuf.ITimestamp|null} [createTime] Content createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Content updateTime + * @property {Object.|null} [labels] Content labels + * @property {string|null} [description] Content description + * @property {string|null} [dataText] Content dataText + * @property {google.cloud.dataplex.v1.Content.ISqlScript|null} [sqlScript] Content sqlScript + * @property {google.cloud.dataplex.v1.Content.INotebook|null} [notebook] Content notebook + */ + + /** + * Constructs a new Content. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Content. + * @implements IContent + * @constructor + * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set + */ + function Content(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]]; + } + + /** + * Content name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.name = ""; + + /** + * Content uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.uid = ""; + + /** + * Content path. + * @member {string} path + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.path = ""; + + /** + * Content createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.createTime = null; + + /** + * Content updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.updateTime = null; + + /** + * Content labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.labels = $util.emptyObject; + + /** + * Content description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.description = ""; + + /** + * Content dataText. + * @member {string|null|undefined} dataText + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.dataText = null; + + /** + * Content sqlScript. + * @member {google.cloud.dataplex.v1.Content.ISqlScript|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.sqlScript = null; + + /** + * Content notebook. + * @member {google.cloud.dataplex.v1.Content.INotebook|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Content.prototype.notebook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Content data. + * @member {"dataText"|undefined} data + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Object.defineProperty(Content.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["dataText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Content content. + * @member {"sqlScript"|"notebook"|undefined} content + * @memberof google.cloud.dataplex.v1.Content + * @instance + */ + Object.defineProperty(Content.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["sqlScript", "notebook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content} Content instance + */ + Content.create = function create(properties) { + return new Content(properties); + }; + + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.dataText != null && Object.hasOwnProperty.call(message, "dataText")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataText); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + $root.google.cloud.dataplex.v1.Content.SqlScript.encode(message.sqlScript, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Content.Notebook.encode(message.notebook, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Content message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + message.description = reader.string(); + break; + } + case 9: { + message.dataText = reader.string(); + break; + } + case 100: { + message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.decode(reader, reader.uint32()); + break; + } + case 101: { + message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Content message. + * @function verify + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Content.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.dataText != null && message.hasOwnProperty("dataText")) { + properties.data = 1; + if (!$util.isString(message.dataText)) + return "dataText: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + properties.content = 1; + { + var error = $root.google.cloud.dataplex.v1.Content.SqlScript.verify(message.sqlScript); + if (error) + return "sqlScript." + error; + } + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.google.cloud.dataplex.v1.Content.Notebook.verify(message.notebook); + if (error) + return "notebook." + error; + } + } + return null; + }; + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Content} Content + */ + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content) + return object; + var message = new $root.google.cloud.dataplex.v1.Content(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.path != null) + message.path = String(object.path); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.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.dataplex.v1.Content.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.dataText != null) + message.dataText = String(object.dataText); + if (object.sqlScript != null) { + if (typeof object.sqlScript !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.sqlScript: object expected"); + message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.fromObject(object.sqlScript); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Content.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.fromObject(object.notebook); + } + return message; + }; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {google.cloud.dataplex.v1.Content} message Content + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Content.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.path = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.dataText != null && message.hasOwnProperty("dataText")) { + object.dataText = message.dataText; + if (options.oneofs) + object.data = "dataText"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.toObject(message.sqlScript, options); + if (options.oneofs) + object.content = "sqlScript"; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.toObject(message.notebook, options); + if (options.oneofs) + object.content = "notebook"; + } + return object; + }; + + /** + * Converts this Content to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Content + * @instance + * @returns {Object.} JSON object + */ + Content.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Content + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content"; + }; + + Content.SqlScript = (function() { + + /** + * Properties of a SqlScript. + * @memberof google.cloud.dataplex.v1.Content + * @interface ISqlScript + * @property {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null} [engine] SqlScript engine + */ + + /** + * Constructs a new SqlScript. + * @memberof google.cloud.dataplex.v1.Content + * @classdesc Represents a SqlScript. + * @implements ISqlScript + * @constructor + * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set + */ + function SqlScript(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SqlScript engine. + * @member {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine} engine + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @instance + */ + SqlScript.prototype.engine = 0; + + /** + * Creates a new SqlScript instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript instance + */ + SqlScript.create = function create(properties) { + return new SqlScript(properties); + }; + + /** + * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlScript.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.engine); + return writer; + }; + + /** + * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlScript.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlScript message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlScript.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.engine = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlScript message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlScript.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlScript message. + * @function verify + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlScript.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 2: + break; + } + return null; + }; + + /** + * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript + */ + SqlScript.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content.SqlScript) + return object; + var message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "QUERY_ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK": + case 2: + message.engine = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SqlScript message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {google.cloud.dataplex.v1.Content.SqlScript} message SqlScript + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlScript.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.engine = options.enums === String ? "QUERY_ENGINE_UNSPECIFIED" : 0; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.Content.SqlScript.QueryEngine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.Content.SqlScript.QueryEngine[message.engine] : message.engine; + return object; + }; + + /** + * Converts this SqlScript to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @instance + * @returns {Object.} JSON object + */ + SqlScript.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlScript + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content.SqlScript + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlScript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.SqlScript"; + }; + + /** + * QueryEngine enum. + * @name google.cloud.dataplex.v1.Content.SqlScript.QueryEngine + * @enum {number} + * @property {number} QUERY_ENGINE_UNSPECIFIED=0 QUERY_ENGINE_UNSPECIFIED value + * @property {number} SPARK=2 SPARK value + */ + SqlScript.QueryEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_ENGINE_UNSPECIFIED"] = 0; + values[valuesById[2] = "SPARK"] = 2; + return values; + })(); + + return SqlScript; + })(); + + Content.Notebook = (function() { + + /** + * Properties of a Notebook. + * @memberof google.cloud.dataplex.v1.Content + * @interface INotebook + * @property {google.cloud.dataplex.v1.Content.Notebook.KernelType|null} [kernelType] Notebook kernelType + */ + + /** + * Constructs a new Notebook. + * @memberof google.cloud.dataplex.v1.Content + * @classdesc Represents a Notebook. + * @implements INotebook + * @constructor + * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set + */ + function Notebook(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Notebook kernelType. + * @member {google.cloud.dataplex.v1.Content.Notebook.KernelType} kernelType + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @instance + */ + Notebook.prototype.kernelType = 0; + + /** + * Creates a new Notebook instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook instance + */ + Notebook.create = function create(properties) { + return new Notebook(properties); + }; + + /** + * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kernelType != null && Object.hasOwnProperty.call(message, "kernelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kernelType); + return writer; + }; + + /** + * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Notebook.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Notebook message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.Notebook(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kernelType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Notebook message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Notebook.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Notebook message. + * @function verify + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Notebook.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kernelType != null && message.hasOwnProperty("kernelType")) + switch (message.kernelType) { + default: + return "kernelType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Notebook message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook + */ + Notebook.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Content.Notebook) + return object; + var message = new $root.google.cloud.dataplex.v1.Content.Notebook(); + switch (object.kernelType) { + default: + if (typeof object.kernelType === "number") { + message.kernelType = object.kernelType; + break; + } + break; + case "KERNEL_TYPE_UNSPECIFIED": + case 0: + message.kernelType = 0; + break; + case "PYTHON3": + case 1: + message.kernelType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Notebook message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {google.cloud.dataplex.v1.Content.Notebook} message Notebook + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Notebook.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kernelType = options.enums === String ? "KERNEL_TYPE_UNSPECIFIED" : 0; + if (message.kernelType != null && message.hasOwnProperty("kernelType")) + object.kernelType = options.enums === String ? $root.google.cloud.dataplex.v1.Content.Notebook.KernelType[message.kernelType] === undefined ? message.kernelType : $root.google.cloud.dataplex.v1.Content.Notebook.KernelType[message.kernelType] : message.kernelType; + return object; + }; + + /** + * Converts this Notebook to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @instance + * @returns {Object.} JSON object + */ + Notebook.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Notebook + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Content.Notebook + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.Notebook"; + }; + + /** + * KernelType enum. + * @name google.cloud.dataplex.v1.Content.Notebook.KernelType + * @enum {number} + * @property {number} KERNEL_TYPE_UNSPECIFIED=0 KERNEL_TYPE_UNSPECIFIED value + * @property {number} PYTHON3=1 PYTHON3 value + */ + Notebook.KernelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KERNEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PYTHON3"] = 1; + return values; + })(); + + return Notebook; + })(); + + return Content; + })(); + + v1.Session = (function() { + + /** + * Properties of a Session. + * @memberof google.cloud.dataplex.v1 + * @interface ISession + * @property {string|null} [name] Session name + * @property {string|null} [userId] Session userId + * @property {google.protobuf.ITimestamp|null} [createTime] Session createTime + * @property {google.cloud.dataplex.v1.State|null} [state] Session state + */ + + /** + * Constructs a new Session. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Session. + * @implements ISession + * @constructor + * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set + */ + function Session(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Session name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.name = ""; + + /** + * Session userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.userId = ""; + + /** + * Session createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.createTime = null; + + /** + * Session state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Session + * @instance + */ + Session.prototype.state = 0; + + /** + * Creates a new Session instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Session} Session instance + */ + Session.create = function create(properties) { + return new Session(properties); + }; + + /** + * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Session.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Session.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Session message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Session} Session + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Session.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Session(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.userId = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Session message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Session} Session + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Session.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Session message. + * @function verify + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Session.verify = function verify(message) { + if (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.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Session message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Session} Session + */ + Session.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Session) + return object; + var message = new $root.google.cloud.dataplex.v1.Session(); + if (object.name != null) + message.name = String(object.name); + if (object.userId != null) + message.userId = String(object.userId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Session.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Session message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {google.cloud.dataplex.v1.Session} message Session + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Session.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.userId = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + return object; + }; + + /** + * Converts this Session to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Session + * @instance + * @returns {Object.} JSON object + */ + Session.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Session + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Session + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Session.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Session"; + }; + + return Session; + })(); + + v1.Lake = (function() { + + /** + * Properties of a Lake. + * @memberof google.cloud.dataplex.v1 + * @interface ILake + * @property {string|null} [name] Lake name + * @property {string|null} [displayName] Lake displayName + * @property {string|null} [uid] Lake uid + * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime + * @property {Object.|null} [labels] Lake labels + * @property {string|null} [description] Lake description + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state + * @property {string|null} [serviceAccount] Lake serviceAccount + * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus + * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus + */ + + /** + * Constructs a new Lake. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Lake. + * @implements ILake + * @constructor + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + */ + function Lake(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]]; + } + + /** + * Lake name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.name = ""; + + /** + * Lake displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.displayName = ""; + + /** + * Lake uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.uid = ""; + + /** + * Lake createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.createTime = null; + + /** + * Lake updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.updateTime = null; + + /** + * Lake labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.labels = $util.emptyObject; + + /** + * Lake description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.description = ""; + + /** + * Lake state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.state = 0; + + /** + * Lake serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.serviceAccount = ""; + + /** + * Lake metastore. + * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastore = null; + + /** + * Lake assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.assetStatus = null; + + /** + * Lake metastoreStatus. + * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus + * @memberof google.cloud.dataplex.v1.Lake + * @instance + */ + Lake.prototype.metastoreStatus = null; + + /** + * Creates a new Lake instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake} Lake instance + */ + Lake.create = function create(properties) { + return new Lake(properties); + }; + + /** + * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encode = function encode(message, writer) { + if (!writer) + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) + $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) + $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Lake.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Lake message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), 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: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + case 102: { + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); + break; + } + case 103: { + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + } + case 104: { + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Lake message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake} Lake + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Lake.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Lake message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Lake.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.metastore != null && message.hasOwnProperty("metastore")) { + var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); + if (error) + return "metastore." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { + var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); + if (error) + return "metastoreStatus." + error; + } + return null; + }; + + /** + * Creates a Lake message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake} Lake + */ + Lake.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.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.dataplex.v1.Lake.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.metastore != null) { + if (typeof object.metastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); + message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + if (object.metastoreStatus != null) { + if (typeof object.metastoreStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); + message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); + } + return message; + }; + + /** + * Creates a plain object from a Lake message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {google.cloud.dataplex.v1.Lake} message Lake + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Lake.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.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.serviceAccount = ""; + object.metastore = null; + object.assetStatus = null; + object.metastoreStatus = 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.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.metastore != null && message.hasOwnProperty("metastore")) + object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) + object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); + return object; + }; + + /** + * Converts this Lake to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake + * @instance + * @returns {Object.} JSON object + */ + Lake.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Lake + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake"; + }; + + Lake.Metastore = (function() { + + /** + * Properties of a Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastore + * @property {string|null} [service] Metastore service + */ + + /** + * Constructs a new Metastore. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a Metastore. + * @implements IMetastore + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + */ + function Metastore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metastore service. + * @member {string} service + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + */ + Metastore.prototype.service = ""; + + /** + * Creates a new Metastore instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance + */ + Metastore.create = function create(properties) { + return new Metastore(properties); + }; + + /** + * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.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); + return writer; + }; + + /** + * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metastore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metastore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metastore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metastore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metastore message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metastore.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"; + return null; + }; + + /** + * Creates a Metastore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore + */ + Metastore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a Metastore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metastore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this Metastore to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @instance + * @returns {Object.} JSON object + */ + Metastore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metastore + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake.Metastore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.Metastore"; + }; + + return Metastore; + })(); + + Lake.MetastoreStatus = (function() { + + /** + * Properties of a MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @interface IMetastoreStatus + * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state + * @property {string|null} [message] MetastoreStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime + * @property {string|null} [endpoint] MetastoreStatus endpoint + */ + + /** + * Constructs a new MetastoreStatus. + * @memberof google.cloud.dataplex.v1.Lake + * @classdesc Represents a MetastoreStatus. + * @implements IMetastoreStatus + * @constructor + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + */ + function MetastoreStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetastoreStatus state. + * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.state = 0; + + /** + * MetastoreStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.message = ""; + + /** + * MetastoreStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.updateTime = null; + + /** + * MetastoreStatus endpoint. + * @member {string} endpoint + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + */ + MetastoreStatus.prototype.endpoint = ""; + + /** + * Creates a new MetastoreStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance + */ + MetastoreStatus.create = function create(properties) { + return new MetastoreStatus(properties); + }; + + /** + * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); + return writer; + }; + + /** + * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endpoint = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetastoreStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetastoreStatus.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + return null; + }; + + /** + * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus + */ + MetastoreStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "NONE": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + return message; + }; + + /** + * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetastoreStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.endpoint = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + return object; + }; + + /** + * Converts this MetastoreStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @instance + * @returns {Object.} JSON object + */ + MetastoreStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetastoreStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetastoreStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.MetastoreStatus"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} ERROR=4 ERROR value + */ + MetastoreStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return MetastoreStatus; + })(); + + return Lake; + })(); + + v1.AssetStatus = (function() { + + /** + * Properties of an AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @interface IAssetStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime + * @property {number|null} [activeAssets] AssetStatus activeAssets + * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets + */ + + /** + * Constructs a new AssetStatus. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AssetStatus. + * @implements IAssetStatus + * @constructor + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + */ + function AssetStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AssetStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.updateTime = null; + + /** + * AssetStatus activeAssets. + * @member {number} activeAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.activeAssets = 0; + + /** + * AssetStatus securityPolicyApplyingAssets. + * @member {number} securityPolicyApplyingAssets + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + */ + AssetStatus.prototype.securityPolicyApplyingAssets = 0; + + /** + * Creates a new AssetStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance + */ + AssetStatus.create = function create(properties) { + return new AssetStatus(properties); + }; + + /** + * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.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.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); + if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); + return writer; + }; + + /** + * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); + 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: { + message.activeAssets = reader.int32(); + break; + } + case 3: { + message.securityPolicyApplyingAssets = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssetStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssetStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssetStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssetStatus.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.activeAssets != null && message.hasOwnProperty("activeAssets")) + if (!$util.isInteger(message.activeAssets)) + return "activeAssets: integer expected"; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + if (!$util.isInteger(message.securityPolicyApplyingAssets)) + return "securityPolicyApplyingAssets: integer expected"; + return null; + }; + + /** + * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus + */ + AssetStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.AssetStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.activeAssets != null) + message.activeAssets = object.activeAssets | 0; + if (object.securityPolicyApplyingAssets != null) + message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; + return message; + }; + + /** + * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssetStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.activeAssets = 0; + object.securityPolicyApplyingAssets = 0; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) + object.activeAssets = message.activeAssets; + if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) + object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; + return object; + }; + + /** + * Converts this AssetStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AssetStatus + * @instance + * @returns {Object.} JSON object + */ + AssetStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssetStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AssetStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssetStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AssetStatus"; + }; + + return AssetStatus; + })(); + + v1.Zone = (function() { + + /** + * Properties of a Zone. + * @memberof google.cloud.dataplex.v1 + * @interface IZone + * @property {string|null} [name] Zone name + * @property {string|null} [displayName] Zone displayName + * @property {string|null} [uid] Zone uid + * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime + * @property {Object.|null} [labels] Zone labels + * @property {string|null} [description] Zone description + * @property {google.cloud.dataplex.v1.State|null} [state] Zone state + * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type + * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec + * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec + * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus + */ + + /** + * Constructs a new Zone. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Zone. + * @implements IZone + * @constructor + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + */ + function Zone(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]]; + } + + /** + * Zone name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.name = ""; + + /** + * Zone displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.displayName = ""; + + /** + * Zone uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.uid = ""; + + /** + * Zone createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.createTime = null; + + /** + * Zone updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.updateTime = null; + + /** + * Zone labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.labels = $util.emptyObject; + + /** + * Zone description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.description = ""; + + /** + * Zone state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.state = 0; + + /** + * Zone type. + * @member {google.cloud.dataplex.v1.Zone.Type} type + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.type = 0; + + /** + * Zone discoverySpec. + * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.discoverySpec = null; + + /** + * Zone resourceSpec. + * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.resourceSpec = null; + + /** + * Zone assetStatus. + * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus + * @memberof google.cloud.dataplex.v1.Zone + * @instance + */ + Zone.prototype.assetStatus = null; + + /** + * Creates a new Zone instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone} Zone instance + */ + Zone.create = function create(properties) { + return new Zone(properties); + }; + + /** + * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encode = function encode(message, writer) { + if (!writer) + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) + $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Zone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Zone message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), 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: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.type = reader.int32(); + break; + } + case 103: { + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 104: { + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); + break; + } + case 105: { + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Zone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone} Zone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Zone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Zone message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Zone.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + 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.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { + var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); + if (error) + return "assetStatus." + error; + } + return null; + }; + + /** + * Creates a Zone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone} Zone + */ + Zone.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.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.dataplex.v1.Zone.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "RAW": + case 1: + message.type = 1; + break; + case "CURATED": + case 2: + message.type = 2; + break; + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.assetStatus != null) { + if (typeof object.assetStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); + message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); + } + return message; + }; + + /** + * Creates a plain object from a Zone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {google.cloud.dataplex.v1.Zone} message Zone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Zone.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.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.discoverySpec = null; + object.resourceSpec = null; + object.assetStatus = 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.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); + if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) + object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); + return object; + }; + + /** + * Converts this Zone to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone + * @instance + * @returns {Object.} JSON object + */ + Zone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Zone + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Zone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Zone.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} RAW=1 RAW value + * @property {number} CURATED=2 CURATED value + */ + Zone.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RAW"] = 1; + values[valuesById[2] = "CURATED"] = 2; + return values; + })(); + + Zone.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IResourceSpec + * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec locationType. + * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + */ + ResourceSpec.prototype.locationType = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.locationType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locationType != null && message.hasOwnProperty("locationType")) + switch (message.locationType) { + default: + return "locationType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); + switch (object.locationType) { + default: + if (typeof object.locationType === "number") { + message.locationType = object.locationType; + break; + } + break; + case "LOCATION_TYPE_UNSPECIFIED": + case 0: + message.locationType = 0; + break; + case "SINGLE_REGION": + case 1: + message.locationType = 1; + break; + case "MULTI_REGION": + case 2: + message.locationType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; + if (message.locationType != null && message.hasOwnProperty("locationType")) + object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] === undefined ? message.locationType : $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.ResourceSpec"; + }; + + /** + * LocationType enum. + * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType + * @enum {number} + * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value + * @property {number} SINGLE_REGION=1 SINGLE_REGION value + * @property {number} MULTI_REGION=2 MULTI_REGION value + */ + ResourceSpec.LocationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_REGION"] = 1; + values[valuesById[2] = "MULTI_REGION"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Zone.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Zone + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 3: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 4: { + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.schedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoverySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec"; + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.disableTypeInference = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"; + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.disableTypeInference = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"; + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + return Zone; + })(); + + v1.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.cloud.dataplex.v1 + * @interface IAction + * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category + * @property {string|null} [issue] Action issue + * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime + * @property {string|null} [name] Action name + * @property {string|null} [lake] Action lake + * @property {string|null} [zone] Action zone + * @property {string|null} [asset] Action asset + * @property {Array.|null} [dataLocations] Action dataLocations + * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat + * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema + * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition + * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData + * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource + * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource + * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply + * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization + */ + + /** + * Constructs a new Action. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + */ + function Action(properties) { + this.dataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Action category. + * @member {google.cloud.dataplex.v1.Action.Category} category + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.category = 0; + + /** + * Action issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.issue = ""; + + /** + * Action detectTime. + * @member {google.protobuf.ITimestamp|null|undefined} detectTime + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.detectTime = null; + + /** + * Action name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.name = ""; + + /** + * Action lake. + * @member {string} lake + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.lake = ""; + + /** + * Action zone. + * @member {string} zone + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.zone = ""; + + /** + * Action asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.asset = ""; + + /** + * Action dataLocations. + * @member {Array.} dataLocations + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.dataLocations = $util.emptyArray; + + /** + * Action invalidDataFormat. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataFormat = null; + + /** + * Action incompatibleDataSchema. + * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.incompatibleDataSchema = null; + + /** + * Action invalidDataPartition. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataPartition = null; + + /** + * Action missingData. + * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingData = null; + + /** + * Action missingResource. + * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.missingResource = null; + + /** + * Action unauthorizedResource. + * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.unauthorizedResource = null; + + /** + * Action failedSecurityPolicyApply. + * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.failedSecurityPolicyApply = null; + + /** + * Action invalidDataOrganization. + * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Action.prototype.invalidDataOrganization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Action details. + * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details + * @memberof google.cloud.dataplex.v1.Action + * @instance + */ + Object.defineProperty(Action.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); + if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) + $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); + if (message.dataLocations != null && message.dataLocations.length) + for (var i = 0; i < message.dataLocations.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); + if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) + $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) + $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) + $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) + $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) + $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) + $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) + $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) + $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + message.issue = reader.string(); + break; + } + case 4: { + message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.lake = reader.string(); + break; + } + case 7: { + message.zone = reader.string(); + break; + } + case 8: { + message.asset = reader.string(); + break; + } + case 9: { + if (!(message.dataLocations && message.dataLocations.length)) + message.dataLocations = []; + message.dataLocations.push(reader.string()); + break; + } + case 10: { + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); + break; + } + case 11: { + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); + break; + } + case 12: { + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); + break; + } + case 13: { + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); + break; + } + case 14: { + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); + break; + } + case 15: { + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); + break; + } + case 21: { + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); + break; + } + case 22: { + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.detectTime); + if (error) + return "detectTime." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) + if (!$util.isString(message.lake)) + return "lake: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { + if (!Array.isArray(message.dataLocations)) + return "dataLocations: array expected"; + for (var i = 0; i < message.dataLocations.length; ++i) + if (!$util.isString(message.dataLocations[i])) + return "dataLocations: string[] expected"; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); + if (error) + return "invalidDataFormat." + error; + } + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); + if (error) + return "incompatibleDataSchema." + error; + } + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); + if (error) + return "invalidDataPartition." + error; + } + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); + if (error) + return "missingData." + error; + } + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); + if (error) + return "missingResource." + error; + } + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); + if (error) + return "unauthorizedResource." + error; + } + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); + if (error) + return "failedSecurityPolicyApply." + error; + } + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); + if (error) + return "invalidDataOrganization." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action} Action + */ + Action.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action) + return object; + var message = new $root.google.cloud.dataplex.v1.Action(); + switch (object.category) { + default: + if (typeof object.category === "number") { + message.category = object.category; + break; + } + break; + case "CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "RESOURCE_MANAGEMENT": + case 1: + message.category = 1; + break; + case "SECURITY_POLICY": + case 2: + message.category = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.category = 3; + break; + } + if (object.issue != null) + message.issue = String(object.issue); + if (object.detectTime != null) { + if (typeof object.detectTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); + message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); + } + if (object.name != null) + message.name = String(object.name); + if (object.lake != null) + message.lake = String(object.lake); + if (object.zone != null) + message.zone = String(object.zone); + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataLocations) { + if (!Array.isArray(object.dataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); + message.dataLocations = []; + for (var i = 0; i < object.dataLocations.length; ++i) + message.dataLocations[i] = String(object.dataLocations[i]); + } + if (object.invalidDataFormat != null) { + if (typeof object.invalidDataFormat !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); + message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); + } + if (object.incompatibleDataSchema != null) { + if (typeof object.incompatibleDataSchema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); + message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); + } + if (object.invalidDataPartition != null) { + if (typeof object.invalidDataPartition !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); + message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); + } + if (object.missingData != null) { + if (typeof object.missingData !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); + message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); + } + if (object.missingResource != null) { + if (typeof object.missingResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); + message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); + } + if (object.unauthorizedResource != null) { + if (typeof object.unauthorizedResource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); + message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); + } + if (object.failedSecurityPolicyApply != null) { + if (typeof object.failedSecurityPolicyApply !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); + message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); + } + if (object.invalidDataOrganization != null) { + if (typeof object.invalidDataOrganization !== "object") + throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); + message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {google.cloud.dataplex.v1.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataLocations = []; + if (options.defaults) { + object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; + object.issue = ""; + object.detectTime = null; + object.name = ""; + object.lake = ""; + object.zone = ""; + object.asset = ""; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] === undefined ? message.category : $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.detectTime != null && message.hasOwnProperty("detectTime")) + object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = message.lake; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataLocations && message.dataLocations.length) { + object.dataLocations = []; + for (var j = 0; j < message.dataLocations.length; ++j) + object.dataLocations[j] = message.dataLocations[j]; + } + if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { + object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); + if (options.oneofs) + object.details = "invalidDataFormat"; + } + if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { + object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); + if (options.oneofs) + object.details = "incompatibleDataSchema"; + } + if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { + object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); + if (options.oneofs) + object.details = "invalidDataPartition"; + } + if (message.missingData != null && message.hasOwnProperty("missingData")) { + object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); + if (options.oneofs) + object.details = "missingData"; + } + if (message.missingResource != null && message.hasOwnProperty("missingResource")) { + object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); + if (options.oneofs) + object.details = "missingResource"; + } + if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { + object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); + if (options.oneofs) + object.details = "unauthorizedResource"; + } + if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { + object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); + if (options.oneofs) + object.details = "failedSecurityPolicyApply"; + } + if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { + object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); + if (options.oneofs) + object.details = "invalidDataOrganization"; + } + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Action + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action"; + }; + + /** + * Category enum. + * @name google.cloud.dataplex.v1.Action.Category + * @enum {number} + * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value + * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value + * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value + */ + Action.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; + values[valuesById[2] = "SECURITY_POLICY"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; + return values; + })(); + + Action.MissingResource = (function() { + + /** + * Properties of a MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingResource + */ + + /** + * Constructs a new MissingResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingResource. + * @implements IMissingResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + */ + function MissingResource(properties) { + if (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 MissingResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance + */ + MissingResource.create = function create(properties) { + return new MissingResource(properties); + }; + + /** + * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource + */ + MissingResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingResource(); + }; + + /** + * Creates a plain object from a MissingResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @instance + * @returns {Object.} JSON object + */ + MissingResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MissingResource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.MissingResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MissingResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingResource"; + }; + + return MissingResource; + })(); + + Action.UnauthorizedResource = (function() { + + /** + * Properties of an UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @interface IUnauthorizedResource + */ + + /** + * Constructs a new UnauthorizedResource. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an UnauthorizedResource. + * @implements IUnauthorizedResource + * @constructor + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + */ + function UnauthorizedResource(properties) { + if (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 UnauthorizedResource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance + */ + UnauthorizedResource.create = function create(properties) { + return new UnauthorizedResource(properties); + }; + + /** + * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnauthorizedResource message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnauthorizedResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource + */ + UnauthorizedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) + return object; + return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); + }; + + /** + * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnauthorizedResource.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UnauthorizedResource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @instance + * @returns {Object.} JSON object + */ + UnauthorizedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UnauthorizedResource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnauthorizedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.UnauthorizedResource"; + }; + + return UnauthorizedResource; + })(); + + Action.FailedSecurityPolicyApply = (function() { + + /** + * Properties of a FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @interface IFailedSecurityPolicyApply + * @property {string|null} [asset] FailedSecurityPolicyApply asset + */ + + /** + * Constructs a new FailedSecurityPolicyApply. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a FailedSecurityPolicyApply. + * @implements IFailedSecurityPolicyApply + * @constructor + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + */ + function FailedSecurityPolicyApply(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FailedSecurityPolicyApply asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + */ + FailedSecurityPolicyApply.prototype.asset = ""; + + /** + * Creates a new FailedSecurityPolicyApply instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance + */ + FailedSecurityPolicyApply.create = function create(properties) { + return new FailedSecurityPolicyApply(properties); + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.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); + return writer; + }; + + /** + * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.asset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailedSecurityPolicyApply message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailedSecurityPolicyApply.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"; + return null; + }; + + /** + * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply + */ + FailedSecurityPolicyApply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); + if (object.asset != null) + message.asset = String(object.asset); + return message; + }; + + /** + * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailedSecurityPolicyApply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.asset = ""; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + return object; + }; + + /** + * Converts this FailedSecurityPolicyApply to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @instance + * @returns {Object.} JSON object + */ + FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FailedSecurityPolicyApply + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FailedSecurityPolicyApply.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"; + }; + + return FailedSecurityPolicyApply; + })(); + + Action.InvalidDataFormat = (function() { + + /** + * Properties of an InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataFormat + * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations + * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat + * @property {string|null} [newFormat] InvalidDataFormat newFormat + */ + + /** + * Constructs a new InvalidDataFormat. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataFormat. + * @implements IInvalidDataFormat + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + */ + function InvalidDataFormat(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataFormat sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; + + /** + * InvalidDataFormat expectedFormat. + * @member {string} expectedFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.expectedFormat = ""; + + /** + * InvalidDataFormat newFormat. + * @member {string} newFormat + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + */ + InvalidDataFormat.prototype.newFormat = ""; + + /** + * Creates a new InvalidDataFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance + */ + InvalidDataFormat.create = function create(properties) { + return new InvalidDataFormat(properties); + }; + + /** + * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); + if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); + if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); + return writer; + }; + + /** + * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + case 2: { + message.expectedFormat = reader.string(); + break; + } + case 3: { + message.newFormat = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + if (!$util.isString(message.expectedFormat)) + return "expectedFormat: string expected"; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + if (!$util.isString(message.newFormat)) + return "newFormat: string expected"; + return null; + }; + + /** + * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat + */ + InvalidDataFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + if (object.expectedFormat != null) + message.expectedFormat = String(object.expectedFormat); + if (object.newFormat != null) + message.newFormat = String(object.newFormat); + return message; + }; + + /** + * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.expectedFormat = ""; + object.newFormat = ""; + } + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) + object.expectedFormat = message.expectedFormat; + if (message.newFormat != null && message.hasOwnProperty("newFormat")) + object.newFormat = message.newFormat; + return object; + }; + + /** + * Converts this InvalidDataFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @instance + * @returns {Object.} JSON object + */ + InvalidDataFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InvalidDataFormat + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataFormat"; + }; + + return InvalidDataFormat; + })(); + + Action.IncompatibleDataSchema = (function() { + + /** + * Properties of an IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @interface IIncompatibleDataSchema + * @property {string|null} [table] IncompatibleDataSchema table + * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema + * @property {string|null} [newSchema] IncompatibleDataSchema newSchema + * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations + * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange + */ + + /** + * Constructs a new IncompatibleDataSchema. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an IncompatibleDataSchema. + * @implements IIncompatibleDataSchema + * @constructor + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + */ + function IncompatibleDataSchema(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncompatibleDataSchema table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.table = ""; + + /** + * IncompatibleDataSchema existingSchema. + * @member {string} existingSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.existingSchema = ""; + + /** + * IncompatibleDataSchema newSchema. + * @member {string} newSchema + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.newSchema = ""; + + /** + * IncompatibleDataSchema sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; + + /** + * IncompatibleDataSchema schemaChange. + * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + */ + IncompatibleDataSchema.prototype.schemaChange = 0; + + /** + * Creates a new IncompatibleDataSchema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance + */ + IncompatibleDataSchema.create = function create(properties) { + return new IncompatibleDataSchema(properties); + }; + + /** + * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); + if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); + return writer; + }; + + /** + * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.table = reader.string(); + break; + } + case 2: { + message.existingSchema = reader.string(); + break; + } + case 3: { + message.newSchema = reader.string(); + break; + } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + case 5: { + message.schemaChange = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncompatibleDataSchema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncompatibleDataSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + if (!$util.isString(message.existingSchema)) + return "existingSchema: string expected"; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + if (!$util.isString(message.newSchema)) + return "newSchema: string expected"; + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + switch (message.schemaChange) { + default: + return "schemaChange: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema + */ + IncompatibleDataSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); + if (object.table != null) + message.table = String(object.table); + if (object.existingSchema != null) + message.existingSchema = String(object.existingSchema); + if (object.newSchema != null) + message.newSchema = String(object.newSchema); + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + switch (object.schemaChange) { + default: + if (typeof object.schemaChange === "number") { + message.schemaChange = object.schemaChange; + break; + } + break; + case "SCHEMA_CHANGE_UNSPECIFIED": + case 0: + message.schemaChange = 0; + break; + case "INCOMPATIBLE": + case 1: + message.schemaChange = 1; + break; + case "MODIFIED": + case 2: + message.schemaChange = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncompatibleDataSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.table = ""; + object.existingSchema = ""; + object.newSchema = ""; + object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) + object.existingSchema = message.existingSchema; + if (message.newSchema != null && message.hasOwnProperty("newSchema")) + object.newSchema = message.newSchema; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) + object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] === undefined ? message.schemaChange : $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; + return object; + }; + + /** + * Converts this IncompatibleDataSchema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @instance + * @returns {Object.} JSON object + */ + IncompatibleDataSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncompatibleDataSchema + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncompatibleDataSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"; + }; + + /** + * SchemaChange enum. + * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange + * @enum {number} + * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value + * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value + * @property {number} MODIFIED=2 MODIFIED value + */ + IncompatibleDataSchema.SchemaChange = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCOMPATIBLE"] = 1; + values[valuesById[2] = "MODIFIED"] = 2; + return values; + })(); + + return IncompatibleDataSchema; + })(); + + Action.InvalidDataPartition = (function() { + + /** + * Properties of an InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataPartition + * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure + */ + + /** + * Constructs a new InvalidDataPartition. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataPartition. + * @implements IInvalidDataPartition + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + */ + function InvalidDataPartition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InvalidDataPartition expectedStructure. + * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + */ + InvalidDataPartition.prototype.expectedStructure = 0; + + /** + * Creates a new InvalidDataPartition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance + */ + InvalidDataPartition.create = function create(properties) { + return new InvalidDataPartition(properties); + }; + + /** + * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); + return writer; + }; + + /** + * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expectedStructure = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataPartition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataPartition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + switch (message.expectedStructure) { + default: + return "expectedStructure: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition + */ + InvalidDataPartition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) + return object; + var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); + switch (object.expectedStructure) { + default: + if (typeof object.expectedStructure === "number") { + message.expectedStructure = object.expectedStructure; + break; + } + break; + case "PARTITION_STRUCTURE_UNSPECIFIED": + case 0: + message.expectedStructure = 0; + break; + case "CONSISTENT_KEYS": + case 1: + message.expectedStructure = 1; + break; + case "HIVE_STYLE_KEYS": + case 2: + message.expectedStructure = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataPartition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; + if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) + object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] === undefined ? message.expectedStructure : $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; + return object; + }; + + /** + * Converts this InvalidDataPartition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @instance + * @returns {Object.} JSON object + */ + InvalidDataPartition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InvalidDataPartition + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataPartition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataPartition"; + }; + + /** + * PartitionStructure enum. + * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure + * @enum {number} + * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value + * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value + * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value + */ + InvalidDataPartition.PartitionStructure = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONSISTENT_KEYS"] = 1; + values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; + return values; + })(); + + return InvalidDataPartition; + })(); + + Action.MissingData = (function() { + + /** + * Properties of a MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @interface IMissingData + */ + + /** + * Constructs a new MissingData. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents a MissingData. + * @implements IMissingData + * @constructor + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + */ + function MissingData(properties) { + if (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 MissingData instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance + */ + MissingData.create = function create(properties) { + return new MissingData(properties); + }; + + /** + * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissingData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissingData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissingData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissingData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissingData message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissingData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MissingData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData + */ + MissingData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) + return object; + return new $root.google.cloud.dataplex.v1.Action.MissingData(); + }; + + /** + * Creates a plain object from a MissingData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissingData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MissingData to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @instance + * @returns {Object.} JSON object + */ + MissingData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MissingData + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.MissingData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MissingData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingData"; + }; + + return MissingData; + })(); + + Action.InvalidDataOrganization = (function() { + + /** + * Properties of an InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @interface IInvalidDataOrganization + */ + + /** + * Constructs a new InvalidDataOrganization. + * @memberof google.cloud.dataplex.v1.Action + * @classdesc Represents an InvalidDataOrganization. + * @implements IInvalidDataOrganization + * @constructor + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + */ + function InvalidDataOrganization(properties) { + if (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 InvalidDataOrganization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance + */ + InvalidDataOrganization.create = function create(properties) { + return new InvalidDataOrganization(properties); + }; + + /** + * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvalidDataOrganization message. + * @function verify + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvalidDataOrganization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization + */ + InvalidDataOrganization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) + return object; + return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); + }; + + /** + * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvalidDataOrganization.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InvalidDataOrganization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @instance + * @returns {Object.} JSON object + */ + InvalidDataOrganization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InvalidDataOrganization + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvalidDataOrganization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataOrganization"; + }; + + return InvalidDataOrganization; + })(); + + return Action; + })(); + + v1.Asset = (function() { + + /** + * Properties of an Asset. + * @memberof google.cloud.dataplex.v1 + * @interface IAsset + * @property {string|null} [name] Asset name + * @property {string|null} [displayName] Asset displayName + * @property {string|null} [uid] Asset uid + * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime + * @property {Object.|null} [labels] Asset labels + * @property {string|null} [description] Asset description + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state + * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec + * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus + * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus + * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec + * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus + */ + + /** + * Constructs a new Asset. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Asset. + * @implements IAsset + * @constructor + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + */ + function Asset(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]]; + } + + /** + * Asset name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.name = ""; + + /** + * Asset displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.displayName = ""; + + /** + * Asset uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.uid = ""; + + /** + * Asset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.createTime = null; + + /** + * Asset updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.updateTime = null; + + /** + * Asset labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.labels = $util.emptyObject; + + /** + * Asset description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.description = ""; + + /** + * Asset state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.state = 0; + + /** + * Asset resourceSpec. + * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceSpec = null; + + /** + * Asset resourceStatus. + * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.resourceStatus = null; + + /** + * Asset securityStatus. + * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.securityStatus = null; + + /** + * Asset discoverySpec. + * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoverySpec = null; + + /** + * Asset discoveryStatus. + * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus + * @memberof google.cloud.dataplex.v1.Asset + * @instance + */ + Asset.prototype.discoveryStatus = null; + + /** + * Creates a new Asset instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset} Asset instance + */ + Asset.create = function create(properties) { + return new Asset(properties); + }; + + /** + * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encode = function encode(message, writer) { + if (!writer) + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) + $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) + $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) + $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Asset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Asset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), 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: { + message.uid = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + message.description = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 100: { + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); + break; + } + case 103: { + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); + break; + } + case 106: { + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 107: { + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Asset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset} Asset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Asset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Asset message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Asset.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); + if (error) + return "resourceSpec." + error; + } + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); + if (error) + return "resourceStatus." + error; + } + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); + if (error) + return "securityStatus." + error; + } + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); + if (error) + return "discoverySpec." + error; + } + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); + if (error) + return "discoveryStatus." + error; + } + return null; + }; + + /** + * Creates an Asset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset} Asset + */ + Asset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.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.dataplex.v1.Asset.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.resourceSpec != null) { + if (typeof object.resourceSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); + message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); + } + if (object.resourceStatus != null) { + if (typeof object.resourceStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); + message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); + } + if (object.securityStatus != null) { + if (typeof object.securityStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); + message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); + } + if (object.discoverySpec != null) { + if (typeof object.discoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); + message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); + } + if (object.discoveryStatus != null) { + if (typeof object.discoveryStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); + message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); + } + return message; + }; + + /** + * Creates a plain object from an Asset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {google.cloud.dataplex.v1.Asset} message Asset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Asset.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.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceSpec = null; + object.resourceStatus = null; + object.securityStatus = null; + object.discoverySpec = null; + object.discoveryStatus = 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.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) + object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); + if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) + object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); + if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) + object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); + if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) + object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); + if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) + object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); + return object; + }; + + /** + * Converts this Asset to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset + * @instance + * @returns {Object.} JSON object + */ + Asset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Asset + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Asset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset"; + }; + + Asset.SecurityStatus = (function() { + + /** + * Properties of a SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface ISecurityStatus + * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state + * @property {string|null} [message] SecurityStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime + */ + + /** + * Constructs a new SecurityStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a SecurityStatus. + * @implements ISecurityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + */ + function SecurityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityStatus state. + * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.state = 0; + + /** + * SecurityStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.message = ""; + + /** + * SecurityStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + */ + SecurityStatus.prototype.updateTime = null; + + /** + * Creates a new SecurityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance + */ + SecurityStatus.create = function create(properties) { + return new SecurityStatus(properties); + }; + + /** + * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityStatus.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus + */ + SecurityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "APPLYING": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this SecurityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @instance + * @returns {Object.} JSON object + */ + SecurityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.SecurityStatus"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} APPLYING=2 APPLYING value + * @property {number} ERROR=3 ERROR value + */ + SecurityStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "APPLYING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + return SecurityStatus; + })(); + + Asset.DiscoverySpec = (function() { + + /** + * Properties of a DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoverySpec + * @property {boolean|null} [enabled] DiscoverySpec enabled + * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns + * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions + * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions + * @property {string|null} [schedule] DiscoverySpec schedule + */ + + /** + * Constructs a new DiscoverySpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoverySpec. + * @implements IDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + */ + function DiscoverySpec(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySpec enabled. + * @member {boolean} enabled + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.enabled = false; + + /** + * DiscoverySpec includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.includePatterns = $util.emptyArray; + + /** + * DiscoverySpec excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.excludePatterns = $util.emptyArray; + + /** + * DiscoverySpec csvOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.csvOptions = null; + + /** + * DiscoverySpec jsonOptions. + * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.jsonOptions = null; + + /** + * DiscoverySpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + DiscoverySpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoverySpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + */ + Object.defineProperty(DiscoverySpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance + */ + DiscoverySpec.create = function create(properties) { + return new DiscoverySpec(properties); + }; + + /** + * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 3: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 4: { + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + message.schedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec + */ + DiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); + } + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.enabled = false; + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this DiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoverySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec"; + }; + + DiscoverySpec.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + */ + CsvOptions.prototype.disableTypeInference = false; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.disableTypeInference = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"; + }; + + return CsvOptions; + })(); + + DiscoverySpec.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions disableTypeInference. + * @member {boolean} disableTypeInference + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + */ + JsonOptions.prototype.disableTypeInference = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.disableTypeInference = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + if (typeof message.disableTypeInference !== "boolean") + return "disableTypeInference: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.disableTypeInference != null) + message.disableTypeInference = Boolean(object.disableTypeInference); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.disableTypeInference = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) + object.disableTypeInference = message.disableTypeInference; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"; + }; + + return JsonOptions; + })(); + + return DiscoverySpec; + })(); + + Asset.ResourceSpec = (function() { + + /** + * Properties of a ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceSpec + * @property {string|null} [name] ResourceSpec name + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null} [readAccessMode] ResourceSpec readAccessMode + */ + + /** + * Constructs a new ResourceSpec. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceSpec. + * @implements IResourceSpec + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + */ + function ResourceSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSpec name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.name = ""; + + /** + * ResourceSpec type. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.type = 0; + + /** + * ResourceSpec readAccessMode. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode} readAccessMode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.readAccessMode = 0; + + /** + * Creates a new ResourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance + */ + ResourceSpec.create = function create(properties) { + return new ResourceSpec(properties); + }; + + /** + * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encode = function encode(message, writer) { + if (!writer) + 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.readAccessMode != null && Object.hasOwnProperty.call(message, "readAccessMode")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.readAccessMode); + return writer; + }; + + /** + * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 5: { + message.readAccessMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) + switch (message.readAccessMode) { + default: + return "readAccessMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec + */ + ResourceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STORAGE_BUCKET": + case 1: + message.type = 1; + break; + case "BIGQUERY_DATASET": + case 2: + message.type = 2; + break; + } + switch (object.readAccessMode) { + default: + if (typeof object.readAccessMode === "number") { + message.readAccessMode = object.readAccessMode; + break; + } + break; + case "ACCESS_MODE_UNSPECIFIED": + case 0: + message.readAccessMode = 0; + break; + case "DIRECT": + case 1: + message.readAccessMode = 1; + break; + case "MANAGED": + case 2: + message.readAccessMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.readAccessMode = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; + } + 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.dataplex.v1.Asset.ResourceSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; + if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) + object.readAccessMode = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] === undefined ? message.readAccessMode : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] : message.readAccessMode; + return object; + }; + + /** + * Converts this ResourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceSpec"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value + * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value + */ + ResourceSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STORAGE_BUCKET"] = 1; + values[valuesById[2] = "BIGQUERY_DATASET"] = 2; + return values; + })(); + + /** + * AccessMode enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode + * @enum {number} + * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value + * @property {number} DIRECT=1 DIRECT value + * @property {number} MANAGED=2 MANAGED value + */ + ResourceSpec.AccessMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIRECT"] = 1; + values[valuesById[2] = "MANAGED"] = 2; + return values; + })(); + + return ResourceSpec; + })(); + + Asset.ResourceStatus = (function() { + + /** + * Properties of a ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IResourceStatus + * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state + * @property {string|null} [message] ResourceStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime + * @property {string|null} [managedAccessIdentity] ResourceStatus managedAccessIdentity + */ + + /** + * Constructs a new ResourceStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a ResourceStatus. + * @implements IResourceStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + */ + function ResourceStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceStatus state. + * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.state = 0; + + /** + * ResourceStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.message = ""; + + /** + * ResourceStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.updateTime = null; + + /** + * ResourceStatus managedAccessIdentity. + * @member {string} managedAccessIdentity + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.managedAccessIdentity = ""; + + /** + * Creates a new ResourceStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance + */ + ResourceStatus.create = function create(properties) { + return new ResourceStatus(properties); + }; + + /** + * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.managedAccessIdentity != null && Object.hasOwnProperty.call(message, "managedAccessIdentity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.managedAccessIdentity); + return writer; + }; + + /** + * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.managedAccessIdentity = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceStatus.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: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) + if (!$util.isString(message.managedAccessIdentity)) + return "managedAccessIdentity: string expected"; + return null; + }; + + /** + * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus + */ + ResourceStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "ERROR": + case 2: + message.state = 2; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.managedAccessIdentity != null) + message.managedAccessIdentity = String(object.managedAccessIdentity); + return message; + }; + + /** + * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.managedAccessIdentity = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) + object.managedAccessIdentity = message.managedAccessIdentity; + return object; + }; + + /** + * Converts this ResourceStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + * @returns {Object.} JSON object + */ + ResourceStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceStatus"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} ERROR=2 ERROR value + */ + ResourceStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "ERROR"] = 2; + return values; + })(); + + return ResourceStatus; + })(); + + Asset.DiscoveryStatus = (function() { + + /** + * Properties of a DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @interface IDiscoveryStatus + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state + * @property {string|null} [message] DiscoveryStatus message + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime + * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats + * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration + */ + + /** + * Constructs a new DiscoveryStatus. + * @memberof google.cloud.dataplex.v1.Asset + * @classdesc Represents a DiscoveryStatus. + * @implements IDiscoveryStatus + * @constructor + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + */ + function DiscoveryStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryStatus state. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.state = 0; + + /** + * DiscoveryStatus message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.message = ""; + + /** + * DiscoveryStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.updateTime = null; + + /** + * DiscoveryStatus lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunTime = null; + + /** + * DiscoveryStatus stats. + * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.stats = null; + + /** + * DiscoveryStatus lastRunDuration. + * @member {google.protobuf.IDuration|null|undefined} lastRunDuration + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + */ + DiscoveryStatus.prototype.lastRunDuration = null; + + /** + * Creates a new DiscoveryStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance + */ + DiscoveryStatus.create = function create(properties) { + return new DiscoveryStatus(properties); + }; + + /** + * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) + $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryStatus.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 5: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); + if (error) + return "lastRunTime." + error; + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { + var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); + if (error) + return "lastRunDuration." + error; + } + return null; + }; + + /** + * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus + */ + DiscoveryStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SCHEDULED": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); + message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); + } + if (object.lastRunDuration != null) { + if (typeof object.lastRunDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); + message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.updateTime = null; + object.lastRunTime = null; + object.stats = null; + object.lastRunDuration = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); + if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) + object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); + return object; + }; + + /** + * Converts this DiscoveryStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @instance + * @returns {Object.} JSON object + */ + DiscoveryStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} PAUSED=3 PAUSED value + * @property {number} DISABLED=5 DISABLED value + */ + DiscoveryStatus.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[5] = "DISABLED"] = 5; + return values; + })(); + + DiscoveryStatus.Stats = (function() { + + /** + * Properties of a Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @interface IStats + * @property {number|Long|null} [dataItems] Stats dataItems + * @property {number|Long|null} [dataSize] Stats dataSize + * @property {number|Long|null} [tables] Stats tables + * @property {number|Long|null} [filesets] Stats filesets + */ + + /** + * Constructs a new Stats. + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus + * @classdesc Represents a Stats. + * @implements IStats + * @constructor + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + */ + function Stats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Stats dataItems. + * @member {number|Long} dataItems + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats dataSize. + * @member {number|Long} dataSize + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats tables. + * @member {number|Long} tables + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Stats filesets. + * @member {number|Long} filesets + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + */ + Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Stats instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance + */ + Stats.create = function create(properties) { + return new Stats(properties); + }; + + /** + * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); + if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); + if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); + return writer; + }; + + /** + * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Stats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataItems = reader.int64(); + break; + } + case 2: { + message.dataSize = reader.int64(); + break; + } + case 3: { + message.tables = reader.int64(); + break; + } + case 4: { + message.filesets = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Stats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Stats message. + * @function verify + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) + return "dataItems: integer|Long expected"; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) + return "dataSize: integer|Long expected"; + if (message.tables != null && message.hasOwnProperty("tables")) + if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) + return "tables: integer|Long expected"; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) + return "filesets: integer|Long expected"; + return null; + }; + + /** + * Creates a Stats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats + */ + Stats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) + return object; + var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); + if (object.dataItems != null) + if ($util.Long) + (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; + else if (typeof object.dataItems === "string") + message.dataItems = parseInt(object.dataItems, 10); + else if (typeof object.dataItems === "number") + message.dataItems = object.dataItems; + else if (typeof object.dataItems === "object") + message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); + if (object.dataSize != null) + if ($util.Long) + (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; + else if (typeof object.dataSize === "string") + message.dataSize = parseInt(object.dataSize, 10); + else if (typeof object.dataSize === "number") + message.dataSize = object.dataSize; + else if (typeof object.dataSize === "object") + message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); + if (object.tables != null) + if ($util.Long) + (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; + else if (typeof object.tables === "string") + message.tables = parseInt(object.tables, 10); + else if (typeof object.tables === "number") + message.tables = object.tables; + else if (typeof object.tables === "object") + message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); + if (object.filesets != null) + if ($util.Long) + (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; + else if (typeof object.filesets === "string") + message.filesets = parseInt(object.filesets, 10); + else if (typeof object.filesets === "number") + message.filesets = object.filesets; + else if (typeof object.filesets === "object") + message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Stats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stats.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.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataItems = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tables = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.filesets = options.longs === String ? "0" : 0; + } + if (message.dataItems != null && message.hasOwnProperty("dataItems")) + if (typeof message.dataItems === "number") + object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; + else + object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; + if (message.dataSize != null && message.hasOwnProperty("dataSize")) + if (typeof message.dataSize === "number") + object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; + else + object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; + if (message.tables != null && message.hasOwnProperty("tables")) + if (typeof message.tables === "number") + object.tables = options.longs === String ? String(message.tables) : message.tables; + else + object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; + if (message.filesets != null && message.hasOwnProperty("filesets")) + if (typeof message.filesets === "number") + object.filesets = options.longs === String ? String(message.filesets) : message.filesets; + else + object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; + return object; + }; + + /** + * Converts this Stats to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @instance + * @returns {Object.} JSON object + */ + Stats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Stats + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Stats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"; + }; + + return Stats; + })(); + + return DiscoveryStatus; + })(); + + return Asset; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ACTION_REQUIRED"] = 4; + return values; + })(); + + v1.CatalogService = (function() { + + /** + * Constructs a new CatalogService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CatalogService + * @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 CatalogService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CatalogService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CatalogService; + + /** + * Creates new CatalogService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.CatalogService + * @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 {CatalogService} RPC service. Useful where requests and/or responses are streamed. + */ + CatalogService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateEntryTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEntryType. + * @function createEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} request CreateEntryTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createEntryType = function createEntryType(request, callback) { + return this.rpcCall(createEntryType, $root.google.cloud.dataplex.v1.CreateEntryTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEntryType" }); + + /** + * Calls CreateEntryType. + * @function createEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} request CreateEntryTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef UpdateEntryTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEntryType. + * @function updateEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} request UpdateEntryTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.updateEntryType = function updateEntryType(request, callback) { + return this.rpcCall(updateEntryType, $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEntryType" }); + + /** + * Calls UpdateEntryType. + * @function updateEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} request UpdateEntryTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef DeleteEntryTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEntryType. + * @function deleteEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} request DeleteEntryTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.deleteEntryType = function deleteEntryType(request, callback) { + return this.rpcCall(deleteEntryType, $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEntryType" }); + + /** + * Calls DeleteEntryType. + * @function deleteEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} request DeleteEntryTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryTypes}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListEntryTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntryTypesResponse} [response] ListEntryTypesResponse + */ + + /** + * Calls ListEntryTypes. + * @function listEntryTypes + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} request ListEntryTypesRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListEntryTypesCallback} callback Node-style callback called with the error, if any, and ListEntryTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listEntryTypes = function listEntryTypes(request, callback) { + return this.rpcCall(listEntryTypes, $root.google.cloud.dataplex.v1.ListEntryTypesRequest, $root.google.cloud.dataplex.v1.ListEntryTypesResponse, request, callback); + }, "name", { value: "ListEntryTypes" }); + + /** + * Calls ListEntryTypes. + * @function listEntryTypes + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} request ListEntryTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetEntryTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.EntryType} [response] EntryType + */ + + /** + * Calls GetEntryType. + * @function getEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} request GetEntryTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetEntryTypeCallback} callback Node-style callback called with the error, if any, and EntryType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getEntryType = function getEntryType(request, callback) { + return this.rpcCall(getEntryType, $root.google.cloud.dataplex.v1.GetEntryTypeRequest, $root.google.cloud.dataplex.v1.EntryType, request, callback); + }, "name", { value: "GetEntryType" }); + + /** + * Calls GetEntryType. + * @function getEntryType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} request GetEntryTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createAspectType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateAspectTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAspectType. + * @function createAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} request CreateAspectTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createAspectType = function createAspectType(request, callback) { + return this.rpcCall(createAspectType, $root.google.cloud.dataplex.v1.CreateAspectTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAspectType" }); + + /** + * Calls CreateAspectType. + * @function createAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} request CreateAspectTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateAspectType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef UpdateAspectTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAspectType. + * @function updateAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} request UpdateAspectTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.UpdateAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.updateAspectType = function updateAspectType(request, callback) { + return this.rpcCall(updateAspectType, $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAspectType" }); + + /** + * Calls UpdateAspectType. + * @function updateAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} request UpdateAspectTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteAspectType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef DeleteAspectTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAspectType. + * @function deleteAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} request DeleteAspectTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.DeleteAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.deleteAspectType = function deleteAspectType(request, callback) { + return this.rpcCall(deleteAspectType, $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAspectType" }); + + /** + * Calls DeleteAspectType. + * @function deleteAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} request DeleteAspectTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listAspectTypes}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListAspectTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAspectTypesResponse} [response] ListAspectTypesResponse + */ + + /** + * Calls ListAspectTypes. + * @function listAspectTypes + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} request ListAspectTypesRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListAspectTypesCallback} callback Node-style callback called with the error, if any, and ListAspectTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listAspectTypes = function listAspectTypes(request, callback) { + return this.rpcCall(listAspectTypes, $root.google.cloud.dataplex.v1.ListAspectTypesRequest, $root.google.cloud.dataplex.v1.ListAspectTypesResponse, request, callback); + }, "name", { value: "ListAspectTypes" }); + + /** + * Calls ListAspectTypes. + * @function listAspectTypes + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} request ListAspectTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getAspectType}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetAspectTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.AspectType} [response] AspectType + */ + + /** + * Calls GetAspectType. + * @function getAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} request GetAspectTypeRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetAspectTypeCallback} callback Node-style callback called with the error, if any, and AspectType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getAspectType = function getAspectType(request, callback) { + return this.rpcCall(getAspectType, $root.google.cloud.dataplex.v1.GetAspectTypeRequest, $root.google.cloud.dataplex.v1.AspectType, request, callback); + }, "name", { value: "GetAspectType" }); + + /** + * Calls GetAspectType. + * @function getAspectType + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} request GetAspectTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryGroup}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEntryGroup. + * @function createEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createEntryGroup = function createEntryGroup(request, callback) { + return this.rpcCall(createEntryGroup, $root.google.cloud.dataplex.v1.CreateEntryGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEntryGroup" }); + + /** + * Calls CreateEntryGroup. + * @function createEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryGroup}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef UpdateEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEntryGroup. + * @function updateEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.updateEntryGroup = function updateEntryGroup(request, callback) { + return this.rpcCall(updateEntryGroup, $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEntryGroup" }); + + /** + * Calls UpdateEntryGroup. + * @function updateEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryGroup}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef DeleteEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEntryGroup. + * @function deleteEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { + return this.rpcCall(deleteEntryGroup, $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEntryGroup" }); + + /** + * Calls DeleteEntryGroup. + * @function deleteEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryGroups}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListEntryGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntryGroupsResponse} [response] ListEntryGroupsResponse + */ + + /** + * Calls ListEntryGroups. + * @function listEntryGroups + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListEntryGroupsCallback} callback Node-style callback called with the error, if any, and ListEntryGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listEntryGroups = function listEntryGroups(request, callback) { + return this.rpcCall(listEntryGroups, $root.google.cloud.dataplex.v1.ListEntryGroupsRequest, $root.google.cloud.dataplex.v1.ListEntryGroupsResponse, request, callback); + }, "name", { value: "ListEntryGroups" }); + + /** + * Calls ListEntryGroups. + * @function listEntryGroups + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryGroup}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetEntryGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.EntryGroup} [response] EntryGroup + */ + + /** + * Calls GetEntryGroup. + * @function getEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getEntryGroup = function getEntryGroup(request, callback) { + return this.rpcCall(getEntryGroup, $root.google.cloud.dataplex.v1.GetEntryGroupRequest, $root.google.cloud.dataplex.v1.EntryGroup, request, callback); + }, "name", { value: "GetEntryGroup" }); + + /** + * Calls GetEntryGroup. + * @function getEntryGroup + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntry}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entry} [response] Entry + */ + + /** + * Calls CreateEntry. + * @function createEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createEntry = function createEntry(request, callback) { + return this.rpcCall(createEntry, $root.google.cloud.dataplex.v1.CreateEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); + }, "name", { value: "CreateEntry" }); + + /** + * Calls CreateEntry. + * @function createEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntry}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef UpdateEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entry} [response] Entry + */ + + /** + * Calls UpdateEntry. + * @function updateEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.updateEntry = function updateEntry(request, callback) { + return this.rpcCall(updateEntry, $root.google.cloud.dataplex.v1.UpdateEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); + }, "name", { value: "UpdateEntry" }); + + /** + * Calls UpdateEntry. + * @function updateEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntry}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef DeleteEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entry} [response] Entry + */ + + /** + * Calls DeleteEntry. + * @function deleteEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.deleteEntry = function deleteEntry(request, callback) { + return this.rpcCall(deleteEntry, $root.google.cloud.dataplex.v1.DeleteEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); + }, "name", { value: "DeleteEntry" }); + + /** + * Calls DeleteEntry. + * @function deleteEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntries}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntriesResponse} [response] ListEntriesResponse + */ + + /** + * Calls ListEntries. + * @function listEntries + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntriesRequest} request ListEntriesRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListEntriesCallback} callback Node-style callback called with the error, if any, and ListEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listEntries = function listEntries(request, callback) { + return this.rpcCall(listEntries, $root.google.cloud.dataplex.v1.ListEntriesRequest, $root.google.cloud.dataplex.v1.ListEntriesResponse, request, callback); + }, "name", { value: "ListEntries" }); + + /** + * Calls ListEntries. + * @function listEntries + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListEntriesRequest} request ListEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntry}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entry} [response] Entry + */ + + /** + * Calls GetEntry. + * @function getEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryRequest} request GetEntryRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getEntry = function getEntry(request, callback) { + return this.rpcCall(getEntry, $root.google.cloud.dataplex.v1.GetEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); + }, "name", { value: "GetEntry" }); + + /** + * Calls GetEntry. + * @function getEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntryRequest} request GetEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|lookupEntry}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef LookupEntryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entry} [response] Entry + */ + + /** + * Calls LookupEntry. + * @function lookupEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.lookupEntry = function lookupEntry(request, callback) { + return this.rpcCall(lookupEntry, $root.google.cloud.dataplex.v1.LookupEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); + }, "name", { value: "LookupEntry" }); + + /** + * Calls LookupEntry. + * @function lookupEntry + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|searchEntries}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef SearchEntriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.SearchEntriesResponse} [response] SearchEntriesResponse + */ + + /** + * Calls SearchEntries. + * @function searchEntries + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} request SearchEntriesRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.SearchEntriesCallback} callback Node-style callback called with the error, if any, and SearchEntriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.searchEntries = function searchEntries(request, callback) { + return this.rpcCall(searchEntries, $root.google.cloud.dataplex.v1.SearchEntriesRequest, $root.google.cloud.dataplex.v1.SearchEntriesResponse, request, callback); + }, "name", { value: "SearchEntries" }); + + /** + * Calls SearchEntries. + * @function searchEntries + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} request SearchEntriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMetadataJob. + * @function createMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createMetadataJob = function createMetadataJob(request, callback) { + return this.rpcCall(createMetadataJob, $root.google.cloud.dataplex.v1.CreateMetadataJobRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMetadataJob" }); + + /** + * Calls CreateMetadataJob. + * @function createMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.MetadataJob} [response] MetadataJob + */ + + /** + * Calls GetMetadataJob. + * @function getMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback} callback Node-style callback called with the error, if any, and MetadataJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getMetadataJob = function getMetadataJob(request, callback) { + return this.rpcCall(getMetadataJob, $root.google.cloud.dataplex.v1.GetMetadataJobRequest, $root.google.cloud.dataplex.v1.MetadataJob, request, callback); + }, "name", { value: "GetMetadataJob" }); + + /** + * Calls GetMetadataJob. + * @function getMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListMetadataJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} [response] ListMetadataJobsResponse + */ + + /** + * Calls ListMetadataJobs. + * @function listMetadataJobs + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback} callback Node-style callback called with the error, if any, and ListMetadataJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listMetadataJobs = function listMetadataJobs(request, callback) { + return this.rpcCall(listMetadataJobs, $root.google.cloud.dataplex.v1.ListMetadataJobsRequest, $root.google.cloud.dataplex.v1.ListMetadataJobsResponse, request, callback); + }, "name", { value: "ListMetadataJobs" }); + + /** + * Calls ListMetadataJobs. + * @function listMetadataJobs + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CancelMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelMetadataJob. + * @function cancelMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.cancelMetadataJob = function cancelMetadataJob(request, callback) { + return this.rpcCall(cancelMetadataJob, $root.google.cloud.dataplex.v1.CancelMetadataJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelMetadataJob" }); + + /** + * Calls CancelMetadataJob. + * @function cancelMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CatalogService; + })(); + + v1.AspectType = (function() { + + /** + * Properties of an AspectType. + * @memberof google.cloud.dataplex.v1 + * @interface IAspectType + * @property {string|null} [name] AspectType name + * @property {string|null} [uid] AspectType uid + * @property {google.protobuf.ITimestamp|null} [createTime] AspectType createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AspectType updateTime + * @property {string|null} [description] AspectType description + * @property {string|null} [displayName] AspectType displayName + * @property {Object.|null} [labels] AspectType labels + * @property {string|null} [etag] AspectType etag + * @property {google.cloud.dataplex.v1.AspectType.IAuthorization|null} [authorization] AspectType authorization + * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [metadataTemplate] AspectType metadataTemplate + * @property {google.cloud.dataplex.v1.TransferStatus|null} [transferStatus] AspectType transferStatus + */ + + /** + * Constructs a new AspectType. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AspectType. + * @implements IAspectType + * @constructor + * @param {google.cloud.dataplex.v1.IAspectType=} [properties] Properties to set + */ + function AspectType(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]]; + } + + /** + * AspectType name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.name = ""; + + /** + * AspectType uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.uid = ""; + + /** + * AspectType createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.createTime = null; + + /** + * AspectType updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.updateTime = null; + + /** + * AspectType description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.description = ""; + + /** + * AspectType displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.displayName = ""; + + /** + * AspectType labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.labels = $util.emptyObject; + + /** + * AspectType etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.etag = ""; + + /** + * AspectType authorization. + * @member {google.cloud.dataplex.v1.AspectType.IAuthorization|null|undefined} authorization + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.authorization = null; + + /** + * AspectType metadataTemplate. + * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} metadataTemplate + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.metadataTemplate = null; + + /** + * AspectType transferStatus. + * @member {google.cloud.dataplex.v1.TransferStatus} transferStatus + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + */ + AspectType.prototype.transferStatus = 0; + + /** + * Creates a new AspectType instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {google.cloud.dataplex.v1.IAspectType=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType} AspectType instance + */ + AspectType.create = function create(properties) { + return new AspectType(properties); + }; + + /** + * Encodes the specified AspectType message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {google.cloud.dataplex.v1.IAspectType} message AspectType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) + $root.google.cloud.dataplex.v1.AspectType.Authorization.encode(message.authorization, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.metadataTemplate != null && Object.hasOwnProperty.call(message, "metadataTemplate")) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.metadataTemplate, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.transferStatus != null && Object.hasOwnProperty.call(message, "transferStatus")) + writer.uint32(/* id 202, wireType 0 =*/1616).int32(message.transferStatus); + return writer; + }; + + /** + * Encodes the specified AspectType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {google.cloud.dataplex.v1.IAspectType} message AspectType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AspectType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType} AspectType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 52: { + message.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.decode(reader, reader.uint32()); + break; + } + case 53: { + message.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); + break; + } + case 202: { + message.transferStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AspectType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType} AspectType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AspectType message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AspectType.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.authorization != null && message.hasOwnProperty("authorization")) { + var error = $root.google.cloud.dataplex.v1.AspectType.Authorization.verify(message.authorization); + if (error) + return "authorization." + error; + } + if (message.metadataTemplate != null && message.hasOwnProperty("metadataTemplate")) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.metadataTemplate); + if (error) + return "metadataTemplate." + error; + } + if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) + switch (message.transferStatus) { + default: + return "transferStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AspectType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType} AspectType + */ + AspectType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.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.dataplex.v1.AspectType.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.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.etag != null) + message.etag = String(object.etag); + if (object.authorization != null) { + if (typeof object.authorization !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.authorization: object expected"); + message.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.fromObject(object.authorization); + } + if (object.metadataTemplate != null) { + if (typeof object.metadataTemplate !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.metadataTemplate: object expected"); + message.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.metadataTemplate); + } + switch (object.transferStatus) { + default: + if (typeof object.transferStatus === "number") { + message.transferStatus = object.transferStatus; + break; + } + break; + case "TRANSFER_STATUS_UNSPECIFIED": + case 0: + message.transferStatus = 0; + break; + case "TRANSFER_STATUS_MIGRATED": + case 1: + message.transferStatus = 1; + break; + case "TRANSFER_STATUS_TRANSFERRED": + case 2: + message.transferStatus = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AspectType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {google.cloud.dataplex.v1.AspectType} message AspectType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AspectType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.etag = ""; + object.authorization = null; + object.metadataTemplate = null; + object.transferStatus = options.enums === String ? "TRANSFER_STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.authorization != null && message.hasOwnProperty("authorization")) + object.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.toObject(message.authorization, options); + if (message.metadataTemplate != null && message.hasOwnProperty("metadataTemplate")) + object.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.metadataTemplate, options); + if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) + object.transferStatus = options.enums === String ? $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] === undefined ? message.transferStatus : $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] : message.transferStatus; + return object; + }; + + /** + * Converts this AspectType to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType + * @instance + * @returns {Object.} JSON object + */ + AspectType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AspectType + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AspectType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType"; + }; + + AspectType.Authorization = (function() { + + /** + * Properties of an Authorization. + * @memberof google.cloud.dataplex.v1.AspectType + * @interface IAuthorization + * @property {string|null} [alternateUsePermission] Authorization alternateUsePermission + */ + + /** + * Constructs a new Authorization. + * @memberof google.cloud.dataplex.v1.AspectType + * @classdesc Represents an Authorization. + * @implements IAuthorization + * @constructor + * @param {google.cloud.dataplex.v1.AspectType.IAuthorization=} [properties] Properties to set + */ + function Authorization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Authorization alternateUsePermission. + * @member {string} alternateUsePermission + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @instance + */ + Authorization.prototype.alternateUsePermission = ""; + + /** + * Creates a new Authorization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {google.cloud.dataplex.v1.AspectType.IAuthorization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization instance + */ + Authorization.create = function create(properties) { + return new Authorization(properties); + }; + + /** + * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {google.cloud.dataplex.v1.AspectType.IAuthorization} message Authorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authorization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alternateUsePermission != null && Object.hasOwnProperty.call(message, "alternateUsePermission")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.alternateUsePermission); + return writer; + }; + + /** + * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {google.cloud.dataplex.v1.AspectType.IAuthorization} message Authorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authorization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Authorization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authorization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.Authorization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.alternateUsePermission = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Authorization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authorization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Authorization message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Authorization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) + if (!$util.isString(message.alternateUsePermission)) + return "alternateUsePermission: string expected"; + return null; + }; + + /** + * Creates an Authorization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization + */ + Authorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType.Authorization) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType.Authorization(); + if (object.alternateUsePermission != null) + message.alternateUsePermission = String(object.alternateUsePermission); + return message; + }; + + /** + * Creates a plain object from an Authorization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {google.cloud.dataplex.v1.AspectType.Authorization} message Authorization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Authorization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.alternateUsePermission = ""; + if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) + object.alternateUsePermission = message.alternateUsePermission; + return object; + }; + + /** + * Converts this Authorization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @instance + * @returns {Object.} JSON object + */ + Authorization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Authorization + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectType.Authorization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Authorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.Authorization"; + }; + + return Authorization; + })(); + + AspectType.MetadataTemplate = (function() { + + /** + * Properties of a MetadataTemplate. + * @memberof google.cloud.dataplex.v1.AspectType + * @interface IMetadataTemplate + * @property {number|null} [index] MetadataTemplate index + * @property {string|null} [name] MetadataTemplate name + * @property {string|null} [type] MetadataTemplate type + * @property {Array.|null} [recordFields] MetadataTemplate recordFields + * @property {Array.|null} [enumValues] MetadataTemplate enumValues + * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [mapItems] MetadataTemplate mapItems + * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [arrayItems] MetadataTemplate arrayItems + * @property {string|null} [typeId] MetadataTemplate typeId + * @property {string|null} [typeRef] MetadataTemplate typeRef + * @property {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null} [constraints] MetadataTemplate constraints + * @property {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null} [annotations] MetadataTemplate annotations + */ + + /** + * Constructs a new MetadataTemplate. + * @memberof google.cloud.dataplex.v1.AspectType + * @classdesc Represents a MetadataTemplate. + * @implements IMetadataTemplate + * @constructor + * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate=} [properties] Properties to set + */ + function MetadataTemplate(properties) { + this.recordFields = []; + this.enumValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataTemplate index. + * @member {number} index + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.index = 0; + + /** + * MetadataTemplate name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.name = ""; + + /** + * MetadataTemplate type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.type = ""; + + /** + * MetadataTemplate recordFields. + * @member {Array.} recordFields + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.recordFields = $util.emptyArray; + + /** + * MetadataTemplate enumValues. + * @member {Array.} enumValues + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.enumValues = $util.emptyArray; + + /** + * MetadataTemplate mapItems. + * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} mapItems + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.mapItems = null; + + /** + * MetadataTemplate arrayItems. + * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} arrayItems + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.arrayItems = null; + + /** + * MetadataTemplate typeId. + * @member {string} typeId + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.typeId = ""; + + /** + * MetadataTemplate typeRef. + * @member {string} typeRef + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.typeRef = ""; + + /** + * MetadataTemplate constraints. + * @member {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null|undefined} constraints + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.constraints = null; + + /** + * MetadataTemplate annotations. + * @member {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null|undefined} annotations + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + */ + MetadataTemplate.prototype.annotations = null; + + /** + * Creates a new MetadataTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate instance + */ + MetadataTemplate.create = function create(properties) { + return new MetadataTemplate(properties); + }; + + /** + * Encodes the specified MetadataTemplate message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate} message MetadataTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); + if (message.recordFields != null && message.recordFields.length) + for (var i = 0; i < message.recordFields.length; ++i) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.recordFields[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.enumValues != null && message.enumValues.length) + for (var i = 0; i < message.enumValues.length; ++i) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.encode(message.enumValues[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.mapItems != null && Object.hasOwnProperty.call(message, "mapItems")) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.mapItems, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.arrayItems != null && Object.hasOwnProperty.call(message, "arrayItems")) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.arrayItems, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.typeId != null && Object.hasOwnProperty.call(message, "typeId")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.typeId); + if (message.typeRef != null && Object.hasOwnProperty.call(message, "typeRef")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.typeRef); + if (message.constraints != null && Object.hasOwnProperty.call(message, "constraints")) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.encode(message.constraints, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.encode(message.annotations, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataTemplate message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate} message MetadataTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataTemplate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.index = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 5: { + message.type = reader.string(); + break; + } + case 6: { + if (!(message.recordFields && message.recordFields.length)) + message.recordFields = []; + message.recordFields.push($root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.enumValues && message.enumValues.length)) + message.enumValues = []; + message.enumValues.push($root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.decode(reader, reader.uint32())); + break; + } + case 10: { + message.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); + break; + } + case 11: { + message.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); + break; + } + case 12: { + message.typeId = reader.string(); + break; + } + case 13: { + message.typeRef = reader.string(); + break; + } + case 50: { + message.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.decode(reader, reader.uint32()); + break; + } + case 51: { + message.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataTemplate message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.recordFields != null && message.hasOwnProperty("recordFields")) { + if (!Array.isArray(message.recordFields)) + return "recordFields: array expected"; + for (var i = 0; i < message.recordFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.recordFields[i]); + if (error) + return "recordFields." + error; + } + } + if (message.enumValues != null && message.hasOwnProperty("enumValues")) { + if (!Array.isArray(message.enumValues)) + return "enumValues: array expected"; + for (var i = 0; i < message.enumValues.length; ++i) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify(message.enumValues[i]); + if (error) + return "enumValues." + error; + } + } + if (message.mapItems != null && message.hasOwnProperty("mapItems")) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.mapItems); + if (error) + return "mapItems." + error; + } + if (message.arrayItems != null && message.hasOwnProperty("arrayItems")) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.arrayItems); + if (error) + return "arrayItems." + error; + } + if (message.typeId != null && message.hasOwnProperty("typeId")) + if (!$util.isString(message.typeId)) + return "typeId: string expected"; + if (message.typeRef != null && message.hasOwnProperty("typeRef")) + if (!$util.isString(message.typeRef)) + return "typeRef: string expected"; + if (message.constraints != null && message.hasOwnProperty("constraints")) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify(message.constraints); + if (error) + return "constraints." + error; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } + return null; + }; + + /** + * Creates a MetadataTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate + */ + MetadataTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate(); + if (object.index != null) + message.index = object.index | 0; + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.recordFields) { + if (!Array.isArray(object.recordFields)) + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.recordFields: array expected"); + message.recordFields = []; + for (var i = 0; i < object.recordFields.length; ++i) { + if (typeof object.recordFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.recordFields: object expected"); + message.recordFields[i] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.recordFields[i]); + } + } + if (object.enumValues) { + if (!Array.isArray(object.enumValues)) + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.enumValues: array expected"); + message.enumValues = []; + for (var i = 0; i < object.enumValues.length; ++i) { + if (typeof object.enumValues[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.enumValues: object expected"); + message.enumValues[i] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.fromObject(object.enumValues[i]); + } + } + if (object.mapItems != null) { + if (typeof object.mapItems !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.mapItems: object expected"); + message.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.mapItems); + } + if (object.arrayItems != null) { + if (typeof object.arrayItems !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.arrayItems: object expected"); + message.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.arrayItems); + } + if (object.typeId != null) + message.typeId = String(object.typeId); + if (object.typeRef != null) + message.typeRef = String(object.typeRef); + if (object.constraints != null) { + if (typeof object.constraints !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.constraints: object expected"); + message.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.fromObject(object.constraints); + } + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.annotations: object expected"); + message.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.fromObject(object.annotations); + } + return message; + }; + + /** + * Creates a plain object from a MetadataTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate} message MetadataTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.recordFields = []; + object.enumValues = []; + } + if (options.defaults) { + object.index = 0; + object.name = ""; + object.type = ""; + object.mapItems = null; + object.arrayItems = null; + object.typeId = ""; + object.typeRef = ""; + object.constraints = null; + object.annotations = null; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.recordFields && message.recordFields.length) { + object.recordFields = []; + for (var j = 0; j < message.recordFields.length; ++j) + object.recordFields[j] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.recordFields[j], options); + } + if (message.enumValues && message.enumValues.length) { + object.enumValues = []; + for (var j = 0; j < message.enumValues.length; ++j) + object.enumValues[j] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.toObject(message.enumValues[j], options); + } + if (message.mapItems != null && message.hasOwnProperty("mapItems")) + object.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.mapItems, options); + if (message.arrayItems != null && message.hasOwnProperty("arrayItems")) + object.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.arrayItems, options); + if (message.typeId != null && message.hasOwnProperty("typeId")) + object.typeId = message.typeId; + if (message.typeRef != null && message.hasOwnProperty("typeRef")) + object.typeRef = message.typeRef; + if (message.constraints != null && message.hasOwnProperty("constraints")) + object.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.toObject(message.constraints, options); + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.toObject(message.annotations, options); + return object; + }; + + /** + * Converts this MetadataTemplate to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @instance + * @returns {Object.} JSON object + */ + MetadataTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataTemplate + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate"; + }; + + MetadataTemplate.EnumValue = (function() { + + /** + * Properties of an EnumValue. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @interface IEnumValue + * @property {number|null} [index] EnumValue index + * @property {string|null} [name] EnumValue name + * @property {string|null} [deprecated] EnumValue deprecated + */ + + /** + * Constructs a new EnumValue. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @classdesc Represents an EnumValue. + * @implements IEnumValue + * @constructor + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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 index. + * @member {number} index + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @instance + */ + EnumValue.prototype.index = 0; + + /** + * EnumValue name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @instance + */ + EnumValue.prototype.name = ""; + + /** + * EnumValue deprecated. + * @member {string} deprecated + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @instance + */ + EnumValue.prototype.deprecated = ""; + + /** + * Creates a new EnumValue instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue} EnumValue instance + */ + EnumValue.create = function create(properties) { + return new EnumValue(properties); + }; + + /** + * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecated); + return writer; + }; + + /** + * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.index = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.deprecated = 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.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (!$util.isString(message.deprecated)) + return "deprecated: 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.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue} EnumValue + */ + EnumValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue(); + if (object.index != null) + message.index = object.index | 0; + if (object.name != null) + message.name = String(object.name); + if (object.deprecated != null) + message.deprecated = String(object.deprecated); + return message; + }; + + /** + * Creates a plain object from an EnumValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.index = 0; + object.name = ""; + object.deprecated = ""; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + return object; + }; + + /** + * Converts this EnumValue to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue"; + }; + + return EnumValue; + })(); + + MetadataTemplate.Constraints = (function() { + + /** + * Properties of a Constraints. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @interface IConstraints + * @property {boolean|null} [required] Constraints required + */ + + /** + * Constructs a new Constraints. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @classdesc Represents a Constraints. + * @implements IConstraints + * @constructor + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints=} [properties] Properties to set + */ + function Constraints(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Constraints required. + * @member {boolean} required + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @instance + */ + Constraints.prototype.required = false; + + /** + * Creates a new Constraints instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints instance + */ + Constraints.create = function create(properties) { + return new Constraints(properties); + }; + + /** + * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints} message Constraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Constraints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.required != null && Object.hasOwnProperty.call(message, "required")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.required); + return writer; + }; + + /** + * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints} message Constraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Constraints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Constraints message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Constraints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.required = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Constraints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Constraints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Constraints message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Constraints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.required != null && message.hasOwnProperty("required")) + if (typeof message.required !== "boolean") + return "required: boolean expected"; + return null; + }; + + /** + * Creates a Constraints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints + */ + Constraints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints(); + if (object.required != null) + message.required = Boolean(object.required); + return message; + }; + + /** + * Creates a plain object from a Constraints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} message Constraints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Constraints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.required = false; + if (message.required != null && message.hasOwnProperty("required")) + object.required = message.required; + return object; + }; + + /** + * Converts this Constraints to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @instance + * @returns {Object.} JSON object + */ + Constraints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Constraints + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Constraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"; + }; + + return Constraints; + })(); + + MetadataTemplate.Annotations = (function() { + + /** + * Properties of an Annotations. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @interface IAnnotations + * @property {string|null} [deprecated] Annotations deprecated + * @property {string|null} [displayName] Annotations displayName + * @property {string|null} [description] Annotations description + * @property {number|null} [displayOrder] Annotations displayOrder + * @property {string|null} [stringType] Annotations stringType + * @property {Array.|null} [stringValues] Annotations stringValues + */ + + /** + * Constructs a new Annotations. + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate + * @classdesc Represents an Annotations. + * @implements IAnnotations + * @constructor + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations=} [properties] Properties to set + */ + function Annotations(properties) { + this.stringValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotations deprecated. + * @member {string} deprecated + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.deprecated = ""; + + /** + * Annotations displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.displayName = ""; + + /** + * Annotations description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.description = ""; + + /** + * Annotations displayOrder. + * @member {number} displayOrder + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.displayOrder = 0; + + /** + * Annotations stringType. + * @member {string} stringType + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.stringType = ""; + + /** + * Annotations stringValues. + * @member {Array.} stringValues + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + */ + Annotations.prototype.stringValues = $util.emptyArray; + + /** + * Creates a new Annotations instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations instance + */ + Annotations.create = function create(properties) { + return new Annotations(properties); + }; + + /** + * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations} message Annotations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deprecated); + 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.displayOrder != null && Object.hasOwnProperty.call(message, "displayOrder")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.displayOrder); + if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.stringType); + if (message.stringValues != null && message.stringValues.length) + for (var i = 0; i < message.stringValues.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.stringValues[i]); + return writer; + }; + + /** + * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations} message Annotations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotations.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.displayOrder = reader.int32(); + break; + } + case 6: { + message.stringType = reader.string(); + break; + } + case 7: { + if (!(message.stringValues && message.stringValues.length)) + message.stringValues = []; + message.stringValues.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotations message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (!$util.isString(message.deprecated)) + return "deprecated: 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.displayOrder != null && message.hasOwnProperty("displayOrder")) + if (!$util.isInteger(message.displayOrder)) + return "displayOrder: integer expected"; + if (message.stringType != null && message.hasOwnProperty("stringType")) + if (!$util.isString(message.stringType)) + return "stringType: string expected"; + if (message.stringValues != null && message.hasOwnProperty("stringValues")) { + if (!Array.isArray(message.stringValues)) + return "stringValues: array expected"; + for (var i = 0; i < message.stringValues.length; ++i) + if (!$util.isString(message.stringValues[i])) + return "stringValues: string[] expected"; + } + return null; + }; + + /** + * Creates an Annotations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations + */ + Annotations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations(); + if (object.deprecated != null) + message.deprecated = String(object.deprecated); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.displayOrder != null) + message.displayOrder = object.displayOrder | 0; + if (object.stringType != null) + message.stringType = String(object.stringType); + if (object.stringValues) { + if (!Array.isArray(object.stringValues)) + throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.stringValues: array expected"); + message.stringValues = []; + for (var i = 0; i < object.stringValues.length; ++i) + message.stringValues[i] = String(object.stringValues[i]); + } + return message; + }; + + /** + * Creates a plain object from an Annotations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} message Annotations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stringValues = []; + if (options.defaults) { + object.deprecated = ""; + object.displayName = ""; + object.description = ""; + object.displayOrder = 0; + object.stringType = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayOrder != null && message.hasOwnProperty("displayOrder")) + object.displayOrder = message.displayOrder; + if (message.stringType != null && message.hasOwnProperty("stringType")) + object.stringType = message.stringType; + if (message.stringValues && message.stringValues.length) { + object.stringValues = []; + for (var j = 0; j < message.stringValues.length; ++j) + object.stringValues[j] = message.stringValues[j]; + } + return object; + }; + + /** + * Converts this Annotations to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @instance + * @returns {Object.} JSON object + */ + Annotations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotations + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"; + }; + + return Annotations; + })(); + + return MetadataTemplate; + })(); + + return AspectType; + })(); + + v1.EntryGroup = (function() { + + /** + * Properties of an EntryGroup. + * @memberof google.cloud.dataplex.v1 + * @interface IEntryGroup + * @property {string|null} [name] EntryGroup name + * @property {string|null} [uid] EntryGroup uid + * @property {google.protobuf.ITimestamp|null} [createTime] EntryGroup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] EntryGroup updateTime + * @property {string|null} [description] EntryGroup description + * @property {string|null} [displayName] EntryGroup displayName + * @property {Object.|null} [labels] EntryGroup labels + * @property {string|null} [etag] EntryGroup etag + * @property {google.cloud.dataplex.v1.TransferStatus|null} [transferStatus] EntryGroup transferStatus + */ + + /** + * Constructs a new EntryGroup. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an EntryGroup. + * @implements IEntryGroup + * @constructor + * @param {google.cloud.dataplex.v1.IEntryGroup=} [properties] Properties to set + */ + function EntryGroup(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]]; + } + + /** + * EntryGroup name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.name = ""; + + /** + * EntryGroup uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.uid = ""; + + /** + * EntryGroup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.createTime = null; + + /** + * EntryGroup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.updateTime = null; + + /** + * EntryGroup description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.description = ""; + + /** + * EntryGroup displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.displayName = ""; + + /** + * EntryGroup labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.labels = $util.emptyObject; + + /** + * EntryGroup etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.etag = ""; + + /** + * EntryGroup transferStatus. + * @member {google.cloud.dataplex.v1.TransferStatus} transferStatus + * @memberof google.cloud.dataplex.v1.EntryGroup + * @instance + */ + EntryGroup.prototype.transferStatus = 0; + + /** + * Creates a new EntryGroup instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntryGroup + * @static + * @param {google.cloud.dataplex.v1.IEntryGroup=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntryGroup} EntryGroup instance + */ + EntryGroup.create = function create(properties) { + return new EntryGroup(properties); + }; + + /** + * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.dataplex.v1.EntryGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntryGroup + * @static + * @param {google.cloud.dataplex.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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.transferStatus != null && Object.hasOwnProperty.call(message, "transferStatus")) + writer.uint32(/* id 202, wireType 0 =*/1616).int32(message.transferStatus); + return writer; + }; + + /** + * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntryGroup + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.EntryGroup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 202: { + message.transferStatus = reader.int32(); + 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.dataplex.v1.EntryGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) + switch (message.transferStatus) { + default: + return "transferStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntryGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntryGroup} EntryGroup + */ + EntryGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntryGroup) + return object; + var message = new $root.google.cloud.dataplex.v1.EntryGroup(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryGroup.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.dataplex.v1.EntryGroup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryGroup.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.etag != null) + message.etag = String(object.etag); + switch (object.transferStatus) { + default: + if (typeof object.transferStatus === "number") { + message.transferStatus = object.transferStatus; + break; + } + break; + case "TRANSFER_STATUS_UNSPECIFIED": + case 0: + message.transferStatus = 0; + break; + case "TRANSFER_STATUS_MIGRATED": + case 1: + message.transferStatus = 1; + break; + case "TRANSFER_STATUS_TRANSFERRED": + case 2: + message.transferStatus = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntryGroup + * @static + * @param {google.cloud.dataplex.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.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.etag = ""; + object.transferStatus = options.enums === String ? "TRANSFER_STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) + object.transferStatus = options.enums === String ? $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] === undefined ? message.transferStatus : $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] : message.transferStatus; + return object; + }; + + /** + * Converts this EntryGroup to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.EntryGroup"; + }; + + return EntryGroup; + })(); + + v1.EntryType = (function() { + + /** + * Properties of an EntryType. + * @memberof google.cloud.dataplex.v1 + * @interface IEntryType + * @property {string|null} [name] EntryType name + * @property {string|null} [uid] EntryType uid + * @property {google.protobuf.ITimestamp|null} [createTime] EntryType createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] EntryType updateTime + * @property {string|null} [description] EntryType description + * @property {string|null} [displayName] EntryType displayName + * @property {Object.|null} [labels] EntryType labels + * @property {string|null} [etag] EntryType etag + * @property {Array.|null} [typeAliases] EntryType typeAliases + * @property {string|null} [platform] EntryType platform + * @property {string|null} [system] EntryType system + * @property {Array.|null} [requiredAspects] EntryType requiredAspects + * @property {google.cloud.dataplex.v1.EntryType.IAuthorization|null} [authorization] EntryType authorization + */ + + /** + * Constructs a new EntryType. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an EntryType. + * @implements IEntryType + * @constructor + * @param {google.cloud.dataplex.v1.IEntryType=} [properties] Properties to set + */ + function EntryType(properties) { + this.labels = {}; + this.typeAliases = []; + this.requiredAspects = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntryType name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.name = ""; + + /** + * EntryType uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.uid = ""; + + /** + * EntryType createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.createTime = null; + + /** + * EntryType updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.updateTime = null; + + /** + * EntryType description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.description = ""; + + /** + * EntryType displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.displayName = ""; + + /** + * EntryType labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.labels = $util.emptyObject; + + /** + * EntryType etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.etag = ""; + + /** + * EntryType typeAliases. + * @member {Array.} typeAliases + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.typeAliases = $util.emptyArray; + + /** + * EntryType platform. + * @member {string} platform + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.platform = ""; + + /** + * EntryType system. + * @member {string} system + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.system = ""; + + /** + * EntryType requiredAspects. + * @member {Array.} requiredAspects + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.requiredAspects = $util.emptyArray; + + /** + * EntryType authorization. + * @member {google.cloud.dataplex.v1.EntryType.IAuthorization|null|undefined} authorization + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + */ + EntryType.prototype.authorization = null; + + /** + * Creates a new EntryType instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {google.cloud.dataplex.v1.IEntryType=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntryType} EntryType instance + */ + EntryType.create = function create(properties) { + return new EntryType(properties); + }; + + /** + * Encodes the specified EntryType message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {google.cloud.dataplex.v1.IEntryType} message EntryType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntryType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.typeAliases != null && message.typeAliases.length) + for (var i = 0; i < message.typeAliases.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.typeAliases[i]); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.platform); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.system); + if (message.requiredAspects != null && message.requiredAspects.length) + for (var i = 0; i < message.requiredAspects.length; ++i) + $root.google.cloud.dataplex.v1.EntryType.AspectInfo.encode(message.requiredAspects[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) + $root.google.cloud.dataplex.v1.EntryType.Authorization.encode(message.authorization, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntryType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {google.cloud.dataplex.v1.IEntryType} message EntryType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntryType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntryType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.EntryType} EntryType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntryType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 9: { + if (!(message.typeAliases && message.typeAliases.length)) + message.typeAliases = []; + message.typeAliases.push(reader.string()); + break; + } + case 10: { + message.platform = reader.string(); + break; + } + case 11: { + message.system = reader.string(); + break; + } + case 50: { + if (!(message.requiredAspects && message.requiredAspects.length)) + message.requiredAspects = []; + message.requiredAspects.push($root.google.cloud.dataplex.v1.EntryType.AspectInfo.decode(reader, reader.uint32())); + break; + } + case 51: { + message.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntryType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.EntryType} EntryType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntryType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntryType message. + * @function verify + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntryType.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.typeAliases != null && message.hasOwnProperty("typeAliases")) { + if (!Array.isArray(message.typeAliases)) + return "typeAliases: array expected"; + for (var i = 0; i < message.typeAliases.length; ++i) + if (!$util.isString(message.typeAliases[i])) + return "typeAliases: string[] expected"; + } + if (message.platform != null && message.hasOwnProperty("platform")) + if (!$util.isString(message.platform)) + return "platform: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + if (!$util.isString(message.system)) + return "system: string expected"; + if (message.requiredAspects != null && message.hasOwnProperty("requiredAspects")) { + if (!Array.isArray(message.requiredAspects)) + return "requiredAspects: array expected"; + for (var i = 0; i < message.requiredAspects.length; ++i) { + var error = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.verify(message.requiredAspects[i]); + if (error) + return "requiredAspects." + error; + } + } + if (message.authorization != null && message.hasOwnProperty("authorization")) { + var error = $root.google.cloud.dataplex.v1.EntryType.Authorization.verify(message.authorization); + if (error) + return "authorization." + error; + } + return null; + }; + + /** + * Creates an EntryType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntryType} EntryType + */ + EntryType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntryType) + return object; + var message = new $root.google.cloud.dataplex.v1.EntryType(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryType.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.dataplex.v1.EntryType.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryType.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.etag != null) + message.etag = String(object.etag); + if (object.typeAliases) { + if (!Array.isArray(object.typeAliases)) + throw TypeError(".google.cloud.dataplex.v1.EntryType.typeAliases: array expected"); + message.typeAliases = []; + for (var i = 0; i < object.typeAliases.length; ++i) + message.typeAliases[i] = String(object.typeAliases[i]); + } + if (object.platform != null) + message.platform = String(object.platform); + if (object.system != null) + message.system = String(object.system); + if (object.requiredAspects) { + if (!Array.isArray(object.requiredAspects)) + throw TypeError(".google.cloud.dataplex.v1.EntryType.requiredAspects: array expected"); + message.requiredAspects = []; + for (var i = 0; i < object.requiredAspects.length; ++i) { + if (typeof object.requiredAspects[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryType.requiredAspects: object expected"); + message.requiredAspects[i] = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.fromObject(object.requiredAspects[i]); + } + } + if (object.authorization != null) { + if (typeof object.authorization !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntryType.authorization: object expected"); + message.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.fromObject(object.authorization); + } + return message; + }; + + /** + * Creates a plain object from an EntryType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {google.cloud.dataplex.v1.EntryType} message EntryType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntryType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.typeAliases = []; + object.requiredAspects = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.etag = ""; + object.platform = ""; + object.system = ""; + object.authorization = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.typeAliases && message.typeAliases.length) { + object.typeAliases = []; + for (var j = 0; j < message.typeAliases.length; ++j) + object.typeAliases[j] = message.typeAliases[j]; + } + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = message.platform; + if (message.system != null && message.hasOwnProperty("system")) + object.system = message.system; + if (message.requiredAspects && message.requiredAspects.length) { + object.requiredAspects = []; + for (var j = 0; j < message.requiredAspects.length; ++j) + object.requiredAspects[j] = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.toObject(message.requiredAspects[j], options); + } + if (message.authorization != null && message.hasOwnProperty("authorization")) + object.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.toObject(message.authorization, options); + return object; + }; + + /** + * Converts this EntryType to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.EntryType + * @instance + * @returns {Object.} JSON object + */ + EntryType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntryType + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.EntryType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntryType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType"; + }; + + EntryType.AspectInfo = (function() { + + /** + * Properties of an AspectInfo. + * @memberof google.cloud.dataplex.v1.EntryType + * @interface IAspectInfo + * @property {string|null} [type] AspectInfo type + */ + + /** + * Constructs a new AspectInfo. + * @memberof google.cloud.dataplex.v1.EntryType + * @classdesc Represents an AspectInfo. + * @implements IAspectInfo + * @constructor + * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo=} [properties] Properties to set + */ + function AspectInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AspectInfo type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @instance + */ + AspectInfo.prototype.type = ""; + + /** + * Creates a new AspectInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo instance + */ + AspectInfo.create = function create(properties) { + return new AspectInfo(properties); + }; + + /** + * Encodes the specified AspectInfo message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo} message AspectInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectInfo.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 AspectInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo} message AspectInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AspectInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType.AspectInfo(); + 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 an AspectInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AspectInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AspectInfo.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 an AspectInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo + */ + AspectInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntryType.AspectInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.EntryType.AspectInfo(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an AspectInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {google.cloud.dataplex.v1.EntryType.AspectInfo} message AspectInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AspectInfo.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 AspectInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @instance + * @returns {Object.} JSON object + */ + AspectInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AspectInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AspectInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType.AspectInfo"; + }; + + return AspectInfo; + })(); + + EntryType.Authorization = (function() { + + /** + * Properties of an Authorization. + * @memberof google.cloud.dataplex.v1.EntryType + * @interface IAuthorization + * @property {string|null} [alternateUsePermission] Authorization alternateUsePermission + */ + + /** + * Constructs a new Authorization. + * @memberof google.cloud.dataplex.v1.EntryType + * @classdesc Represents an Authorization. + * @implements IAuthorization + * @constructor + * @param {google.cloud.dataplex.v1.EntryType.IAuthorization=} [properties] Properties to set + */ + function Authorization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Authorization alternateUsePermission. + * @member {string} alternateUsePermission + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @instance + */ + Authorization.prototype.alternateUsePermission = ""; + + /** + * Creates a new Authorization instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAuthorization=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization instance + */ + Authorization.create = function create(properties) { + return new Authorization(properties); + }; + + /** + * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAuthorization} message Authorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authorization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alternateUsePermission != null && Object.hasOwnProperty.call(message, "alternateUsePermission")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.alternateUsePermission); + return writer; + }; + + /** + * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {google.cloud.dataplex.v1.EntryType.IAuthorization} message Authorization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Authorization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Authorization message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authorization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType.Authorization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.alternateUsePermission = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Authorization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Authorization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Authorization message. + * @function verify + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Authorization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) + if (!$util.isString(message.alternateUsePermission)) + return "alternateUsePermission: string expected"; + return null; + }; + + /** + * Creates an Authorization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization + */ + Authorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntryType.Authorization) + return object; + var message = new $root.google.cloud.dataplex.v1.EntryType.Authorization(); + if (object.alternateUsePermission != null) + message.alternateUsePermission = String(object.alternateUsePermission); + return message; + }; + + /** + * Creates a plain object from an Authorization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {google.cloud.dataplex.v1.EntryType.Authorization} message Authorization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Authorization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.alternateUsePermission = ""; + if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) + object.alternateUsePermission = message.alternateUsePermission; + return object; + }; + + /** + * Converts this Authorization to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @instance + * @returns {Object.} JSON object + */ + Authorization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Authorization + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.EntryType.Authorization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Authorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType.Authorization"; + }; + + return Authorization; + })(); + + return EntryType; + })(); + + v1.Aspect = (function() { + + /** + * Properties of an Aspect. + * @memberof google.cloud.dataplex.v1 + * @interface IAspect + * @property {string|null} [aspectType] Aspect aspectType + * @property {string|null} [path] Aspect path + * @property {google.protobuf.ITimestamp|null} [createTime] Aspect createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Aspect updateTime + * @property {google.protobuf.IStruct|null} [data] Aspect data + * @property {google.cloud.dataplex.v1.IAspectSource|null} [aspectSource] Aspect aspectSource + */ + + /** + * Constructs a new Aspect. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Aspect. + * @implements IAspect + * @constructor + * @param {google.cloud.dataplex.v1.IAspect=} [properties] Properties to set + */ + function Aspect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aspect aspectType. + * @member {string} aspectType + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.aspectType = ""; + + /** + * Aspect path. + * @member {string} path + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.path = ""; + + /** + * Aspect createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.createTime = null; + + /** + * Aspect updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.updateTime = null; + + /** + * Aspect data. + * @member {google.protobuf.IStruct|null|undefined} data + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.data = null; + + /** + * Aspect aspectSource. + * @member {google.cloud.dataplex.v1.IAspectSource|null|undefined} aspectSource + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + */ + Aspect.prototype.aspectSource = null; + + /** + * Creates a new Aspect instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {google.cloud.dataplex.v1.IAspect=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Aspect} Aspect instance + */ + Aspect.create = function create(properties) { + return new Aspect(properties); + }; + + /** + * Encodes the specified Aspect message. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {google.cloud.dataplex.v1.IAspect} message Aspect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aspect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.aspectType); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aspectSource != null && Object.hasOwnProperty.call(message, "aspectSource")) + $root.google.cloud.dataplex.v1.AspectSource.encode(message.aspectSource, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Aspect message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {google.cloud.dataplex.v1.IAspect} message Aspect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aspect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aspect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Aspect} Aspect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aspect.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Aspect(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.aspectType = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 9: { + message.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aspect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Aspect} Aspect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aspect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aspect message. + * @function verify + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aspect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.aspectType != null && message.hasOwnProperty("aspectType")) + if (!$util.isString(message.aspectType)) + return "aspectType: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.google.protobuf.Struct.verify(message.data); + if (error) + return "data." + error; + } + if (message.aspectSource != null && message.hasOwnProperty("aspectSource")) { + var error = $root.google.cloud.dataplex.v1.AspectSource.verify(message.aspectSource); + if (error) + return "aspectSource." + error; + } + return null; + }; + + /** + * Creates an Aspect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Aspect} Aspect + */ + Aspect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Aspect) + return object; + var message = new $root.google.cloud.dataplex.v1.Aspect(); + if (object.aspectType != null) + message.aspectType = String(object.aspectType); + if (object.path != null) + message.path = String(object.path); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Aspect.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.dataplex.v1.Aspect.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.dataplex.v1.Aspect.data: object expected"); + message.data = $root.google.protobuf.Struct.fromObject(object.data); + } + if (object.aspectSource != null) { + if (typeof object.aspectSource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Aspect.aspectSource: object expected"); + message.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.fromObject(object.aspectSource); + } + return message; + }; + + /** + * Creates a plain object from an Aspect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {google.cloud.dataplex.v1.Aspect} message Aspect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aspect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.aspectType = ""; + object.path = ""; + object.createTime = null; + object.updateTime = null; + object.data = null; + object.aspectSource = null; + } + if (message.aspectType != null && message.hasOwnProperty("aspectType")) + object.aspectType = message.aspectType; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + 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.data != null && message.hasOwnProperty("data")) + object.data = $root.google.protobuf.Struct.toObject(message.data, options); + if (message.aspectSource != null && message.hasOwnProperty("aspectSource")) + object.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.toObject(message.aspectSource, options); + return object; + }; + + /** + * Converts this Aspect to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Aspect + * @instance + * @returns {Object.} JSON object + */ + Aspect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Aspect + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Aspect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aspect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Aspect"; + }; + + return Aspect; + })(); + + v1.AspectSource = (function() { + + /** + * Properties of an AspectSource. + * @memberof google.cloud.dataplex.v1 + * @interface IAspectSource + * @property {google.protobuf.ITimestamp|null} [createTime] AspectSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AspectSource updateTime + * @property {string|null} [dataVersion] AspectSource dataVersion + */ + + /** + * Constructs a new AspectSource. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an AspectSource. + * @implements IAspectSource + * @constructor + * @param {google.cloud.dataplex.v1.IAspectSource=} [properties] Properties to set + */ + function AspectSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AspectSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.AspectSource + * @instance + */ + AspectSource.prototype.createTime = null; + + /** + * AspectSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.AspectSource + * @instance + */ + AspectSource.prototype.updateTime = null; + + /** + * AspectSource dataVersion. + * @member {string} dataVersion + * @memberof google.cloud.dataplex.v1.AspectSource + * @instance + */ + AspectSource.prototype.dataVersion = ""; + + /** + * Creates a new AspectSource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {google.cloud.dataplex.v1.IAspectSource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource instance + */ + AspectSource.create = function create(properties) { + return new AspectSource(properties); + }; + + /** + * Encodes the specified AspectSource message. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {google.cloud.dataplex.v1.IAspectSource} message AspectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectSource.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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.dataVersion != null && Object.hasOwnProperty.call(message, "dataVersion")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataVersion); + return writer; + }; + + /** + * Encodes the specified AspectSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {google.cloud.dataplex.v1.IAspectSource} message AspectSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AspectSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AspectSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.dataVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AspectSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AspectSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AspectSource message. + * @function verify + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AspectSource.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.dataVersion != null && message.hasOwnProperty("dataVersion")) + if (!$util.isString(message.dataVersion)) + return "dataVersion: string expected"; + return null; + }; + + /** + * Creates an AspectSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource + */ + AspectSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.AspectSource) + return object; + var message = new $root.google.cloud.dataplex.v1.AspectSource(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.AspectSource.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.dataplex.v1.AspectSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.dataVersion != null) + message.dataVersion = String(object.dataVersion); + return message; + }; + + /** + * Creates a plain object from an AspectSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {google.cloud.dataplex.v1.AspectSource} message AspectSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AspectSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + object.dataVersion = ""; + } + 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.dataVersion != null && message.hasOwnProperty("dataVersion")) + object.dataVersion = message.dataVersion; + return object; + }; + + /** + * Converts this AspectSource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.AspectSource + * @instance + * @returns {Object.} JSON object + */ + AspectSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AspectSource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.AspectSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AspectSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectSource"; + }; + + return AspectSource; + })(); + + v1.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.dataplex.v1 + * @interface IEntry + * @property {string|null} [name] Entry name + * @property {string|null} [entryType] Entry entryType + * @property {google.protobuf.ITimestamp|null} [createTime] Entry createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entry updateTime + * @property {Object.|null} [aspects] Entry aspects + * @property {string|null} [parentEntry] Entry parentEntry + * @property {string|null} [fullyQualifiedName] Entry fullyQualifiedName + * @property {google.cloud.dataplex.v1.IEntrySource|null} [entrySource] Entry entrySource + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.dataplex.v1.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + this.aspects = {}; + if (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.dataplex.v1.Entry + * @instance + */ + Entry.prototype.name = ""; + + /** + * Entry entryType. + * @member {string} entryType + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.entryType = ""; + + /** + * Entry createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.createTime = null; + + /** + * Entry updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.updateTime = null; + + /** + * Entry aspects. + * @member {Object.} aspects + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.aspects = $util.emptyObject; + + /** + * Entry parentEntry. + * @member {string} parentEntry + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.parentEntry = ""; + + /** + * Entry fullyQualifiedName. + * @member {string} fullyQualifiedName + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.fullyQualifiedName = ""; + + /** + * Entry entrySource. + * @member {google.cloud.dataplex.v1.IEntrySource|null|undefined} entrySource + * @memberof google.cloud.dataplex.v1.Entry + * @instance + */ + Entry.prototype.entrySource = null; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entry + * @static + * @param {google.cloud.dataplex.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dataplex.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entry + * @static + * @param {google.cloud.dataplex.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.entryType != null && Object.hasOwnProperty.call(message, "entryType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.entryType); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.aspects != null && Object.hasOwnProperty.call(message, "aspects")) + for (var keys = Object.keys(message.aspects), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dataplex.v1.Aspect.encode(message.aspects[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.parentEntry != null && Object.hasOwnProperty.call(message, "parentEntry")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.parentEntry); + if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.fullyQualifiedName); + if (message.entrySource != null && Object.hasOwnProperty.call(message, "entrySource")) + $root.google.cloud.dataplex.v1.EntrySource.encode(message.entrySource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entry + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.Entry(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.entryType = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.aspects === $util.emptyObject) + message.aspects = {}; + 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.dataplex.v1.Aspect.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.aspects[key] = value; + break; + } + case 10: { + message.parentEntry = reader.string(); + break; + } + case 12: { + message.fullyQualifiedName = reader.string(); + break; + } + case 15: { + message.entrySource = $root.google.cloud.dataplex.v1.EntrySource.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.dataplex.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.entryType != null && message.hasOwnProperty("entryType")) + if (!$util.isString(message.entryType)) + return "entryType: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.aspects != null && message.hasOwnProperty("aspects")) { + if (!$util.isObject(message.aspects)) + return "aspects: object expected"; + var key = Object.keys(message.aspects); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Aspect.verify(message.aspects[key[i]]); + if (error) + return "aspects." + error; + } + } + if (message.parentEntry != null && message.hasOwnProperty("parentEntry")) + if (!$util.isString(message.parentEntry)) + return "parentEntry: string expected"; + if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) + if (!$util.isString(message.fullyQualifiedName)) + return "fullyQualifiedName: string expected"; + if (message.entrySource != null && message.hasOwnProperty("entrySource")) { + var error = $root.google.cloud.dataplex.v1.EntrySource.verify(message.entrySource); + if (error) + return "entrySource." + error; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entry) + return object; + var message = new $root.google.cloud.dataplex.v1.Entry(); + if (object.name != null) + message.name = String(object.name); + if (object.entryType != null) + message.entryType = String(object.entryType); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entry.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.dataplex.v1.Entry.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.aspects) { + if (typeof object.aspects !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entry.aspects: object expected"); + message.aspects = {}; + for (var keys = Object.keys(object.aspects), i = 0; i < keys.length; ++i) { + if (typeof object.aspects[keys[i]] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entry.aspects: object expected"); + message.aspects[keys[i]] = $root.google.cloud.dataplex.v1.Aspect.fromObject(object.aspects[keys[i]]); + } + } + if (object.parentEntry != null) + message.parentEntry = String(object.parentEntry); + if (object.fullyQualifiedName != null) + message.fullyQualifiedName = String(object.fullyQualifiedName); + if (object.entrySource != null) { + if (typeof object.entrySource !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entry.entrySource: object expected"); + message.entrySource = $root.google.cloud.dataplex.v1.EntrySource.fromObject(object.entrySource); + } + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entry + * @static + * @param {google.cloud.dataplex.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.aspects = {}; + if (options.defaults) { + object.name = ""; + object.entryType = ""; + object.createTime = null; + object.updateTime = null; + object.parentEntry = ""; + object.fullyQualifiedName = ""; + object.entrySource = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.entryType != null && message.hasOwnProperty("entryType")) + object.entryType = message.entryType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.aspects && (keys2 = Object.keys(message.aspects)).length) { + object.aspects = {}; + for (var j = 0; j < keys2.length; ++j) + object.aspects[keys2[j]] = $root.google.cloud.dataplex.v1.Aspect.toObject(message.aspects[keys2[j]], options); + } + if (message.parentEntry != null && message.hasOwnProperty("parentEntry")) + object.parentEntry = message.parentEntry; + if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) + object.fullyQualifiedName = message.fullyQualifiedName; + if (message.entrySource != null && message.hasOwnProperty("entrySource")) + object.entrySource = $root.google.cloud.dataplex.v1.EntrySource.toObject(message.entrySource, options); + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.Entry"; + }; + + return Entry; + })(); + + v1.EntrySource = (function() { + + /** + * Properties of an EntrySource. + * @memberof google.cloud.dataplex.v1 + * @interface IEntrySource + * @property {string|null} [resource] EntrySource resource + * @property {string|null} [system] EntrySource system + * @property {string|null} [platform] EntrySource platform + * @property {string|null} [displayName] EntrySource displayName + * @property {string|null} [description] EntrySource description + * @property {Object.|null} [labels] EntrySource labels + * @property {Array.|null} [ancestors] EntrySource ancestors + * @property {google.protobuf.ITimestamp|null} [createTime] EntrySource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] EntrySource updateTime + * @property {string|null} [location] EntrySource location + */ + + /** + * Constructs a new EntrySource. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an EntrySource. + * @implements IEntrySource + * @constructor + * @param {google.cloud.dataplex.v1.IEntrySource=} [properties] Properties to set + */ + function EntrySource(properties) { + this.labels = {}; + this.ancestors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntrySource resource. + * @member {string} resource + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.resource = ""; + + /** + * EntrySource system. + * @member {string} system + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.system = ""; + + /** + * EntrySource platform. + * @member {string} platform + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.platform = ""; + + /** + * EntrySource displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.displayName = ""; + + /** + * EntrySource description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.description = ""; + + /** + * EntrySource labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.labels = $util.emptyObject; + + /** + * EntrySource ancestors. + * @member {Array.} ancestors + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.ancestors = $util.emptyArray; + + /** + * EntrySource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.createTime = null; + + /** + * EntrySource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.updateTime = null; + + /** + * EntrySource location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + */ + EntrySource.prototype.location = ""; + + /** + * Creates a new EntrySource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {google.cloud.dataplex.v1.IEntrySource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource instance + */ + EntrySource.create = function create(properties) { + return new EntrySource(properties); + }; + + /** + * Encodes the specified EntrySource message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {google.cloud.dataplex.v1.IEntrySource} message EntrySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntrySource.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.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.system); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.platform); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.ancestors != null && message.ancestors.length) + for (var i = 0; i < message.ancestors.length; ++i) + $root.google.cloud.dataplex.v1.EntrySource.Ancestor.encode(message.ancestors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.location); + return writer; + }; + + /** + * Encodes the specified EntrySource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {google.cloud.dataplex.v1.IEntrySource} message EntrySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntrySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntrySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntrySource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntrySource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.system = reader.string(); + break; + } + case 3: { + message.platform = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 9: { + if (!(message.ancestors && message.ancestors.length)) + message.ancestors = []; + message.ancestors.push($root.google.cloud.dataplex.v1.EntrySource.Ancestor.decode(reader, reader.uint32())); + break; + } + case 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntrySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntrySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntrySource message. + * @function verify + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntrySource.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.system != null && message.hasOwnProperty("system")) + if (!$util.isString(message.system)) + return "system: string expected"; + if (message.platform != null && message.hasOwnProperty("platform")) + if (!$util.isString(message.platform)) + return "platform: 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.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.ancestors != null && message.hasOwnProperty("ancestors")) { + if (!Array.isArray(message.ancestors)) + return "ancestors: array expected"; + for (var i = 0; i < message.ancestors.length; ++i) { + var error = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.verify(message.ancestors[i]); + if (error) + return "ancestors." + error; + } + } + 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.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an EntrySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource + */ + EntrySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntrySource) + return object; + var message = new $root.google.cloud.dataplex.v1.EntrySource(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.system != null) + message.system = String(object.system); + if (object.platform != null) + message.platform = String(object.platform); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntrySource.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.ancestors) { + if (!Array.isArray(object.ancestors)) + throw TypeError(".google.cloud.dataplex.v1.EntrySource.ancestors: array expected"); + message.ancestors = []; + for (var i = 0; i < object.ancestors.length; ++i) { + if (typeof object.ancestors[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntrySource.ancestors: object expected"); + message.ancestors[i] = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.fromObject(object.ancestors[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.EntrySource.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.dataplex.v1.EntrySource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an EntrySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {google.cloud.dataplex.v1.EntrySource} message EntrySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntrySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ancestors = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.resource = ""; + object.system = ""; + object.platform = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.location = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.system != null && message.hasOwnProperty("system")) + object.system = message.system; + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = message.platform; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.ancestors && message.ancestors.length) { + object.ancestors = []; + for (var j = 0; j < message.ancestors.length; ++j) + object.ancestors[j] = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.toObject(message.ancestors[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this EntrySource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.EntrySource + * @instance + * @returns {Object.} JSON object + */ + EntrySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntrySource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.EntrySource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntrySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.EntrySource"; + }; + + EntrySource.Ancestor = (function() { + + /** + * Properties of an Ancestor. + * @memberof google.cloud.dataplex.v1.EntrySource + * @interface IAncestor + * @property {string|null} [name] Ancestor name + * @property {string|null} [type] Ancestor type + */ + + /** + * Constructs a new Ancestor. + * @memberof google.cloud.dataplex.v1.EntrySource + * @classdesc Represents an Ancestor. + * @implements IAncestor + * @constructor + * @param {google.cloud.dataplex.v1.EntrySource.IAncestor=} [properties] Properties to set + */ + function Ancestor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Ancestor name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @instance + */ + Ancestor.prototype.name = ""; + + /** + * Ancestor type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @instance + */ + Ancestor.prototype.type = ""; + + /** + * Creates a new Ancestor instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {google.cloud.dataplex.v1.EntrySource.IAncestor=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor instance + */ + Ancestor.create = function create(properties) { + return new Ancestor(properties); + }; + + /** + * Encodes the specified Ancestor message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {google.cloud.dataplex.v1.EntrySource.IAncestor} message Ancestor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Ancestor.encode = function encode(message, writer) { + if (!writer) + 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 2 =*/18).string(message.type); + return writer; + }; + + /** + * Encodes the specified Ancestor message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {google.cloud.dataplex.v1.EntrySource.IAncestor} message Ancestor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Ancestor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Ancestor message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Ancestor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntrySource.Ancestor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Ancestor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Ancestor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Ancestor message. + * @function verify + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Ancestor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates an Ancestor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor + */ + Ancestor.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.EntrySource.Ancestor) + return object; + var message = new $root.google.cloud.dataplex.v1.EntrySource.Ancestor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an Ancestor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {google.cloud.dataplex.v1.EntrySource.Ancestor} message Ancestor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Ancestor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this Ancestor to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @instance + * @returns {Object.} JSON object + */ + Ancestor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Ancestor + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Ancestor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.EntrySource.Ancestor"; + }; + + return Ancestor; + })(); + + return EntrySource; + })(); + + v1.CreateEntryGroupRequest = (function() { + + /** + * Properties of a CreateEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEntryGroupRequest + * @property {string|null} [parent] CreateEntryGroupRequest parent + * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId + * @property {google.cloud.dataplex.v1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup + * @property {boolean|null} [validateOnly] CreateEntryGroupRequest validateOnly + */ + + /** + * Constructs a new CreateEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEntryGroupRequest. + * @implements ICreateEntryGroupRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.parent = ""; + + /** + * CreateEntryGroupRequest entryGroupId. + * @member {string} entryGroupId + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.entryGroupId = ""; + + /** + * CreateEntryGroupRequest entryGroup. + * @member {google.cloud.dataplex.v1.IEntryGroup|null|undefined} entryGroup + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.entryGroup = null; + + /** + * CreateEntryGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @instance + */ + CreateEntryGroupRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntryGroupRequest} CreateEntryGroupRequest instance + */ + CreateEntryGroupRequest.create = function create(properties) { + return new CreateEntryGroupRequest(properties); + }; + + /** + * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.entryGroupId != null && Object.hasOwnProperty.call(message, "entryGroupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryGroupId); + if (message.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) + $root.google.cloud.dataplex.v1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entryGroupId = reader.string(); + break; + } + case 3: { + message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + 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.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.v1.EntryGroup.verify(message.entryGroup); + if (error) + return "entryGroup." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEntryGroupRequest} CreateEntryGroupRequest + */ + CreateEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryGroupRequest) + return object; + var message = new $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryGroupRequest.entryGroup: object expected"); + message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroup); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.entryGroupId = ""; + object.entryGroup = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) + object.entryGroupId = message.entryGroupId; + if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) + object.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.toObject(message.entryGroup, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.CreateEntryGroupRequest"; + }; + + return CreateEntryGroupRequest; + })(); + + v1.UpdateEntryGroupRequest = (function() { + + /** + * Properties of an UpdateEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEntryGroupRequest + * @property {google.cloud.dataplex.v1.IEntryGroup|null} [entryGroup] UpdateEntryGroupRequest entryGroup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryGroupRequest updateMask + * @property {boolean|null} [validateOnly] UpdateEntryGroupRequest validateOnly + */ + + /** + * Constructs a new UpdateEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEntryGroupRequest. + * @implements IUpdateEntryGroupRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.IEntryGroup|null|undefined} entryGroup + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @instance + */ + UpdateEntryGroupRequest.prototype.entryGroup = null; + + /** + * UpdateEntryGroupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @instance + */ + UpdateEntryGroupRequest.prototype.updateMask = null; + + /** + * UpdateEntryGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @instance + */ + UpdateEntryGroupRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest instance + */ + UpdateEntryGroupRequest.create = function create(properties) { + return new UpdateEntryGroupRequest(properties); + }; + + /** + * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + 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.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest + */ + UpdateEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest(); + if (object.entryGroup != null) { + if (typeof object.entryGroup !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryGroupRequest.entryGroup: object expected"); + message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroup); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryGroupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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; + object.validateOnly = false; + } + if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) + object.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.toObject(message.entryGroup, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryGroupRequest"; + }; + + return UpdateEntryGroupRequest; + })(); + + v1.DeleteEntryGroupRequest = (function() { + + /** + * Properties of a DeleteEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEntryGroupRequest + * @property {string|null} [name] DeleteEntryGroupRequest name + * @property {string|null} [etag] DeleteEntryGroupRequest etag + */ + + /** + * Constructs a new DeleteEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEntryGroupRequest. + * @implements IDeleteEntryGroupRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryGroupRequest + * @instance + */ + DeleteEntryGroupRequest.prototype.name = ""; + + /** + * DeleteEntryGroupRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @instance + */ + DeleteEntryGroupRequest.prototype.etag = ""; + + /** + * Creates a new DeleteEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance + */ + DeleteEntryGroupRequest.create = function create(properties) { + return new DeleteEntryGroupRequest(properties); + }; + + /** + * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + 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.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest + */ + DeleteEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryGroupRequest"; + }; + + return DeleteEntryGroupRequest; + })(); + + v1.ListEntryGroupsRequest = (function() { + + /** + * Properties of a ListEntryGroupsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntryGroupsRequest + * @property {string|null} [parent] ListEntryGroupsRequest parent + * @property {number|null} [pageSize] ListEntryGroupsRequest pageSize + * @property {string|null} [pageToken] ListEntryGroupsRequest pageToken + * @property {string|null} [filter] ListEntryGroupsRequest filter + * @property {string|null} [orderBy] ListEntryGroupsRequest orderBy + */ + + /** + * Constructs a new ListEntryGroupsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntryGroupsRequest. + * @implements IListEntryGroupsRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.ListEntryGroupsRequest + * @instance + */ + ListEntryGroupsRequest.prototype.parent = ""; + + /** + * ListEntryGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @instance + */ + ListEntryGroupsRequest.prototype.pageSize = 0; + + /** + * ListEntryGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @instance + */ + ListEntryGroupsRequest.prototype.pageToken = ""; + + /** + * ListEntryGroupsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @instance + */ + ListEntryGroupsRequest.prototype.filter = ""; + + /** + * ListEntryGroupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @instance + */ + ListEntryGroupsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListEntryGroupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntryGroupsRequest} ListEntryGroupsRequest instance + */ + ListEntryGroupsRequest.create = function create(properties) { + return new ListEntryGroupsRequest(properties); + }; + + /** + * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {google.cloud.dataplex.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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = 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.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntryGroupsRequest} ListEntryGroupsRequest + */ + ListEntryGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntryGroupsRequest) + return object; + var message = new $root.google.cloud.dataplex.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); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListEntryGroupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest + * @static + * @param {google.cloud.dataplex.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 = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListEntryGroupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntryGroupsRequest"; + }; + + return ListEntryGroupsRequest; + })(); + + v1.ListEntryGroupsResponse = (function() { + + /** + * Properties of a ListEntryGroupsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntryGroupsResponse + * @property {Array.|null} [entryGroups] ListEntryGroupsResponse entryGroups + * @property {string|null} [nextPageToken] ListEntryGroupsResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListEntryGroupsResponse unreachableLocations + */ + + /** + * Constructs a new ListEntryGroupsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntryGroupsResponse. + * @implements IListEntryGroupsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntryGroupsResponse=} [properties] Properties to set + */ + function ListEntryGroupsResponse(properties) { + this.entryGroups = []; + this.unreachableLocations = []; + if (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.dataplex.v1.ListEntryGroupsResponse + * @instance + */ + ListEntryGroupsResponse.prototype.entryGroups = $util.emptyArray; + + /** + * ListEntryGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @instance + */ + ListEntryGroupsResponse.prototype.nextPageToken = ""; + + /** + * ListEntryGroupsResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @instance + */ + ListEntryGroupsResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListEntryGroupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntryGroupsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntryGroupsResponse} ListEntryGroupsResponse instance + */ + ListEntryGroupsResponse.create = function create(properties) { + return new ListEntryGroupsResponse(properties); + }; + + /** + * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {google.cloud.dataplex.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.dataplex.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); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.EntryGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(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.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: 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.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntryGroupsResponse} ListEntryGroupsResponse + */ + ListEntryGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntryGroupsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntryGroupsResponse(); + if (object.entryGroups) { + if (!Array.isArray(object.entryGroups)) + throw TypeError(".google.cloud.dataplex.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.dataplex.v1.ListEntryGroupsResponse.entryGroups: object expected"); + message.entryGroups[i] = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListEntryGroupsResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse + * @static + * @param {google.cloud.dataplex.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 = []; + object.unreachableLocations = []; + } + 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.dataplex.v1.EntryGroup.toObject(message.entryGroups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListEntryGroupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntryGroupsResponse"; + }; + + return ListEntryGroupsResponse; + })(); + + v1.GetEntryGroupRequest = (function() { + + /** + * Properties of a GetEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntryGroupRequest + * @property {string|null} [name] GetEntryGroupRequest name + */ + + /** + * Constructs a new GetEntryGroupRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntryGroupRequest. + * @implements IGetEntryGroupRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.GetEntryGroupRequest + * @instance + */ + GetEntryGroupRequest.prototype.name = ""; + + /** + * Creates a new GetEntryGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntryGroupRequest} GetEntryGroupRequest instance + */ + GetEntryGroupRequest.create = function create(properties) { + return new GetEntryGroupRequest(properties); + }; + + /** + * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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); + return writer; + }; + + /** + * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.GetEntryGroupRequest(); + 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 GetEntryGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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"; + return null; + }; + + /** + * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntryGroupRequest} GetEntryGroupRequest + */ + GetEntryGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntryGroupRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntryGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest + * @static + * @param {google.cloud.dataplex.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 = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetEntryGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.GetEntryGroupRequest"; + }; + + return GetEntryGroupRequest; + })(); + + v1.CreateEntryTypeRequest = (function() { + + /** + * Properties of a CreateEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEntryTypeRequest + * @property {string|null} [parent] CreateEntryTypeRequest parent + * @property {string|null} [entryTypeId] CreateEntryTypeRequest entryTypeId + * @property {google.cloud.dataplex.v1.IEntryType|null} [entryType] CreateEntryTypeRequest entryType + * @property {boolean|null} [validateOnly] CreateEntryTypeRequest validateOnly + */ + + /** + * Constructs a new CreateEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEntryTypeRequest. + * @implements ICreateEntryTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest=} [properties] Properties to set + */ + function CreateEntryTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEntryTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @instance + */ + CreateEntryTypeRequest.prototype.parent = ""; + + /** + * CreateEntryTypeRequest entryTypeId. + * @member {string} entryTypeId + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @instance + */ + CreateEntryTypeRequest.prototype.entryTypeId = ""; + + /** + * CreateEntryTypeRequest entryType. + * @member {google.cloud.dataplex.v1.IEntryType|null|undefined} entryType + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @instance + */ + CreateEntryTypeRequest.prototype.entryType = null; + + /** + * CreateEntryTypeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @instance + */ + CreateEntryTypeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEntryTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest instance + */ + CreateEntryTypeRequest.create = function create(properties) { + return new CreateEntryTypeRequest(properties); + }; + + /** + * Encodes the specified CreateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} message CreateEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryTypeRequest.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.entryTypeId != null && Object.hasOwnProperty.call(message, "entryTypeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryTypeId); + if (message.entryType != null && Object.hasOwnProperty.call(message, "entryType")) + $root.google.cloud.dataplex.v1.EntryType.encode(message.entryType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} message CreateEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntryTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntryTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entryTypeId = reader.string(); + break; + } + case 3: { + message.entryType = $root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEntryTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntryTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntryTypeRequest.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.entryTypeId != null && message.hasOwnProperty("entryTypeId")) + if (!$util.isString(message.entryTypeId)) + return "entryTypeId: string expected"; + if (message.entryType != null && message.hasOwnProperty("entryType")) { + var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryType); + if (error) + return "entryType." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest + */ + CreateEntryTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateEntryTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entryTypeId != null) + message.entryTypeId = String(object.entryTypeId); + if (object.entryType != null) { + if (typeof object.entryType !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEntryTypeRequest.entryType: object expected"); + message.entryType = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryType); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEntryTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEntryTypeRequest} message CreateEntryTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntryTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entryTypeId = ""; + object.entryType = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entryTypeId != null && message.hasOwnProperty("entryTypeId")) + object.entryTypeId = message.entryTypeId; + if (message.entryType != null && message.hasOwnProperty("entryType")) + object.entryType = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryType, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEntryTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntryTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEntryTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntryTypeRequest"; + }; + + return CreateEntryTypeRequest; + })(); + + v1.UpdateEntryTypeRequest = (function() { + + /** + * Properties of an UpdateEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEntryTypeRequest + * @property {google.cloud.dataplex.v1.IEntryType|null} [entryType] UpdateEntryTypeRequest entryType + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryTypeRequest updateMask + * @property {boolean|null} [validateOnly] UpdateEntryTypeRequest validateOnly + */ + + /** + * Constructs a new UpdateEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEntryTypeRequest. + * @implements IUpdateEntryTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest=} [properties] Properties to set + */ + function UpdateEntryTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEntryTypeRequest entryType. + * @member {google.cloud.dataplex.v1.IEntryType|null|undefined} entryType + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @instance + */ + UpdateEntryTypeRequest.prototype.entryType = null; + + /** + * UpdateEntryTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @instance + */ + UpdateEntryTypeRequest.prototype.updateMask = null; + + /** + * UpdateEntryTypeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @instance + */ + UpdateEntryTypeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEntryTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest instance + */ + UpdateEntryTypeRequest.create = function create(properties) { + return new UpdateEntryTypeRequest(properties); + }; + + /** + * Encodes the specified UpdateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} message UpdateEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntryTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entryType != null && Object.hasOwnProperty.call(message, "entryType")) + $root.google.cloud.dataplex.v1.EntryType.encode(message.entryType, 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(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} message UpdateEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntryTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entryType = $root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEntryTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEntryTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entryType != null && message.hasOwnProperty("entryType")) { + var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryType); + if (error) + return "entryType." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest + */ + UpdateEntryTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest(); + if (object.entryType != null) { + if (typeof object.entryType !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryTypeRequest.entryType: object expected"); + message.entryType = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryType); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEntryTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEntryTypeRequest} message UpdateEntryTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEntryTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entryType = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.entryType != null && message.hasOwnProperty("entryType")) + object.entryType = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryType, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEntryTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEntryTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEntryTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntryTypeRequest"; + }; + + return UpdateEntryTypeRequest; + })(); + + v1.DeleteEntryTypeRequest = (function() { + + /** + * Properties of a DeleteEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEntryTypeRequest + * @property {string|null} [name] DeleteEntryTypeRequest name + * @property {string|null} [etag] DeleteEntryTypeRequest etag + */ + + /** + * Constructs a new DeleteEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEntryTypeRequest. + * @implements IDeleteEntryTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest=} [properties] Properties to set + */ + function DeleteEntryTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEntryTypeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @instance + */ + DeleteEntryTypeRequest.prototype.name = ""; + + /** + * DeleteEntryTypeRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @instance + */ + DeleteEntryTypeRequest.prototype.etag = ""; + + /** + * Creates a new DeleteEntryTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest instance + */ + DeleteEntryTypeRequest.create = function create(properties) { + return new DeleteEntryTypeRequest(properties); + }; + + /** + * Encodes the specified DeleteEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} message DeleteEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} message DeleteEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntryTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEntryTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEntryTypeRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest + */ + DeleteEntryTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteEntryTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEntryTypeRequest} message DeleteEntryTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEntryTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteEntryTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEntryTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEntryTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntryTypeRequest"; + }; + + return DeleteEntryTypeRequest; + })(); + + v1.ListEntryTypesRequest = (function() { + + /** + * Properties of a ListEntryTypesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntryTypesRequest + * @property {string|null} [parent] ListEntryTypesRequest parent + * @property {number|null} [pageSize] ListEntryTypesRequest pageSize + * @property {string|null} [pageToken] ListEntryTypesRequest pageToken + * @property {string|null} [filter] ListEntryTypesRequest filter + * @property {string|null} [orderBy] ListEntryTypesRequest orderBy + */ + + /** + * Constructs a new ListEntryTypesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntryTypesRequest. + * @implements IListEntryTypesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest=} [properties] Properties to set + */ + function ListEntryTypesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntryTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + */ + ListEntryTypesRequest.prototype.parent = ""; + + /** + * ListEntryTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + */ + ListEntryTypesRequest.prototype.pageSize = 0; + + /** + * ListEntryTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + */ + ListEntryTypesRequest.prototype.pageToken = ""; + + /** + * ListEntryTypesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + */ + ListEntryTypesRequest.prototype.filter = ""; + + /** + * ListEntryTypesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + */ + ListEntryTypesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListEntryTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest instance + */ + ListEntryTypesRequest.create = function create(properties) { + return new ListEntryTypesRequest(properties); + }; + + /** + * Encodes the specified ListEntryTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} message ListEntryTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntryTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListEntryTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} message ListEntryTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntryTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntryTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntryTypesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntryTypesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntryTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntryTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntryTypesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntryTypesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListEntryTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest + */ + ListEntryTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntryTypesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntryTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListEntryTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {google.cloud.dataplex.v1.ListEntryTypesRequest} message ListEntryTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntryTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListEntryTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntryTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntryTypesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntryTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntryTypesRequest"; + }; + + return ListEntryTypesRequest; + })(); + + v1.ListEntryTypesResponse = (function() { + + /** + * Properties of a ListEntryTypesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntryTypesResponse + * @property {Array.|null} [entryTypes] ListEntryTypesResponse entryTypes + * @property {string|null} [nextPageToken] ListEntryTypesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListEntryTypesResponse unreachableLocations + */ + + /** + * Constructs a new ListEntryTypesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntryTypesResponse. + * @implements IListEntryTypesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntryTypesResponse=} [properties] Properties to set + */ + function ListEntryTypesResponse(properties) { + this.entryTypes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntryTypesResponse entryTypes. + * @member {Array.} entryTypes + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @instance + */ + ListEntryTypesResponse.prototype.entryTypes = $util.emptyArray; + + /** + * ListEntryTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @instance + */ + ListEntryTypesResponse.prototype.nextPageToken = ""; + + /** + * ListEntryTypesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @instance + */ + ListEntryTypesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListEntryTypesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse instance + */ + ListEntryTypesResponse.create = function create(properties) { + return new ListEntryTypesResponse(properties); + }; + + /** + * Encodes the specified ListEntryTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesResponse} message ListEntryTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntryTypesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entryTypes != null && message.entryTypes.length) + for (var i = 0; i < message.entryTypes.length; ++i) + $root.google.cloud.dataplex.v1.EntryType.encode(message.entryTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListEntryTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntryTypesResponse} message ListEntryTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntryTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntryTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntryTypesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntryTypesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.entryTypes && message.entryTypes.length)) + message.entryTypes = []; + message.entryTypes.push($root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntryTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntryTypesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntryTypesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntryTypesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entryTypes != null && message.hasOwnProperty("entryTypes")) { + if (!Array.isArray(message.entryTypes)) + return "entryTypes: array expected"; + for (var i = 0; i < message.entryTypes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryTypes[i]); + if (error) + return "entryTypes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListEntryTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse + */ + ListEntryTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntryTypesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntryTypesResponse(); + if (object.entryTypes) { + if (!Array.isArray(object.entryTypes)) + throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.entryTypes: array expected"); + message.entryTypes = []; + for (var i = 0; i < object.entryTypes.length; ++i) { + if (typeof object.entryTypes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.entryTypes: object expected"); + message.entryTypes[i] = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryTypes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListEntryTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {google.cloud.dataplex.v1.ListEntryTypesResponse} message ListEntryTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntryTypesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.entryTypes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.entryTypes && message.entryTypes.length) { + object.entryTypes = []; + for (var j = 0; j < message.entryTypes.length; ++j) + object.entryTypes[j] = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListEntryTypesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntryTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntryTypesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntryTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntryTypesResponse"; + }; + + return ListEntryTypesResponse; + })(); + + v1.GetEntryTypeRequest = (function() { + + /** + * Properties of a GetEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntryTypeRequest + * @property {string|null} [name] GetEntryTypeRequest name + */ + + /** + * Constructs a new GetEntryTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntryTypeRequest. + * @implements IGetEntryTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest=} [properties] Properties to set + */ + function GetEntryTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntryTypeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @instance + */ + GetEntryTypeRequest.prototype.name = ""; + + /** + * Creates a new GetEntryTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest instance + */ + GetEntryTypeRequest.create = function create(properties) { + return new GetEntryTypeRequest(properties); + }; + + /** + * Encodes the specified GetEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} message GetEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntryTypeRequest.encode = function encode(message, writer) { + 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 GetEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} message GetEntryTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntryTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntryTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntryTypeRequest(); + 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 GetEntryTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntryTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntryTypeRequest.verify = function verify(message) { + if (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 GetEntryTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest + */ + GetEntryTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntryTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntryTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEntryTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {google.cloud.dataplex.v1.GetEntryTypeRequest} message GetEntryTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntryTypeRequest.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 GetEntryTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntryTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEntryTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntryTypeRequest"; + }; + + return GetEntryTypeRequest; + })(); + + v1.CreateAspectTypeRequest = (function() { + + /** + * Properties of a CreateAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateAspectTypeRequest + * @property {string|null} [parent] CreateAspectTypeRequest parent + * @property {string|null} [aspectTypeId] CreateAspectTypeRequest aspectTypeId + * @property {google.cloud.dataplex.v1.IAspectType|null} [aspectType] CreateAspectTypeRequest aspectType + * @property {boolean|null} [validateOnly] CreateAspectTypeRequest validateOnly + */ + + /** + * Constructs a new CreateAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateAspectTypeRequest. + * @implements ICreateAspectTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest=} [properties] Properties to set + */ + function CreateAspectTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAspectTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @instance + */ + CreateAspectTypeRequest.prototype.parent = ""; + + /** + * CreateAspectTypeRequest aspectTypeId. + * @member {string} aspectTypeId + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @instance + */ + CreateAspectTypeRequest.prototype.aspectTypeId = ""; + + /** + * CreateAspectTypeRequest aspectType. + * @member {google.cloud.dataplex.v1.IAspectType|null|undefined} aspectType + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @instance + */ + CreateAspectTypeRequest.prototype.aspectType = null; + + /** + * CreateAspectTypeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @instance + */ + CreateAspectTypeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAspectTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest instance + */ + CreateAspectTypeRequest.create = function create(properties) { + return new CreateAspectTypeRequest(properties); + }; + + /** + * Encodes the specified CreateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} message CreateAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAspectTypeRequest.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.aspectTypeId != null && Object.hasOwnProperty.call(message, "aspectTypeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.aspectTypeId); + if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) + $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} message CreateAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAspectTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAspectTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAspectTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.aspectTypeId = reader.string(); + break; + } + case 3: { + message.aspectType = $root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAspectTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAspectTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAspectTypeRequest.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.aspectTypeId != null && message.hasOwnProperty("aspectTypeId")) + if (!$util.isString(message.aspectTypeId)) + return "aspectTypeId: string expected"; + if (message.aspectType != null && message.hasOwnProperty("aspectType")) { + var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectType); + if (error) + return "aspectType." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest + */ + CreateAspectTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAspectTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateAspectTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.aspectTypeId != null) + message.aspectTypeId = String(object.aspectTypeId); + if (object.aspectType != null) { + if (typeof object.aspectType !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAspectTypeRequest.aspectType: object expected"); + message.aspectType = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectType); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAspectTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateAspectTypeRequest} message CreateAspectTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAspectTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.aspectTypeId = ""; + object.aspectType = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.aspectTypeId != null && message.hasOwnProperty("aspectTypeId")) + object.aspectTypeId = message.aspectTypeId; + if (message.aspectType != null && message.hasOwnProperty("aspectType")) + object.aspectType = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectType, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAspectTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAspectTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAspectTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAspectTypeRequest"; + }; + + return CreateAspectTypeRequest; + })(); + + v1.UpdateAspectTypeRequest = (function() { + + /** + * Properties of an UpdateAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateAspectTypeRequest + * @property {google.cloud.dataplex.v1.IAspectType|null} [aspectType] UpdateAspectTypeRequest aspectType + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAspectTypeRequest updateMask + * @property {boolean|null} [validateOnly] UpdateAspectTypeRequest validateOnly + */ + + /** + * Constructs a new UpdateAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateAspectTypeRequest. + * @implements IUpdateAspectTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest=} [properties] Properties to set + */ + function UpdateAspectTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAspectTypeRequest aspectType. + * @member {google.cloud.dataplex.v1.IAspectType|null|undefined} aspectType + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @instance + */ + UpdateAspectTypeRequest.prototype.aspectType = null; + + /** + * UpdateAspectTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @instance + */ + UpdateAspectTypeRequest.prototype.updateMask = null; + + /** + * UpdateAspectTypeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @instance + */ + UpdateAspectTypeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAspectTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest instance + */ + UpdateAspectTypeRequest.create = function create(properties) { + return new UpdateAspectTypeRequest(properties); + }; + + /** + * Encodes the specified UpdateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} message UpdateAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAspectTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) + $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectType, 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(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} message UpdateAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAspectTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.aspectType = $root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAspectTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAspectTypeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.aspectType != null && message.hasOwnProperty("aspectType")) { + var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectType); + if (error) + return "aspectType." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest + */ + UpdateAspectTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest(); + if (object.aspectType != null) { + if (typeof object.aspectType !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAspectTypeRequest.aspectType: object expected"); + message.aspectType = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectType); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAspectTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateAspectTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateAspectTypeRequest} message UpdateAspectTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAspectTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.aspectType = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.aspectType != null && message.hasOwnProperty("aspectType")) + object.aspectType = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectType, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateAspectTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAspectTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAspectTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAspectTypeRequest"; + }; + + return UpdateAspectTypeRequest; + })(); + + v1.DeleteAspectTypeRequest = (function() { + + /** + * Properties of a DeleteAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteAspectTypeRequest + * @property {string|null} [name] DeleteAspectTypeRequest name + * @property {string|null} [etag] DeleteAspectTypeRequest etag + */ + + /** + * Constructs a new DeleteAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteAspectTypeRequest. + * @implements IDeleteAspectTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest=} [properties] Properties to set + */ + function DeleteAspectTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAspectTypeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @instance + */ + DeleteAspectTypeRequest.prototype.name = ""; + + /** + * DeleteAspectTypeRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @instance + */ + DeleteAspectTypeRequest.prototype.etag = ""; + + /** + * Creates a new DeleteAspectTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest instance + */ + DeleteAspectTypeRequest.create = function create(properties) { + return new DeleteAspectTypeRequest(properties); + }; + + /** + * Encodes the specified DeleteAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} message DeleteAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAspectTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} message DeleteAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAspectTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAspectTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAspectTypeRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest + */ + DeleteAspectTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteAspectTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteAspectTypeRequest} message DeleteAspectTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAspectTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteAspectTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAspectTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAspectTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAspectTypeRequest"; + }; + + return DeleteAspectTypeRequest; + })(); + + v1.ListAspectTypesRequest = (function() { + + /** + * Properties of a ListAspectTypesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAspectTypesRequest + * @property {string|null} [parent] ListAspectTypesRequest parent + * @property {number|null} [pageSize] ListAspectTypesRequest pageSize + * @property {string|null} [pageToken] ListAspectTypesRequest pageToken + * @property {string|null} [filter] ListAspectTypesRequest filter + * @property {string|null} [orderBy] ListAspectTypesRequest orderBy + */ + + /** + * Constructs a new ListAspectTypesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAspectTypesRequest. + * @implements IListAspectTypesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest=} [properties] Properties to set + */ + function ListAspectTypesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAspectTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + */ + ListAspectTypesRequest.prototype.parent = ""; + + /** + * ListAspectTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + */ + ListAspectTypesRequest.prototype.pageSize = 0; + + /** + * ListAspectTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + */ + ListAspectTypesRequest.prototype.pageToken = ""; + + /** + * ListAspectTypesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + */ + ListAspectTypesRequest.prototype.filter = ""; + + /** + * ListAspectTypesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + */ + ListAspectTypesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAspectTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest instance + */ + ListAspectTypesRequest.create = function create(properties) { + return new ListAspectTypesRequest(properties); + }; + + /** + * Encodes the specified ListAspectTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} message ListAspectTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAspectTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListAspectTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} message ListAspectTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAspectTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAspectTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAspectTypesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAspectTypesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAspectTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAspectTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAspectTypesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAspectTypesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListAspectTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest + */ + ListAspectTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAspectTypesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAspectTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListAspectTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {google.cloud.dataplex.v1.ListAspectTypesRequest} message ListAspectTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAspectTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListAspectTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAspectTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAspectTypesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAspectTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAspectTypesRequest"; + }; + + return ListAspectTypesRequest; + })(); + + v1.ListAspectTypesResponse = (function() { + + /** + * Properties of a ListAspectTypesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListAspectTypesResponse + * @property {Array.|null} [aspectTypes] ListAspectTypesResponse aspectTypes + * @property {string|null} [nextPageToken] ListAspectTypesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListAspectTypesResponse unreachableLocations + */ + + /** + * Constructs a new ListAspectTypesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAspectTypesResponse. + * @implements IListAspectTypesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListAspectTypesResponse=} [properties] Properties to set + */ + function ListAspectTypesResponse(properties) { + this.aspectTypes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAspectTypesResponse aspectTypes. + * @member {Array.} aspectTypes + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @instance + */ + ListAspectTypesResponse.prototype.aspectTypes = $util.emptyArray; + + /** + * ListAspectTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @instance + */ + ListAspectTypesResponse.prototype.nextPageToken = ""; + + /** + * ListAspectTypesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @instance + */ + ListAspectTypesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListAspectTypesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse instance + */ + ListAspectTypesResponse.create = function create(properties) { + return new ListAspectTypesResponse(properties); + }; + + /** + * Encodes the specified ListAspectTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesResponse} message ListAspectTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAspectTypesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aspectTypes != null && message.aspectTypes.length) + for (var i = 0; i < message.aspectTypes.length; ++i) + $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListAspectTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {google.cloud.dataplex.v1.IListAspectTypesResponse} message ListAspectTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAspectTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAspectTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAspectTypesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAspectTypesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.aspectTypes && message.aspectTypes.length)) + message.aspectTypes = []; + message.aspectTypes.push($root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAspectTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAspectTypesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAspectTypesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAspectTypesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { + if (!Array.isArray(message.aspectTypes)) + return "aspectTypes: array expected"; + for (var i = 0; i < message.aspectTypes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectTypes[i]); + if (error) + return "aspectTypes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListAspectTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse + */ + ListAspectTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAspectTypesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAspectTypesResponse(); + if (object.aspectTypes) { + if (!Array.isArray(object.aspectTypes)) + throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.aspectTypes: array expected"); + message.aspectTypes = []; + for (var i = 0; i < object.aspectTypes.length; ++i) { + if (typeof object.aspectTypes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.aspectTypes: object expected"); + message.aspectTypes[i] = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectTypes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListAspectTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {google.cloud.dataplex.v1.ListAspectTypesResponse} message ListAspectTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAspectTypesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.aspectTypes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.aspectTypes && message.aspectTypes.length) { + object.aspectTypes = []; + for (var j = 0; j < message.aspectTypes.length; ++j) + object.aspectTypes[j] = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListAspectTypesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAspectTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAspectTypesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAspectTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAspectTypesResponse"; + }; + + return ListAspectTypesResponse; + })(); + + v1.GetAspectTypeRequest = (function() { + + /** + * Properties of a GetAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetAspectTypeRequest + * @property {string|null} [name] GetAspectTypeRequest name + */ + + /** + * Constructs a new GetAspectTypeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetAspectTypeRequest. + * @implements IGetAspectTypeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest=} [properties] Properties to set + */ + function GetAspectTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAspectTypeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @instance + */ + GetAspectTypeRequest.prototype.name = ""; + + /** + * Creates a new GetAspectTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest instance + */ + GetAspectTypeRequest.create = function create(properties) { + return new GetAspectTypeRequest(properties); + }; + + /** + * Encodes the specified GetAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} message GetAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAspectTypeRequest.encode = function encode(message, writer) { + 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 GetAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} message GetAspectTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAspectTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAspectTypeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAspectTypeRequest(); + 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 GetAspectTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAspectTypeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAspectTypeRequest.verify = function verify(message) { + if (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 GetAspectTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest + */ + GetAspectTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAspectTypeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetAspectTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAspectTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {google.cloud.dataplex.v1.GetAspectTypeRequest} message GetAspectTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAspectTypeRequest.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 GetAspectTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetAspectTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAspectTypeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAspectTypeRequest"; + }; + + return GetAspectTypeRequest; + })(); + + v1.CreateEntryRequest = (function() { + + /** + * Properties of a CreateEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEntryRequest + * @property {string|null} [parent] CreateEntryRequest parent + * @property {string|null} [entryId] CreateEntryRequest entryId + * @property {google.cloud.dataplex.v1.IEntry|null} [entry] CreateEntryRequest entry + */ + + /** + * Constructs a new CreateEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEntryRequest. + * @implements ICreateEntryRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.parent = ""; + + /** + * CreateEntryRequest entryId. + * @member {string} entryId + * @memberof google.cloud.dataplex.v1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.entryId = ""; + + /** + * CreateEntryRequest entry. + * @member {google.cloud.dataplex.v1.IEntry|null|undefined} entry + * @memberof google.cloud.dataplex.v1.CreateEntryRequest + * @instance + */ + CreateEntryRequest.prototype.entry = null; + + /** + * Creates a new CreateEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEntryRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntryRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntryRequest} CreateEntryRequest instance + */ + CreateEntryRequest.create = function create(properties) { + return new CreateEntryRequest(properties); + }; + + /** + * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEntryRequest + * @static + * @param {google.cloud.dataplex.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.entryId != null && Object.hasOwnProperty.call(message, "entryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryId); + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) + $root.google.cloud.dataplex.v1.Entry.encode(message.entry, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.entryId = reader.string(); + break; + } + case 3: { + message.entry = $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEntryRequest} CreateEntryRequest + */ + CreateEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryRequest) + return object; + var message = new $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest.entry: object expected"); + message.entry = $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest + * @static + * @param {google.cloud.dataplex.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.entryId = ""; + object.entry = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entryId != null && message.hasOwnProperty("entryId")) + object.entryId = message.entryId; + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); + return object; + }; + + /** + * Converts this CreateEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest"; + }; + + return CreateEntryRequest; + })(); + + v1.UpdateEntryRequest = (function() { + + /** + * Properties of an UpdateEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEntryRequest + * @property {google.cloud.dataplex.v1.IEntry|null} [entry] UpdateEntryRequest entry + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask + * @property {boolean|null} [allowMissing] UpdateEntryRequest allowMissing + * @property {boolean|null} [deleteMissingAspects] UpdateEntryRequest deleteMissingAspects + * @property {Array.|null} [aspectKeys] UpdateEntryRequest aspectKeys + */ + + /** + * Constructs a new UpdateEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEntryRequest. + * @implements IUpdateEntryRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEntryRequest=} [properties] Properties to set + */ + function UpdateEntryRequest(properties) { + this.aspectKeys = []; + if (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.dataplex.v1.IEntry|null|undefined} entry + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.entry = null; + + /** + * UpdateEntryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.updateMask = null; + + /** + * UpdateEntryRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.allowMissing = false; + + /** + * UpdateEntryRequest deleteMissingAspects. + * @member {boolean} deleteMissingAspects + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.deleteMissingAspects = false; + + /** + * UpdateEntryRequest aspectKeys. + * @member {Array.} aspectKeys + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @instance + */ + UpdateEntryRequest.prototype.aspectKeys = $util.emptyArray; + + /** + * Creates a new UpdateEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntryRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntryRequest} UpdateEntryRequest instance + */ + UpdateEntryRequest.create = function create(properties) { + return new UpdateEntryRequest(properties); + }; + + /** + * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.deleteMissingAspects != null && Object.hasOwnProperty.call(message, "deleteMissingAspects")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleteMissingAspects); + if (message.aspectKeys != null && message.aspectKeys.length) + for (var i = 0; i < message.aspectKeys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.aspectKeys[i]); + return writer; + }; + + /** + * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.deleteMissingAspects = reader.bool(); + break; + } + case 5: { + if (!(message.aspectKeys && message.aspectKeys.length)) + message.aspectKeys = []; + message.aspectKeys.push(reader.string()); + 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.dataplex.v1.UpdateEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.deleteMissingAspects != null && message.hasOwnProperty("deleteMissingAspects")) + if (typeof message.deleteMissingAspects !== "boolean") + return "deleteMissingAspects: boolean expected"; + if (message.aspectKeys != null && message.hasOwnProperty("aspectKeys")) { + if (!Array.isArray(message.aspectKeys)) + return "aspectKeys: array expected"; + for (var i = 0; i < message.aspectKeys.length; ++i) + if (!$util.isString(message.aspectKeys[i])) + return "aspectKeys: string[] expected"; + } + return null; + }; + + /** + * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEntryRequest} UpdateEntryRequest + */ + UpdateEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEntryRequest(); + if (object.entry != null) { + if (typeof object.entry !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.entry: object expected"); + message.entry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.entry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.deleteMissingAspects != null) + message.deleteMissingAspects = Boolean(object.deleteMissingAspects); + if (object.aspectKeys) { + if (!Array.isArray(object.aspectKeys)) + throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.aspectKeys: array expected"); + message.aspectKeys = []; + for (var i = 0; i < object.aspectKeys.length; ++i) + message.aspectKeys[i] = String(object.aspectKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEntryRequest + * @static + * @param {google.cloud.dataplex.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.arrays || options.defaults) + object.aspectKeys = []; + if (options.defaults) { + object.entry = null; + object.updateMask = null; + object.allowMissing = false; + object.deleteMissingAspects = false; + } + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.deleteMissingAspects != null && message.hasOwnProperty("deleteMissingAspects")) + object.deleteMissingAspects = message.deleteMissingAspects; + if (message.aspectKeys && message.aspectKeys.length) { + object.aspectKeys = []; + for (var j = 0; j < message.aspectKeys.length; ++j) + object.aspectKeys[j] = message.aspectKeys[j]; + } + return object; + }; + + /** + * Converts this UpdateEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryRequest"; + }; + + return UpdateEntryRequest; + })(); + + v1.DeleteEntryRequest = (function() { + + /** + * Properties of a DeleteEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEntryRequest + * @property {string|null} [name] DeleteEntryRequest name + */ + + /** + * Constructs a new DeleteEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEntryRequest. + * @implements IDeleteEntryRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest + * @instance + */ + DeleteEntryRequest.prototype.name = ""; + + /** + * Creates a new DeleteEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEntryRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntryRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntryRequest} DeleteEntryRequest instance + */ + DeleteEntryRequest.create = function create(properties) { + return new DeleteEntryRequest(properties); + }; + + /** + * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEntryRequest} DeleteEntryRequest + */ + DeleteEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryRequest) + return object; + var message = new $root.google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest"; + }; + + return DeleteEntryRequest; + })(); + + v1.ListEntriesRequest = (function() { + + /** + * Properties of a ListEntriesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntriesRequest + * @property {string|null} [parent] ListEntriesRequest parent + * @property {number|null} [pageSize] ListEntriesRequest pageSize + * @property {string|null} [pageToken] ListEntriesRequest pageToken + * @property {string|null} [filter] ListEntriesRequest filter + */ + + /** + * Constructs a new ListEntriesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntriesRequest. + * @implements IListEntriesRequest + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.ListEntriesRequest + * @instance + */ + ListEntriesRequest.prototype.parent = ""; + + /** + * ListEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @instance + */ + ListEntriesRequest.prototype.pageSize = 0; + + /** + * ListEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @instance + */ + ListEntriesRequest.prototype.pageToken = ""; + + /** + * ListEntriesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @instance + */ + ListEntriesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntriesRequest} ListEntriesRequest instance + */ + ListEntriesRequest.create = function create(properties) { + return new ListEntriesRequest(properties); + }; + + /** + * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @static + * @param {google.cloud.dataplex.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.filter = reader.string(); + 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.dataplex.v1.ListEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntriesRequest} ListEntriesRequest + */ + ListEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntriesRequest) + return object; + var message = new $root.google.cloud.dataplex.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.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntriesRequest + * @static + * @param {google.cloud.dataplex.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.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 ListEntriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntriesRequest"; + }; + + return ListEntriesRequest; + })(); + + v1.ListEntriesResponse = (function() { + + /** + * Properties of a ListEntriesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntriesResponse + * @property {Array.|null} [entries] ListEntriesResponse entries + * @property {string|null} [nextPageToken] ListEntriesResponse nextPageToken + */ + + /** + * Constructs a new ListEntriesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntriesResponse. + * @implements IListEntriesResponse + * @constructor + * @param {google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse + * @instance + */ + ListEntriesResponse.prototype.entries = $util.emptyArray; + + /** + * ListEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntriesResponse + * @instance + */ + ListEntriesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntriesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntriesResponse} ListEntriesResponse instance + */ + ListEntriesResponse.create = function create(properties) { + return new ListEntriesResponse(properties); + }; + + /** + * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntriesResponse + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntriesResponse + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntriesResponse} ListEntriesResponse + */ + ListEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntriesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntriesResponse(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse.entries: object expected"); + message.entries[i] = $root.google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse"; + }; + + return ListEntriesResponse; + })(); + + v1.GetEntryRequest = (function() { + + /** + * Properties of a GetEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntryRequest + * @property {string|null} [name] GetEntryRequest name + * @property {google.cloud.dataplex.v1.EntryView|null} [view] GetEntryRequest view + * @property {Array.|null} [aspectTypes] GetEntryRequest aspectTypes + * @property {Array.|null} [paths] GetEntryRequest paths + */ + + /** + * Constructs a new GetEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntryRequest. + * @implements IGetEntryRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntryRequest=} [properties] Properties to set + */ + function GetEntryRequest(properties) { + this.aspectTypes = []; + 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]]; + } + + /** + * GetEntryRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @instance + */ + GetEntryRequest.prototype.name = ""; + + /** + * GetEntryRequest view. + * @member {google.cloud.dataplex.v1.EntryView} view + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @instance + */ + GetEntryRequest.prototype.view = 0; + + /** + * GetEntryRequest aspectTypes. + * @member {Array.} aspectTypes + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @instance + */ + GetEntryRequest.prototype.aspectTypes = $util.emptyArray; + + /** + * GetEntryRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @instance + */ + GetEntryRequest.prototype.paths = $util.emptyArray; + + /** + * Creates a new GetEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntryRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntryRequest} GetEntryRequest instance + */ + GetEntryRequest.create = function create(properties) { + return new GetEntryRequest(properties); + }; + + /** + * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @static + * @param {google.cloud.dataplex.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.aspectTypes != null && message.aspectTypes.length) + for (var i = 0; i < message.aspectTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.GetEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + if (!(message.aspectTypes && message.aspectTypes.length)) + message.aspectTypes = []; + message.aspectTypes.push(reader.string()); + break; + } + case 4: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(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.dataplex.v1.GetEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { + if (!Array.isArray(message.aspectTypes)) + return "aspectTypes: array expected"; + for (var i = 0; i < message.aspectTypes.length; ++i) + if (!$util.isString(message.aspectTypes[i])) + return "aspectTypes: string[] 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 GetEntryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntryRequest} GetEntryRequest + */ + GetEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntryRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntryRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTRY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "CUSTOM": + case 3: + message.view = 3; + break; + case "ALL": + case 4: + message.view = 4; + break; + } + if (object.aspectTypes) { + if (!Array.isArray(object.aspectTypes)) + throw TypeError(".google.cloud.dataplex.v1.GetEntryRequest.aspectTypes: array expected"); + message.aspectTypes = []; + for (var i = 0; i < object.aspectTypes.length; ++i) + message.aspectTypes[i] = String(object.aspectTypes[i]); + } + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataplex.v1.GetEntryRequest.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 GetEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntryRequest + * @static + * @param {google.cloud.dataplex.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.arrays || options.defaults) { + object.aspectTypes = []; + object.paths = []; + } + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTRY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.EntryView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.EntryView[message.view] : message.view; + if (message.aspectTypes && message.aspectTypes.length) { + object.aspectTypes = []; + for (var j = 0; j < message.aspectTypes.length; ++j) + object.aspectTypes[j] = message.aspectTypes[j]; + } + 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 GetEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.GetEntryRequest"; + }; + + return GetEntryRequest; + })(); + + v1.LookupEntryRequest = (function() { + + /** + * Properties of a LookupEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ILookupEntryRequest + * @property {string|null} [name] LookupEntryRequest name + * @property {google.cloud.dataplex.v1.EntryView|null} [view] LookupEntryRequest view + * @property {Array.|null} [aspectTypes] LookupEntryRequest aspectTypes + * @property {Array.|null} [paths] LookupEntryRequest paths + * @property {string|null} [entry] LookupEntryRequest entry + */ + + /** + * Constructs a new LookupEntryRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a LookupEntryRequest. + * @implements ILookupEntryRequest + * @constructor + * @param {google.cloud.dataplex.v1.ILookupEntryRequest=} [properties] Properties to set + */ + function LookupEntryRequest(properties) { + this.aspectTypes = []; + 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]]; + } + + /** + * LookupEntryRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.name = ""; + + /** + * LookupEntryRequest view. + * @member {google.cloud.dataplex.v1.EntryView} view + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.view = 0; + + /** + * LookupEntryRequest aspectTypes. + * @member {Array.} aspectTypes + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.aspectTypes = $util.emptyArray; + + /** + * LookupEntryRequest paths. + * @member {Array.} paths + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.paths = $util.emptyArray; + + /** + * LookupEntryRequest entry. + * @member {string} entry + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @instance + */ + LookupEntryRequest.prototype.entry = ""; + + /** + * Creates a new LookupEntryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @static + * @param {google.cloud.dataplex.v1.ILookupEntryRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.LookupEntryRequest} LookupEntryRequest instance + */ + LookupEntryRequest.create = function create(properties) { + return new LookupEntryRequest(properties); + }; + + /** + * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.LookupEntryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @static + * @param {google.cloud.dataplex.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.aspectTypes != null && message.aspectTypes.length) + for (var i = 0; i < message.aspectTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.paths[i]); + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.entry); + return writer; + }; + + /** + * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.LookupEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.LookupEntryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + if (!(message.aspectTypes && message.aspectTypes.length)) + message.aspectTypes = []; + message.aspectTypes.push(reader.string()); + break; + } + case 4: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 5: { + message.entry = 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.dataplex.v1.LookupEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { + if (!Array.isArray(message.aspectTypes)) + return "aspectTypes: array expected"; + for (var i = 0; i < message.aspectTypes.length; ++i) + if (!$util.isString(message.aspectTypes[i])) + return "aspectTypes: string[] expected"; + } + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.entry != null && message.hasOwnProperty("entry")) + if (!$util.isString(message.entry)) + return "entry: 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.dataplex.v1.LookupEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.LookupEntryRequest} LookupEntryRequest + */ + LookupEntryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.LookupEntryRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.LookupEntryRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTRY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "CUSTOM": + case 3: + message.view = 3; + break; + case "ALL": + case 4: + message.view = 4; + break; + } + if (object.aspectTypes) { + if (!Array.isArray(object.aspectTypes)) + throw TypeError(".google.cloud.dataplex.v1.LookupEntryRequest.aspectTypes: array expected"); + message.aspectTypes = []; + for (var i = 0; i < object.aspectTypes.length; ++i) + message.aspectTypes[i] = String(object.aspectTypes[i]); + } + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataplex.v1.LookupEntryRequest.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.entry != null) + message.entry = String(object.entry); + return message; + }; + + /** + * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.LookupEntryRequest + * @static + * @param {google.cloud.dataplex.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.arrays || options.defaults) { + object.aspectTypes = []; + object.paths = []; + } + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTRY_VIEW_UNSPECIFIED" : 0; + object.entry = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.EntryView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.EntryView[message.view] : message.view; + if (message.aspectTypes && message.aspectTypes.length) { + object.aspectTypes = []; + for (var j = 0; j < message.aspectTypes.length; ++j) + object.aspectTypes[j] = message.aspectTypes[j]; + } + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = message.entry; + return object; + }; + + /** + * Converts this LookupEntryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.LookupEntryRequest"; + }; + + return LookupEntryRequest; + })(); + + v1.SearchEntriesRequest = (function() { + + /** + * Properties of a SearchEntriesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ISearchEntriesRequest + * @property {string|null} [name] SearchEntriesRequest name + * @property {string|null} [query] SearchEntriesRequest query + * @property {number|null} [pageSize] SearchEntriesRequest pageSize + * @property {string|null} [pageToken] SearchEntriesRequest pageToken + * @property {string|null} [orderBy] SearchEntriesRequest orderBy + * @property {string|null} [scope] SearchEntriesRequest scope + */ + + /** + * Constructs a new SearchEntriesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SearchEntriesRequest. + * @implements ISearchEntriesRequest + * @constructor + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest=} [properties] Properties to set + */ + function SearchEntriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchEntriesRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.name = ""; + + /** + * SearchEntriesRequest query. + * @member {string} query + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.query = ""; + + /** + * SearchEntriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.pageSize = 0; + + /** + * SearchEntriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.pageToken = ""; + + /** + * SearchEntriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.orderBy = ""; + + /** + * SearchEntriesRequest scope. + * @member {string} scope + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + */ + SearchEntriesRequest.prototype.scope = ""; + + /** + * Creates a new SearchEntriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest instance + */ + SearchEntriesRequest.create = function create(properties) { + return new SearchEntriesRequest(properties); + }; + + /** + * Encodes the specified SearchEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} message SearchEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).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")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.scope); + return writer; + }; + + /** + * Encodes the specified SearchEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} message SearchEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.query = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 7: { + message.scope = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchEntriesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchEntriesRequest.verify = function verify(message) { + if (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.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.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + return null; + }; + + /** + * Creates a SearchEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest + */ + SearchEntriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.SearchEntriesRequest(); + if (object.name != null) + message.name = String(object.name); + 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.scope != null) + message.scope = String(object.scope); + return message; + }; + + /** + * Creates a plain object from a SearchEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesRequest} message SearchEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchEntriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.query = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.scope = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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 = message.scope; + return object; + }; + + /** + * Converts this SearchEntriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + SearchEntriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchEntriesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SearchEntriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesRequest"; + }; + + return SearchEntriesRequest; + })(); + + v1.SearchEntriesResult = (function() { + + /** + * Properties of a SearchEntriesResult. + * @memberof google.cloud.dataplex.v1 + * @interface ISearchEntriesResult + * @property {string|null} [linkedResource] SearchEntriesResult linkedResource + * @property {google.cloud.dataplex.v1.IEntry|null} [dataplexEntry] SearchEntriesResult dataplexEntry + * @property {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null} [snippets] SearchEntriesResult snippets + */ + + /** + * Constructs a new SearchEntriesResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SearchEntriesResult. + * @implements ISearchEntriesResult + * @constructor + * @param {google.cloud.dataplex.v1.ISearchEntriesResult=} [properties] Properties to set + */ + function SearchEntriesResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchEntriesResult linkedResource. + * @member {string} linkedResource + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @instance + */ + SearchEntriesResult.prototype.linkedResource = ""; + + /** + * SearchEntriesResult dataplexEntry. + * @member {google.cloud.dataplex.v1.IEntry|null|undefined} dataplexEntry + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @instance + */ + SearchEntriesResult.prototype.dataplexEntry = null; + + /** + * SearchEntriesResult snippets. + * @member {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null|undefined} snippets + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @instance + */ + SearchEntriesResult.prototype.snippets = null; + + /** + * Creates a new SearchEntriesResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult instance + */ + SearchEntriesResult.create = function create(properties) { + return new SearchEntriesResult(properties); + }; + + /** + * Encodes the specified SearchEntriesResult message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResult} message SearchEntriesResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.linkedResource); + if (message.dataplexEntry != null && Object.hasOwnProperty.call(message, "dataplexEntry")) + $root.google.cloud.dataplex.v1.Entry.encode(message.dataplexEntry, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.snippets != null && Object.hasOwnProperty.call(message, "snippets")) + $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.encode(message.snippets, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchEntriesResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResult} message SearchEntriesResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchEntriesResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.linkedResource = reader.string(); + break; + } + case 9: { + message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); + break; + } + case 12: { + message.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchEntriesResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchEntriesResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchEntriesResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + if (!$util.isString(message.linkedResource)) + return "linkedResource: string expected"; + if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) { + var error = $root.google.cloud.dataplex.v1.Entry.verify(message.dataplexEntry); + if (error) + return "dataplexEntry." + error; + } + if (message.snippets != null && message.hasOwnProperty("snippets")) { + var error = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify(message.snippets); + if (error) + return "snippets." + error; + } + return null; + }; + + /** + * Creates a SearchEntriesResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult + */ + SearchEntriesResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResult) + return object; + var message = new $root.google.cloud.dataplex.v1.SearchEntriesResult(); + if (object.linkedResource != null) + message.linkedResource = String(object.linkedResource); + if (object.dataplexEntry != null) { + if (typeof object.dataplexEntry !== "object") + throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.dataplexEntry: object expected"); + message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.dataplexEntry); + } + if (object.snippets != null) { + if (typeof object.snippets !== "object") + throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.snippets: object expected"); + message.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.fromObject(object.snippets); + } + return message; + }; + + /** + * Creates a plain object from a SearchEntriesResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResult} message SearchEntriesResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchEntriesResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.linkedResource = ""; + object.dataplexEntry = null; + object.snippets = null; + } + if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) + object.linkedResource = message.linkedResource; + if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) + object.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.toObject(message.dataplexEntry, options); + if (message.snippets != null && message.hasOwnProperty("snippets")) + object.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.toObject(message.snippets, options); + return object; + }; + + /** + * Converts this SearchEntriesResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @instance + * @returns {Object.} JSON object + */ + SearchEntriesResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchEntriesResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchEntriesResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResult"; + }; + + SearchEntriesResult.Snippets = (function() { + + /** + * Properties of a Snippets. + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @interface ISnippets + * @property {google.cloud.dataplex.v1.IEntry|null} [dataplexEntry] Snippets dataplexEntry + */ + + /** + * Constructs a new Snippets. + * @memberof google.cloud.dataplex.v1.SearchEntriesResult + * @classdesc Represents a Snippets. + * @implements ISnippets + * @constructor + * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets=} [properties] Properties to set + */ + function Snippets(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snippets dataplexEntry. + * @member {google.cloud.dataplex.v1.IEntry|null|undefined} dataplexEntry + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @instance + */ + Snippets.prototype.dataplexEntry = null; + + /** + * Creates a new Snippets instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets instance + */ + Snippets.create = function create(properties) { + return new Snippets(properties); + }; + + /** + * Encodes the specified Snippets message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets} message Snippets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snippets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataplexEntry != null && Object.hasOwnProperty.call(message, "dataplexEntry")) + $root.google.cloud.dataplex.v1.Entry.encode(message.dataplexEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Snippets message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets} message Snippets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snippets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snippets message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snippets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snippets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snippets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snippets message. + * @function verify + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snippets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) { + var error = $root.google.cloud.dataplex.v1.Entry.verify(message.dataplexEntry); + if (error) + return "dataplexEntry." + error; + } + return null; + }; + + /** + * Creates a Snippets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets + */ + Snippets.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets) + return object; + var message = new $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets(); + if (object.dataplexEntry != null) { + if (typeof object.dataplexEntry !== "object") + throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.Snippets.dataplexEntry: object expected"); + message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.dataplexEntry); + } + return message; + }; + + /** + * Creates a plain object from a Snippets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} message Snippets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snippets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataplexEntry = null; + if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) + object.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.toObject(message.dataplexEntry, options); + return object; + }; + + /** + * Converts this Snippets to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @instance + * @returns {Object.} JSON object + */ + Snippets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Snippets + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Snippets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"; + }; + + return Snippets; + })(); + + return SearchEntriesResult; + })(); + + v1.SearchEntriesResponse = (function() { + + /** + * Properties of a SearchEntriesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface ISearchEntriesResponse + * @property {Array.|null} [results] SearchEntriesResponse results + * @property {number|null} [totalSize] SearchEntriesResponse totalSize + * @property {string|null} [nextPageToken] SearchEntriesResponse nextPageToken + * @property {Array.|null} [unreachable] SearchEntriesResponse unreachable + */ + + /** + * Constructs a new SearchEntriesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SearchEntriesResponse. + * @implements ISearchEntriesResponse + * @constructor + * @param {google.cloud.dataplex.v1.ISearchEntriesResponse=} [properties] Properties to set + */ + function SearchEntriesResponse(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]]; + } + + /** + * SearchEntriesResponse results. + * @member {Array.} results + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @instance + */ + SearchEntriesResponse.prototype.results = $util.emptyArray; + + /** + * SearchEntriesResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @instance + */ + SearchEntriesResponse.prototype.totalSize = 0; + + /** + * SearchEntriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @instance + */ + SearchEntriesResponse.prototype.nextPageToken = ""; + + /** + * SearchEntriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @instance + */ + SearchEntriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new SearchEntriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse instance + */ + SearchEntriesResponse.create = function create(properties) { + return new SearchEntriesResponse(properties); + }; + + /** + * Encodes the specified SearchEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResponse} message SearchEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 4, wireType 2 =*/34).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified SearchEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {google.cloud.dataplex.v1.ISearchEntriesResponse} message SearchEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResponse(); + 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.dataplex.v1.SearchEntriesResult.decode(reader, reader.uint32())); + break; + } + case 2: { + message.totalSize = reader.int32(); + break; + } + case 3: { + message.nextPageToken = reader.string(); + break; + } + case 4: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchEntriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchEntriesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 SearchEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse + */ + SearchEntriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.SearchEntriesResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResponse.results: object expected"); + message.results[i] = $root.google.cloud.dataplex.v1.SearchEntriesResult.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.dataplex.v1.SearchEntriesResponse.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 SearchEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {google.cloud.dataplex.v1.SearchEntriesResponse} message SearchEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 SearchEntriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + SearchEntriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchEntriesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SearchEntriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResponse"; + }; + + return SearchEntriesResponse; + })(); + + v1.ImportItem = (function() { + + /** + * Properties of an ImportItem. + * @memberof google.cloud.dataplex.v1 + * @interface IImportItem + * @property {google.cloud.dataplex.v1.IEntry|null} [entry] ImportItem entry + * @property {google.protobuf.IFieldMask|null} [updateMask] ImportItem updateMask + * @property {Array.|null} [aspectKeys] ImportItem aspectKeys + */ + + /** + * Constructs a new ImportItem. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an ImportItem. + * @implements IImportItem + * @constructor + * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set + */ + function ImportItem(properties) { + this.aspectKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportItem entry. + * @member {google.cloud.dataplex.v1.IEntry|null|undefined} entry + * @memberof google.cloud.dataplex.v1.ImportItem + * @instance + */ + ImportItem.prototype.entry = null; + + /** + * ImportItem updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.ImportItem + * @instance + */ + ImportItem.prototype.updateMask = null; + + /** + * ImportItem aspectKeys. + * @member {Array.} aspectKeys + * @memberof google.cloud.dataplex.v1.ImportItem + * @instance + */ + ImportItem.prototype.aspectKeys = $util.emptyArray; + + /** + * Creates a new ImportItem instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem instance + */ + ImportItem.create = function create(properties) { + return new ImportItem(properties); + }; + + /** + * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) + $root.google.cloud.dataplex.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(); + if (message.aspectKeys != null && message.aspectKeys.length) + for (var i = 0; i < message.aspectKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectKeys[i]); + return writer; + }; + + /** + * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ImportItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.aspectKeys && message.aspectKeys.length)) + message.aspectKeys = []; + message.aspectKeys.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportItem message. + * @function verify + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportItem.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.dataplex.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; + } + if (message.aspectKeys != null && message.hasOwnProperty("aspectKeys")) { + if (!Array.isArray(message.aspectKeys)) + return "aspectKeys: array expected"; + for (var i = 0; i < message.aspectKeys.length; ++i) + if (!$util.isString(message.aspectKeys[i])) + return "aspectKeys: string[] expected"; + } + return null; + }; + + /** + * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem + */ + ImportItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ImportItem) + return object; + var message = new $root.google.cloud.dataplex.v1.ImportItem(); + if (object.entry != null) { + if (typeof object.entry !== "object") + throw TypeError(".google.cloud.dataplex.v1.ImportItem.entry: object expected"); + message.entry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.entry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.ImportItem.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.aspectKeys) { + if (!Array.isArray(object.aspectKeys)) + throw TypeError(".google.cloud.dataplex.v1.ImportItem.aspectKeys: array expected"); + message.aspectKeys = []; + for (var i = 0; i < object.aspectKeys.length; ++i) + message.aspectKeys[i] = String(object.aspectKeys[i]); + } + return message; + }; + + /** + * Creates a plain object from an ImportItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.ImportItem} message ImportItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aspectKeys = []; + if (options.defaults) { + object.entry = null; + object.updateMask = null; + } + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.aspectKeys && message.aspectKeys.length) { + object.aspectKeys = []; + for (var j = 0; j < message.aspectKeys.length; ++j) + object.aspectKeys[j] = message.aspectKeys[j]; + } + return object; + }; + + /** + * Converts this ImportItem to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ImportItem + * @instance + * @returns {Object.} JSON object + */ + ImportItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportItem + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ImportItem"; + }; + + return ImportItem; + })(); + + v1.CreateMetadataJobRequest = (function() { + + /** + * Properties of a CreateMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateMetadataJobRequest + * @property {string|null} [parent] CreateMetadataJobRequest parent + * @property {google.cloud.dataplex.v1.IMetadataJob|null} [metadataJob] CreateMetadataJobRequest metadataJob + * @property {string|null} [metadataJobId] CreateMetadataJobRequest metadataJobId + * @property {boolean|null} [validateOnly] CreateMetadataJobRequest validateOnly + */ + + /** + * Constructs a new CreateMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateMetadataJobRequest. + * @implements ICreateMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set + */ + function CreateMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMetadataJobRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance + */ + CreateMetadataJobRequest.prototype.parent = ""; + + /** + * CreateMetadataJobRequest metadataJob. + * @member {google.cloud.dataplex.v1.IMetadataJob|null|undefined} metadataJob + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance + */ + CreateMetadataJobRequest.prototype.metadataJob = null; + + /** + * CreateMetadataJobRequest metadataJobId. + * @member {string} metadataJobId + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance + */ + CreateMetadataJobRequest.prototype.metadataJobId = ""; + + /** + * CreateMetadataJobRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance + */ + CreateMetadataJobRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest instance + */ + CreateMetadataJobRequest.create = function create(properties) { + return new CreateMetadataJobRequest(properties); + }; + + /** + * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetadataJobRequest.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.metadataJob != null && Object.hasOwnProperty.call(message, "metadataJob")) + $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadataJobId != null && Object.hasOwnProperty.call(message, "metadataJobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataJobId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32()); + break; + } + case 3: { + message.metadataJobId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMetadataJobRequest.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.metadataJob != null && message.hasOwnProperty("metadataJob")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJob); + if (error) + return "metadataJob." + error; + } + if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) + if (!$util.isString(message.metadataJobId)) + return "metadataJobId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest + */ + CreateMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metadataJob != null) { + if (typeof object.metadataJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateMetadataJobRequest.metadataJob: object expected"); + message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJob); + } + if (object.metadataJobId != null) + message.metadataJobId = String(object.metadataJobId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.CreateMetadataJobRequest} message CreateMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMetadataJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metadataJob = null; + object.metadataJobId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metadataJob != null && message.hasOwnProperty("metadataJob")) + object.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJob, options); + if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) + object.metadataJobId = message.metadataJobId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateMetadataJobRequest"; + }; + + return CreateMetadataJobRequest; + })(); + + v1.GetMetadataJobRequest = (function() { + + /** + * Properties of a GetMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetMetadataJobRequest + * @property {string|null} [name] GetMetadataJobRequest name + */ + + /** + * Constructs a new GetMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetMetadataJobRequest. + * @implements IGetMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set + */ + function GetMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMetadataJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @instance + */ + GetMetadataJobRequest.prototype.name = ""; + + /** + * Creates a new GetMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest instance + */ + GetMetadataJobRequest.create = function create(properties) { + return new GetMetadataJobRequest(properties); + }; + + /** + * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataJobRequest.encode = function encode(message, writer) { + 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 GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); + 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 GetMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetadataJobRequest.verify = function verify(message) { + if (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 GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest + */ + GetMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetMetadataJobRequest} message GetMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetadataJobRequest.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 GetMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetMetadataJobRequest"; + }; + + return GetMetadataJobRequest; + })(); + + v1.ListMetadataJobsRequest = (function() { + + /** + * Properties of a ListMetadataJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListMetadataJobsRequest + * @property {string|null} [parent] ListMetadataJobsRequest parent + * @property {number|null} [pageSize] ListMetadataJobsRequest pageSize + * @property {string|null} [pageToken] ListMetadataJobsRequest pageToken + * @property {string|null} [filter] ListMetadataJobsRequest filter + * @property {string|null} [orderBy] ListMetadataJobsRequest orderBy + */ + + /** + * Constructs a new ListMetadataJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListMetadataJobsRequest. + * @implements IListMetadataJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set + */ + function ListMetadataJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetadataJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + */ + ListMetadataJobsRequest.prototype.parent = ""; + + /** + * ListMetadataJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + */ + ListMetadataJobsRequest.prototype.pageSize = 0; + + /** + * ListMetadataJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + */ + ListMetadataJobsRequest.prototype.pageToken = ""; + + /** + * ListMetadataJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + */ + ListMetadataJobsRequest.prototype.filter = ""; + + /** + * ListMetadataJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + */ + ListMetadataJobsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListMetadataJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest instance + */ + ListMetadataJobsRequest.create = function create(properties) { + return new ListMetadataJobsRequest(properties); + }; + + /** + * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest + */ + ListMetadataJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListMetadataJobsRequest} message ListMetadataJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListMetadataJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMetadataJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsRequest"; + }; + + return ListMetadataJobsRequest; + })(); + + v1.ListMetadataJobsResponse = (function() { + + /** + * Properties of a ListMetadataJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListMetadataJobsResponse + * @property {Array.|null} [metadataJobs] ListMetadataJobsResponse metadataJobs + * @property {string|null} [nextPageToken] ListMetadataJobsResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListMetadataJobsResponse unreachableLocations + */ + + /** + * Constructs a new ListMetadataJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListMetadataJobsResponse. + * @implements IListMetadataJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set + */ + function ListMetadataJobsResponse(properties) { + this.metadataJobs = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetadataJobsResponse metadataJobs. + * @member {Array.} metadataJobs + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @instance + */ + ListMetadataJobsResponse.prototype.metadataJobs = $util.emptyArray; + + /** + * ListMetadataJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @instance + */ + ListMetadataJobsResponse.prototype.nextPageToken = ""; + + /** + * ListMetadataJobsResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @instance + */ + ListMetadataJobsResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListMetadataJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse instance + */ + ListMetadataJobsResponse.create = function create(properties) { + return new ListMetadataJobsResponse(properties); + }; + + /** + * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataJobs != null && message.metadataJobs.length) + for (var i = 0; i < message.metadataJobs.length; ++i) + $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetadataJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataJobs && message.metadataJobs.length)) + message.metadataJobs = []; + message.metadataJobs.push($root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetadataJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetadataJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetadataJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataJobs != null && message.hasOwnProperty("metadataJobs")) { + if (!Array.isArray(message.metadataJobs)) + return "metadataJobs: array expected"; + for (var i = 0; i < message.metadataJobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJobs[i]); + if (error) + return "metadataJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse + */ + ListMetadataJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); + if (object.metadataJobs) { + if (!Array.isArray(object.metadataJobs)) + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: array expected"); + message.metadataJobs = []; + for (var i = 0; i < object.metadataJobs.length; ++i) { + if (typeof object.metadataJobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: object expected"); + message.metadataJobs[i] = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} message ListMetadataJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetadataJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metadataJobs = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataJobs && message.metadataJobs.length) { + object.metadataJobs = []; + for (var j = 0; j < message.metadataJobs.length; ++j) + object.metadataJobs[j] = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListMetadataJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMetadataJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMetadataJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetadataJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsResponse"; + }; + + return ListMetadataJobsResponse; + })(); + + v1.CancelMetadataJobRequest = (function() { + + /** + * Properties of a CancelMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelMetadataJobRequest + * @property {string|null} [name] CancelMetadataJobRequest name + */ + + /** + * Constructs a new CancelMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelMetadataJobRequest. + * @implements ICancelMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set + */ + function CancelMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelMetadataJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @instance + */ + CancelMetadataJobRequest.prototype.name = ""; + + /** + * Creates a new CancelMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest instance + */ + CancelMetadataJobRequest.create = function create(properties) { + return new CancelMetadataJobRequest(properties); + }; + + /** + * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelMetadataJobRequest.encode = function encode(message, writer) { + 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 CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); + 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 CancelMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelMetadataJobRequest.verify = function verify(message) { + if (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 CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest + */ + CancelMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelMetadataJobRequest} message CancelMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelMetadataJobRequest.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 CancelMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelMetadataJobRequest"; + }; + + return CancelMetadataJobRequest; + })(); + + v1.MetadataJob = (function() { + + /** + * Properties of a MetadataJob. + * @memberof google.cloud.dataplex.v1 + * @interface IMetadataJob + * @property {string|null} [name] MetadataJob name + * @property {string|null} [uid] MetadataJob uid + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataJob updateTime + * @property {Object.|null} [labels] MetadataJob labels + * @property {google.cloud.dataplex.v1.MetadataJob.Type|null} [type] MetadataJob type + * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null} [importSpec] MetadataJob importSpec + * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null} [importResult] MetadataJob importResult + * @property {google.cloud.dataplex.v1.MetadataJob.IStatus|null} [status] MetadataJob status + */ + + /** + * Constructs a new MetadataJob. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataJob. + * @implements IMetadataJob + * @constructor + * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set + */ + function MetadataJob(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]]; + } + + /** + * MetadataJob name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.name = ""; + + /** + * MetadataJob uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.uid = ""; + + /** + * MetadataJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.createTime = null; + + /** + * MetadataJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.updateTime = null; + + /** + * MetadataJob labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.labels = $util.emptyObject; + + /** + * MetadataJob type. + * @member {google.cloud.dataplex.v1.MetadataJob.Type} type + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.type = 0; + + /** + * MetadataJob importSpec. + * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null|undefined} importSpec + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.importSpec = null; + + /** + * MetadataJob importResult. + * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null|undefined} importResult + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.importResult = null; + + /** + * MetadataJob status. + * @member {google.cloud.dataplex.v1.MetadataJob.IStatus|null|undefined} status + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + MetadataJob.prototype.status = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataJob spec. + * @member {"importSpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + Object.defineProperty(MetadataJob.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["importSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MetadataJob result. + * @member {"importResult"|undefined} result + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + */ + Object.defineProperty(MetadataJob.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["importResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataJob instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob instance + */ + MetadataJob.create = function create(properties) { + return new MetadataJob(properties); + }; + + /** + * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.cloud.dataplex.v1.MetadataJob.Status.encode(message.status, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.importSpec != null && Object.hasOwnProperty.call(message, "importSpec")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.encode(message.importSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.importResult != null && Object.hasOwnProperty.call(message, "importResult")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.encode(message.importResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 100: { + message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.decode(reader, reader.uint32()); + break; + } + case 7: { + message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataJob message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataJob.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.importSpec != null && message.hasOwnProperty("importSpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify(message.importSpec); + if (error) + return "importSpec." + error; + } + } + if (message.importResult != null && message.hasOwnProperty("importResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify(message.importResult); + if (error) + return "importResult." + error; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob + */ + MetadataJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.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.dataplex.v1.MetadataJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "IMPORT": + case 1: + message.type = 1; + break; + } + if (object.importSpec != null) { + if (typeof object.importSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importSpec: object expected"); + message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.fromObject(object.importSpec); + } + if (object.importResult != null) { + if (typeof object.importResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importResult: object expected"); + message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.fromObject(object.importResult); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.status: object expected"); + message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {google.cloud.dataplex.v1.MetadataJob} message MetadataJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.status = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] : message.type; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.toObject(message.status, options); + if (message.importSpec != null && message.hasOwnProperty("importSpec")) { + object.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.toObject(message.importSpec, options); + if (options.oneofs) + object.spec = "importSpec"; + } + if (message.importResult != null && message.hasOwnProperty("importResult")) { + object.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.toObject(message.importResult, options); + if (options.oneofs) + object.result = "importResult"; + } + return object; + }; + + /** + * Converts this MetadataJob to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance + * @returns {Object.} JSON object + */ + MetadataJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataJob + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob"; + }; + + MetadataJob.ImportJobResult = (function() { + + /** + * Properties of an ImportJobResult. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IImportJobResult + * @property {number|Long|null} [deletedEntries] ImportJobResult deletedEntries + * @property {number|Long|null} [updatedEntries] ImportJobResult updatedEntries + * @property {number|Long|null} [createdEntries] ImportJobResult createdEntries + * @property {number|Long|null} [unchangedEntries] ImportJobResult unchangedEntries + * @property {number|Long|null} [recreatedEntries] ImportJobResult recreatedEntries + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportJobResult updateTime + */ + + /** + * Constructs a new ImportJobResult. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents an ImportJobResult. + * @implements IImportJobResult + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set + */ + function ImportJobResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportJobResult deletedEntries. + * @member {number|Long} deletedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.deletedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportJobResult updatedEntries. + * @member {number|Long} updatedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.updatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportJobResult createdEntries. + * @member {number|Long} createdEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.createdEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportJobResult unchangedEntries. + * @member {number|Long} unchangedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.unchangedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportJobResult recreatedEntries. + * @member {number|Long} recreatedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.recreatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImportJobResult updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.updateTime = null; + + /** + * Creates a new ImportJobResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult instance + */ + ImportJobResult.create = function create(properties) { + return new ImportJobResult(properties); + }; + + /** + * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deletedEntries != null && Object.hasOwnProperty.call(message, "deletedEntries")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.deletedEntries); + if (message.updatedEntries != null && Object.hasOwnProperty.call(message, "updatedEntries")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.updatedEntries); + if (message.createdEntries != null && Object.hasOwnProperty.call(message, "createdEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.createdEntries); + if (message.unchangedEntries != null && Object.hasOwnProperty.call(message, "unchangedEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unchangedEntries); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.recreatedEntries != null && Object.hasOwnProperty.call(message, "recreatedEntries")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.recreatedEntries); + return writer; + }; + + /** + * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deletedEntries = reader.int64(); + break; + } + case 2: { + message.updatedEntries = reader.int64(); + break; + } + case 3: { + message.createdEntries = reader.int64(); + break; + } + case 4: { + message.unchangedEntries = reader.int64(); + break; + } + case 6: { + message.recreatedEntries = reader.int64(); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJobResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) + if (!$util.isInteger(message.deletedEntries) && !(message.deletedEntries && $util.isInteger(message.deletedEntries.low) && $util.isInteger(message.deletedEntries.high))) + return "deletedEntries: integer|Long expected"; + if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) + if (!$util.isInteger(message.updatedEntries) && !(message.updatedEntries && $util.isInteger(message.updatedEntries.low) && $util.isInteger(message.updatedEntries.high))) + return "updatedEntries: integer|Long expected"; + if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) + if (!$util.isInteger(message.createdEntries) && !(message.createdEntries && $util.isInteger(message.createdEntries.low) && $util.isInteger(message.createdEntries.high))) + return "createdEntries: integer|Long expected"; + if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) + if (!$util.isInteger(message.unchangedEntries) && !(message.unchangedEntries && $util.isInteger(message.unchangedEntries.low) && $util.isInteger(message.unchangedEntries.high))) + return "unchangedEntries: integer|Long expected"; + if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) + if (!$util.isInteger(message.recreatedEntries) && !(message.recreatedEntries && $util.isInteger(message.recreatedEntries.low) && $util.isInteger(message.recreatedEntries.high))) + return "recreatedEntries: integer|Long expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + */ + ImportJobResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); + if (object.deletedEntries != null) + if ($util.Long) + (message.deletedEntries = $util.Long.fromValue(object.deletedEntries)).unsigned = false; + else if (typeof object.deletedEntries === "string") + message.deletedEntries = parseInt(object.deletedEntries, 10); + else if (typeof object.deletedEntries === "number") + message.deletedEntries = object.deletedEntries; + else if (typeof object.deletedEntries === "object") + message.deletedEntries = new $util.LongBits(object.deletedEntries.low >>> 0, object.deletedEntries.high >>> 0).toNumber(); + if (object.updatedEntries != null) + if ($util.Long) + (message.updatedEntries = $util.Long.fromValue(object.updatedEntries)).unsigned = false; + else if (typeof object.updatedEntries === "string") + message.updatedEntries = parseInt(object.updatedEntries, 10); + else if (typeof object.updatedEntries === "number") + message.updatedEntries = object.updatedEntries; + else if (typeof object.updatedEntries === "object") + message.updatedEntries = new $util.LongBits(object.updatedEntries.low >>> 0, object.updatedEntries.high >>> 0).toNumber(); + if (object.createdEntries != null) + if ($util.Long) + (message.createdEntries = $util.Long.fromValue(object.createdEntries)).unsigned = false; + else if (typeof object.createdEntries === "string") + message.createdEntries = parseInt(object.createdEntries, 10); + else if (typeof object.createdEntries === "number") + message.createdEntries = object.createdEntries; + else if (typeof object.createdEntries === "object") + message.createdEntries = new $util.LongBits(object.createdEntries.low >>> 0, object.createdEntries.high >>> 0).toNumber(); + if (object.unchangedEntries != null) + if ($util.Long) + (message.unchangedEntries = $util.Long.fromValue(object.unchangedEntries)).unsigned = false; + else if (typeof object.unchangedEntries === "string") + message.unchangedEntries = parseInt(object.unchangedEntries, 10); + else if (typeof object.unchangedEntries === "number") + message.unchangedEntries = object.unchangedEntries; + else if (typeof object.unchangedEntries === "object") + message.unchangedEntries = new $util.LongBits(object.unchangedEntries.low >>> 0, object.unchangedEntries.high >>> 0).toNumber(); + if (object.recreatedEntries != null) + if ($util.Long) + (message.recreatedEntries = $util.Long.fromValue(object.recreatedEntries)).unsigned = false; + else if (typeof object.recreatedEntries === "string") + message.recreatedEntries = parseInt(object.recreatedEntries, 10); + else if (typeof object.recreatedEntries === "number") + message.recreatedEntries = object.recreatedEntries; + else if (typeof object.recreatedEntries === "object") + message.recreatedEntries = new $util.LongBits(object.recreatedEntries.low >>> 0, object.recreatedEntries.high >>> 0).toNumber(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobResult.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} message ImportJobResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobResult.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.deletedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.deletedEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.updatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.updatedEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.createdEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.createdEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unchangedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unchangedEntries = options.longs === String ? "0" : 0; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.recreatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recreatedEntries = options.longs === String ? "0" : 0; + } + if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) + if (typeof message.deletedEntries === "number") + object.deletedEntries = options.longs === String ? String(message.deletedEntries) : message.deletedEntries; + else + object.deletedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.deletedEntries) : options.longs === Number ? new $util.LongBits(message.deletedEntries.low >>> 0, message.deletedEntries.high >>> 0).toNumber() : message.deletedEntries; + if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) + if (typeof message.updatedEntries === "number") + object.updatedEntries = options.longs === String ? String(message.updatedEntries) : message.updatedEntries; + else + object.updatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.updatedEntries) : options.longs === Number ? new $util.LongBits(message.updatedEntries.low >>> 0, message.updatedEntries.high >>> 0).toNumber() : message.updatedEntries; + if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) + if (typeof message.createdEntries === "number") + object.createdEntries = options.longs === String ? String(message.createdEntries) : message.createdEntries; + else + object.createdEntries = options.longs === String ? $util.Long.prototype.toString.call(message.createdEntries) : options.longs === Number ? new $util.LongBits(message.createdEntries.low >>> 0, message.createdEntries.high >>> 0).toNumber() : message.createdEntries; + if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) + if (typeof message.unchangedEntries === "number") + object.unchangedEntries = options.longs === String ? String(message.unchangedEntries) : message.unchangedEntries; + else + object.unchangedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.unchangedEntries) : options.longs === Number ? new $util.LongBits(message.unchangedEntries.low >>> 0, message.unchangedEntries.high >>> 0).toNumber() : message.unchangedEntries; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) + if (typeof message.recreatedEntries === "number") + object.recreatedEntries = options.longs === String ? String(message.recreatedEntries) : message.recreatedEntries; + else + object.recreatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.recreatedEntries) : options.longs === Number ? new $util.LongBits(message.recreatedEntries.low >>> 0, message.recreatedEntries.high >>> 0).toNumber() : message.recreatedEntries; + return object; + }; + + /** + * Converts this ImportJobResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + * @returns {Object.} JSON object + */ + ImportJobResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportJobResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"; + }; + + return ImportJobResult; + })(); + + MetadataJob.ImportJobSpec = (function() { + + /** + * Properties of an ImportJobSpec. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IImportJobSpec + * @property {string|null} [sourceStorageUri] ImportJobSpec sourceStorageUri + * @property {google.protobuf.ITimestamp|null} [sourceCreateTime] ImportJobSpec sourceCreateTime + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null} [scope] ImportJobSpec scope + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [entrySyncMode] ImportJobSpec entrySyncMode + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [aspectSyncMode] ImportJobSpec aspectSyncMode + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null} [logLevel] ImportJobSpec logLevel + */ + + /** + * Constructs a new ImportJobSpec. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents an ImportJobSpec. + * @implements IImportJobSpec + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set + */ + function ImportJobSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportJobSpec sourceStorageUri. + * @member {string} sourceStorageUri + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.sourceStorageUri = ""; + + /** + * ImportJobSpec sourceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} sourceCreateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.sourceCreateTime = null; + + /** + * ImportJobSpec scope. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null|undefined} scope + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.scope = null; + + /** + * ImportJobSpec entrySyncMode. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} entrySyncMode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.entrySyncMode = 0; + + /** + * ImportJobSpec aspectSyncMode. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} aspectSyncMode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.aspectSyncMode = 0; + + /** + * ImportJobSpec logLevel. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel} logLevel + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.logLevel = 0; + + /** + * Creates a new ImportJobSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec instance + */ + ImportJobSpec.create = function create(properties) { + return new ImportJobSpec(properties); + }; + + /** + * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceStorageUri != null && Object.hasOwnProperty.call(message, "sourceStorageUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceStorageUri); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.encode(message.scope, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entrySyncMode != null && Object.hasOwnProperty.call(message, "entrySyncMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entrySyncMode); + if (message.aspectSyncMode != null && Object.hasOwnProperty.call(message, "aspectSyncMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aspectSyncMode); + if (message.sourceCreateTime != null && Object.hasOwnProperty.call(message, "sourceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.sourceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.logLevel); + return writer; + }; + + /** + * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceStorageUri = reader.string(); + break; + } + case 5: { + message.sourceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.decode(reader, reader.uint32()); + break; + } + case 3: { + message.entrySyncMode = reader.int32(); + break; + } + case 4: { + message.aspectSyncMode = reader.int32(); + break; + } + case 6: { + message.logLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJobSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) + if (!$util.isString(message.sourceStorageUri)) + return "sourceStorageUri: string expected"; + if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.sourceCreateTime); + if (error) + return "sourceCreateTime." + error; + } + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) + switch (message.entrySyncMode) { + default: + return "entrySyncMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) + switch (message.aspectSyncMode) { + default: + return "aspectSyncMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + */ + ImportJobSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); + if (object.sourceStorageUri != null) + message.sourceStorageUri = String(object.sourceStorageUri); + if (object.sourceCreateTime != null) { + if (typeof object.sourceCreateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.sourceCreateTime: object expected"); + message.sourceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceCreateTime); + } + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.scope: object expected"); + message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.fromObject(object.scope); + } + switch (object.entrySyncMode) { + default: + if (typeof object.entrySyncMode === "number") { + message.entrySyncMode = object.entrySyncMode; + break; + } + break; + case "SYNC_MODE_UNSPECIFIED": + case 0: + message.entrySyncMode = 0; + break; + case "FULL": + case 1: + message.entrySyncMode = 1; + break; + case "INCREMENTAL": + case 2: + message.entrySyncMode = 2; + break; + } + switch (object.aspectSyncMode) { + default: + if (typeof object.aspectSyncMode === "number") { + message.aspectSyncMode = object.aspectSyncMode; + break; + } + break; + case "SYNC_MODE_UNSPECIFIED": + case 0: + message.aspectSyncMode = 0; + break; + case "FULL": + case 1: + message.aspectSyncMode = 1; + break; + case "INCREMENTAL": + case 2: + message.aspectSyncMode = 2; + break; + } + switch (object.logLevel) { + default: + if (typeof object.logLevel === "number") { + message.logLevel = object.logLevel; + break; + } + break; + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "DEBUG": + case 1: + message.logLevel = 1; + break; + case "INFO": + case 2: + message.logLevel = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} message ImportJobSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceStorageUri = ""; + object.scope = null; + object.entrySyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; + object.aspectSyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; + object.sourceCreateTime = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + } + if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) + object.sourceStorageUri = message.sourceStorageUri; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.toObject(message.scope, options); + if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) + object.entrySyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] === undefined ? message.entrySyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] : message.entrySyncMode; + if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) + object.aspectSyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] === undefined ? message.aspectSyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] : message.aspectSyncMode; + if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) + object.sourceCreateTime = $root.google.protobuf.Timestamp.toObject(message.sourceCreateTime, options); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] === undefined ? message.logLevel : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] : message.logLevel; + return object; + }; + + /** + * Converts this ImportJobSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + * @returns {Object.} JSON object + */ + ImportJobSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportJobSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"; + }; + + /** + * SyncMode enum. + * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode + * @enum {number} + * @property {number} SYNC_MODE_UNSPECIFIED=0 SYNC_MODE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} INCREMENTAL=2 INCREMENTAL value + */ + ImportJobSpec.SyncMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYNC_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "INCREMENTAL"] = 2; + return values; + })(); + + /** + * LogLevel enum. + * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel + * @enum {number} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} DEBUG=1 DEBUG value + * @property {number} INFO=2 INFO value + */ + ImportJobSpec.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEBUG"] = 1; + values[valuesById[2] = "INFO"] = 2; + return values; + })(); + + ImportJobSpec.ImportJobScope = (function() { + + /** + * Properties of an ImportJobScope. + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @interface IImportJobScope + * @property {Array.|null} [entryGroups] ImportJobScope entryGroups + * @property {Array.|null} [entryTypes] ImportJobScope entryTypes + * @property {Array.|null} [aspectTypes] ImportJobScope aspectTypes + */ + + /** + * Constructs a new ImportJobScope. + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @classdesc Represents an ImportJobScope. + * @implements IImportJobScope + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set + */ + function ImportJobScope(properties) { + this.entryGroups = []; + this.entryTypes = []; + this.aspectTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImportJobScope entryGroups. + * @member {Array.} entryGroups + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.entryGroups = $util.emptyArray; + + /** + * ImportJobScope entryTypes. + * @member {Array.} entryTypes + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.entryTypes = $util.emptyArray; + + /** + * ImportJobScope aspectTypes. + * @member {Array.} aspectTypes + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.aspectTypes = $util.emptyArray; + + /** + * Creates a new ImportJobScope instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope instance + */ + ImportJobScope.create = function create(properties) { + return new ImportJobScope(properties); + }; + + /** + * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobScope.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entryGroups[i]); + if (message.entryTypes != null && message.entryTypes.length) + for (var i = 0; i < message.entryTypes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryTypes[i]); + if (message.aspectTypes != null && message.aspectTypes.length) + for (var i = 0; i < message.aspectTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); + return writer; + }; + + /** + * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobScope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobScope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.entryGroups && message.entryGroups.length)) + message.entryGroups = []; + message.entryGroups.push(reader.string()); + break; + } + case 2: { + if (!(message.entryTypes && message.entryTypes.length)) + message.entryTypes = []; + message.entryTypes.push(reader.string()); + break; + } + case 3: { + if (!(message.aspectTypes && message.aspectTypes.length)) + message.aspectTypes = []; + message.aspectTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobScope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJobScope message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobScope.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) + if (!$util.isString(message.entryGroups[i])) + return "entryGroups: string[] expected"; + } + if (message.entryTypes != null && message.hasOwnProperty("entryTypes")) { + if (!Array.isArray(message.entryTypes)) + return "entryTypes: array expected"; + for (var i = 0; i < message.entryTypes.length; ++i) + if (!$util.isString(message.entryTypes[i])) + return "entryTypes: string[] expected"; + } + if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { + if (!Array.isArray(message.aspectTypes)) + return "aspectTypes: array expected"; + for (var i = 0; i < message.aspectTypes.length; ++i) + if (!$util.isString(message.aspectTypes[i])) + return "aspectTypes: string[] expected"; + } + return null; + }; + + /** + * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + */ + ImportJobScope.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); + if (object.entryGroups) { + if (!Array.isArray(object.entryGroups)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryGroups: array expected"); + message.entryGroups = []; + for (var i = 0; i < object.entryGroups.length; ++i) + message.entryGroups[i] = String(object.entryGroups[i]); + } + if (object.entryTypes) { + if (!Array.isArray(object.entryTypes)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryTypes: array expected"); + message.entryTypes = []; + for (var i = 0; i < object.entryTypes.length; ++i) + message.entryTypes[i] = String(object.entryTypes[i]); + } + if (object.aspectTypes) { + if (!Array.isArray(object.aspectTypes)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.aspectTypes: array expected"); + message.aspectTypes = []; + for (var i = 0; i < object.aspectTypes.length; ++i) + message.aspectTypes[i] = String(object.aspectTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} message ImportJobScope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobScope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.entryGroups = []; + object.entryTypes = []; + object.aspectTypes = []; + } + if (message.entryGroups && message.entryGroups.length) { + object.entryGroups = []; + for (var j = 0; j < message.entryGroups.length; ++j) + object.entryGroups[j] = message.entryGroups[j]; + } + if (message.entryTypes && message.entryTypes.length) { + object.entryTypes = []; + for (var j = 0; j < message.entryTypes.length; ++j) + object.entryTypes[j] = message.entryTypes[j]; + } + if (message.aspectTypes && message.aspectTypes.length) { + object.aspectTypes = []; + for (var j = 0; j < message.aspectTypes.length; ++j) + object.aspectTypes[j] = message.aspectTypes[j]; + } + return object; + }; + + /** + * Converts this ImportJobScope to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + * @returns {Object.} JSON object + */ + ImportJobScope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportJobScope + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"; + }; + + return ImportJobScope; + })(); + + return ImportJobSpec; + })(); + + /** + * Type enum. + * @name google.cloud.dataplex.v1.MetadataJob.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} IMPORT=1 IMPORT value + */ + MetadataJob.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPORT"] = 1; + return values; + })(); + + MetadataJob.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IStatus + * @property {google.cloud.dataplex.v1.MetadataJob.Status.State|null} [state] Status state + * @property {string|null} [message] Status message + * @property {number|null} [completionPercent] Status completionPercent + * @property {google.protobuf.ITimestamp|null} [updateTime] Status updateTime + */ + + /** + * Constructs a new Status. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set + */ + function Status(properties) { + if (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 state. + * @member {google.cloud.dataplex.v1.MetadataJob.Status.State} state + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.state = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status completionPercent. + * @member {number} completionPercent + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.completionPercent = 0; + + /** + * Status updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.updateTime = null; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.completionPercent != null && Object.hasOwnProperty.call(message, "completionPercent")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.completionPercent); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.completionPercent = reader.int32(); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.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.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) + if (!$util.isInteger(message.completionPercent)) + return "completionPercent: integer expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.Status) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.Status(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "QUEUED": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "CANCELING": + case 3: + message.state = 3; + break; + case "CANCELED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "SUCCEEDED_WITH_ERRORS": + case 7: + message.state = 7; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.completionPercent != null) + message.completionPercent = object.completionPercent | 0; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.Status.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.completionPercent = 0; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) + object.completionPercent = message.completionPercent; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.MetadataJob.Status.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} QUEUED=1 QUEUED value + * @property {number} RUNNING=2 RUNNING value + * @property {number} CANCELING=3 CANCELING value + * @property {number} CANCELED=4 CANCELED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + * @property {number} SUCCEEDED_WITH_ERRORS=7 SUCCEEDED_WITH_ERRORS value + */ + Status.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUEUED"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "CANCELING"] = 3; + values[valuesById[4] = "CANCELED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "SUCCEEDED_WITH_ERRORS"] = 7; + return values; + })(); + + return Status; + })(); + + return MetadataJob; + })(); + + /** + * EntryView enum. + * @name google.cloud.dataplex.v1.EntryView + * @enum {number} + * @property {number} ENTRY_VIEW_UNSPECIFIED=0 ENTRY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + * @property {number} CUSTOM=3 CUSTOM value + * @property {number} ALL=4 ALL value + */ + v1.EntryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTRY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[3] = "CUSTOM"] = 3; + values[valuesById[4] = "ALL"] = 4; + return values; + })(); + + /** + * TransferStatus enum. + * @name google.cloud.dataplex.v1.TransferStatus + * @enum {number} + * @property {number} TRANSFER_STATUS_UNSPECIFIED=0 TRANSFER_STATUS_UNSPECIFIED value + * @property {number} TRANSFER_STATUS_MIGRATED=1 TRANSFER_STATUS_MIGRATED value + * @property {number} TRANSFER_STATUS_TRANSFERRED=2 TRANSFER_STATUS_TRANSFERRED value + */ + v1.TransferStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFER_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSFER_STATUS_MIGRATED"] = 1; + values[valuesById[2] = "TRANSFER_STATUS_TRANSFERRED"] = 2; + return values; + })(); + + v1.DataplexService = (function() { + + /** + * Constructs a new DataplexService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataplexService + * @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 DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; + + /** + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService + * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. + */ + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + */ + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake + */ + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); + + /** + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); + + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); + + /** + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); + + /** + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + */ + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); + + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone + */ + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); + + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); + + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); + + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); + + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); + + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + */ + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); + + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset + */ + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); + + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); + + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); + + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); + + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); + + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + */ + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); + + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task + */ + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); + + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + */ + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); + + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef RunTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.RunTaskResponse} [response] RunTaskResponse + */ + + /** + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.RunTaskCallback} callback Node-style callback called with the error, if any, and RunTaskResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.runTask = function runTask(request, callback) { + return this.rpcCall(runTask, $root.google.cloud.dataplex.v1.RunTaskRequest, $root.google.cloud.dataplex.v1.RunTaskResponse, request, callback); + }, "name", { value: "RunTask" }); + + /** + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job + */ + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); + + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListSessionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse + */ + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { + return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); + }, "name", { value: "ListSessions" }); + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataplexService; + })(); + + v1.CreateLakeRequest = (function() { + + /** + * Properties of a CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + */ + + /** + * Constructs a new CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + */ + function CreateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateLakeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.parent = ""; + + /** + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lakeId = ""; + + /** + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.lake = null; + + /** + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + */ + CreateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + */ + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); + }; + + /** + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.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.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.lakeId = reader.string(); + break; + } + case 3: { + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateLakeRequest.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.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + */ + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; + }; + + return CreateLakeRequest; + })(); + + v1.UpdateLakeRequest = (function() { + + /** + * Properties of an UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + */ + + /** + * Constructs a new UpdateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + */ + function UpdateLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.updateMask = null; + + /** + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.lake = null; + + /** + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + */ + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); + }; + + /** + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateLakeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + */ + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateLakeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.lake = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; + }; + + return UpdateLakeRequest; + })(); + + v1.DeleteLakeRequest = (function() { + + /** + * Properties of a DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name + */ + + /** + * Constructs a new DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + */ + function DeleteLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + */ + DeleteLakeRequest.prototype.name = ""; + + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + */ + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); + }; + + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encode = function encode(message, writer) { + 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 DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + 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 DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLakeRequest.verify = function verify(message) { + if (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 DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + */ + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLakeRequest.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 DeleteLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; + }; + + return DeleteLakeRequest; + })(); + + v1.ListLakesRequest = (function() { + + /** + * Properties of a ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy + */ + + /** + * Constructs a new ListLakesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + */ + function ListLakesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.parent = ""; + + /** + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageSize = 0; + + /** + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageToken = ""; + + /** + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.filter = ""; + + /** + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListLakesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance + */ + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); + }; + + /** + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + */ + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListLakesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLakesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; + }; + + return ListLakesRequest; + })(); + + v1.ListLakesResponse = (function() { + + /** + * Properties of a ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations + */ + + /** + * Constructs a new ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + */ + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.lakes = $util.emptyArray; + + /** + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.nextPageToken = ""; + + /** + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance + */ + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); + }; + + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + */ + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListLakesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLakesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLakesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; + }; + + return ListLakesResponse; + })(); + + v1.ListLakeActionsRequest = (function() { + + /** + * Properties of a ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken + */ + + /** + * Constructs a new ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + */ + function ListLakeActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.parent = ""; + + /** + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageSize = 0; + + /** + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance + */ + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); + }; + + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.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 ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + 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 ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListLakeActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakeActionsRequest.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 ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + */ + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + 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 ListLakeActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakeActionsRequest.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 ListLakeActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListLakeActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListLakeActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; + }; + + return ListLakeActionsRequest; + })(); + + v1.ListActionsResponse = (function() { + + /** + * Properties of a ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken + */ + + /** + * Constructs a new ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + */ + function ListActionsResponse(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.actions = $util.emptyArray; + + /** + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListActionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance + */ + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); + }; + + /** + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + */ + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListActionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListActionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; + }; + + return ListActionsResponse; + })(); + + v1.GetLakeRequest = (function() { + + /** + * Properties of a GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name + */ + + /** + * Constructs a new GetLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + */ + function GetLakeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + */ + GetLakeRequest.prototype.name = ""; + + /** + * Creates a new GetLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance + */ + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); + }; + + /** + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encode = function encode(message, writer) { + 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 GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + 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 GetLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLakeRequest.verify = function verify(message) { + if (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 GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + */ + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLakeRequest.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 GetLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @instance + * @returns {Object.} JSON object + */ + GetLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; + }; + + return GetLakeRequest; + })(); + + v1.CreateZoneRequest = (function() { + + /** + * Properties of a CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly + */ + + /** + * Constructs a new CreateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + */ + function CreateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateZoneRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.parent = ""; + + /** + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zoneId = ""; + + /** + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zone = null; + + /** + * CreateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + */ + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); + }; + + /** + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.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.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.zoneId = reader.string(); + break; + } + case 3: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateZoneRequest.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.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + */ + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.zoneId = ""; + object.zone = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + CreateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; + }; + + return CreateZoneRequest; + })(); + + v1.UpdateZoneRequest = (function() { + + /** + * Properties of an UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly + */ + + /** + * Constructs a new UpdateZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + */ + function UpdateZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateZoneRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.updateMask = null; + + /** + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.zone = null; + + /** + * UpdateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + */ + UpdateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance + */ + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); + }; + + /** + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + */ + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.zone = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; + }; + + return UpdateZoneRequest; + })(); + + v1.DeleteZoneRequest = (function() { + + /** + * Properties of a DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name + */ + + /** + * Constructs a new DeleteZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + */ + function DeleteZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + */ + DeleteZoneRequest.prototype.name = ""; + + /** + * Creates a new DeleteZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance + */ + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); + }; + + /** + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encode = function encode(message, writer) { + 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 DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + 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 DeleteZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteZoneRequest.verify = function verify(message) { + if (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 DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + */ + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteZoneRequest.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 DeleteZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; + }; + + return DeleteZoneRequest; + })(); + + v1.ListZonesRequest = (function() { + + /** + * Properties of a ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy + */ + + /** + * Constructs a new ListZonesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + */ + function ListZonesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.parent = ""; + + /** + * ListZonesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageSize = 0; + + /** + * ListZonesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageToken = ""; + + /** + * ListZonesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.filter = ""; + + /** + * ListZonesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListZonesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance + */ + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); + }; + + /** + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + */ + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListZonesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + * @returns {Object.} JSON object + */ + ListZonesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListZonesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; + }; + + return ListZonesRequest; + })(); + + v1.ListZonesResponse = (function() { + + /** + * Properties of a ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken + */ + + /** + * Constructs a new ListZonesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + */ + function ListZonesResponse(properties) { + this.zones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.zones = $util.emptyArray; + + /** + * ListZonesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + */ + ListZonesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListZonesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance + */ + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); + }; + + /** + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZonesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZonesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + if (error) + return "zones." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + */ + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZonesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.zones = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListZonesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @instance + * @returns {Object.} JSON object + */ + ListZonesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListZonesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; + }; + + return ListZonesResponse; + })(); + + v1.ListZoneActionsRequest = (function() { + + /** + * Properties of a ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + */ + + /** + * Constructs a new ListZoneActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + */ + function ListZoneActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListZoneActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.parent = ""; + + /** + * ListZoneActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageSize = 0; + + /** + * ListZoneActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + */ + ListZoneActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListZoneActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance + */ + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); + }; + + /** + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.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 ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + 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 ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListZoneActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListZoneActionsRequest.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 ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + */ + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + 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 ListZoneActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListZoneActionsRequest.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 ListZoneActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListZoneActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListZoneActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; + }; + + return ListZoneActionsRequest; + })(); + + v1.GetZoneRequest = (function() { + + /** + * Properties of a GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name + */ + + /** + * Constructs a new GetZoneRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + */ + function GetZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + */ + GetZoneRequest.prototype.name = ""; + + /** + * Creates a new GetZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + */ + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); + }; + + /** + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encode = function encode(message, writer) { + 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 GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + 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 GetZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetZoneRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetZoneRequest.verify = function verify(message) { + if (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 GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + */ + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetZoneRequest.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 GetZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @instance + * @returns {Object.} JSON object + */ + GetZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetZoneRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; + }; + + return GetZoneRequest; + })(); + + v1.CreateAssetRequest = (function() { + + /** + * Properties of a CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + */ + + /** + * Constructs a new CreateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + */ + function CreateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.parent = ""; + + /** + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.assetId = ""; + + /** + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; + + /** + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + */ + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); + }; + + /** + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.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.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.assetId = reader.string(); + break; + } + case 3: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAssetRequest.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.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + */ + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; + }; + + return CreateAssetRequest; + })(); + + v1.UpdateAssetRequest = (function() { + + /** + * Properties of an UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + */ + + /** + * Constructs a new UpdateAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + */ + function UpdateAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.updateMask = null; + + /** + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.asset = null; + + /** + * UpdateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance + */ + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); + }; + + /** + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAssetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + */ + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAssetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.asset = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; + }; + + return UpdateAssetRequest; + })(); + + v1.DeleteAssetRequest = (function() { + + /** + * Properties of a DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name + */ + + /** + * Constructs a new DeleteAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + */ + function DeleteAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + */ + DeleteAssetRequest.prototype.name = ""; + + /** + * Creates a new DeleteAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance + */ + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); + }; + + /** + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encode = function encode(message, writer) { + 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 DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + 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 DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAssetRequest.verify = function verify(message) { + if (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 DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + */ + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAssetRequest.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 DeleteAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; + }; + + return DeleteAssetRequest; + })(); + + v1.ListAssetsRequest = (function() { + + /** + * Properties of a ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + */ + + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.parent = ""; + + /** + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageSize = 0; + + /** + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; + + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + */ + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAssetsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; + }; + + return ListAssetsRequest; + })(); + + v1.ListAssetsResponse = (function() { + + /** + * Properties of a ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + */ + + /** + * Constructs a new ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + */ + function ListAssetsResponse(properties) { + this.assets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.assets = $util.emptyArray; + + /** + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + */ + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); + }; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + */ + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.assets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAssetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAssetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAssetsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; + }; + + return ListAssetsResponse; + })(); + + v1.ListAssetActionsRequest = (function() { + + /** + * Properties of a ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + */ + + /** + * Constructs a new ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + */ + function ListAssetActionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.parent = ""; + + /** + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageSize = 0; + + /** + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + */ + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); + }; + + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.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 ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + 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 ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetActionsRequest.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 ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + */ + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + 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 ListAssetActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetActionsRequest.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 ListAssetActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAssetActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; + }; + + return ListAssetActionsRequest; + })(); + + v1.GetAssetRequest = (function() { + + /** + * Properties of a GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name + */ + + /** + * Constructs a new GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + */ + function GetAssetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + */ + GetAssetRequest.prototype.name = ""; + + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + */ + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); + }; + + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encode = function encode(message, writer) { + 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 GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + 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 GetAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAssetRequest.verify = function verify(message) { + if (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 GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + */ + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAssetRequest.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 GetAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + * @returns {Object.} JSON object + */ + GetAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; + }; + + return GetAssetRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.dataplex.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + 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.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.CreateTaskRequest = (function() { + + /** + * Properties of a CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + */ + + /** + * Constructs a new CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + */ + function CreateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTaskRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.parent = ""; + + /** + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskId = ""; + + /** + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.task = null; + + /** + * CreateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + */ + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); + }; + + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskRequest.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.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + */ + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.taskId = ""; + object.task = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; + }; + + return CreateTaskRequest; + })(); + + v1.UpdateTaskRequest = (function() { + + /** + * Properties of an UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + */ + + /** + * Constructs a new UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + */ + function UpdateTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTaskRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.updateMask = null; + + /** + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.task = null; + + /** + * UpdateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + */ + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); + }; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + */ + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.task = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; + }; + + return UpdateTaskRequest; + })(); + + v1.DeleteTaskRequest = (function() { + + /** + * Properties of a DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name + */ + + /** + * Constructs a new DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + */ + function DeleteTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + */ + DeleteTaskRequest.prototype.name = ""; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + */ + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); + }; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encode = function encode(message, writer) { + 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 DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + 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 DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTaskRequest.verify = function verify(message) { + if (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 DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + */ + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTaskRequest.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 DeleteTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; + }; + + return DeleteTaskRequest; + })(); + + v1.ListTasksRequest = (function() { + + /** + * Properties of a ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy + */ + + /** + * Constructs a new ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + */ + function ListTasksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.parent = ""; + + /** + * ListTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageSize = 0; + + /** + * ListTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageToken = ""; + + /** + * ListTasksRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.filter = ""; + + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + */ + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); + }; + + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + */ + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListTasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTasksRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; + }; + + return ListTasksRequest; + })(); + + v1.ListTasksResponse = (function() { + + /** + * Properties of a ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + */ + + /** + * Constructs a new ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + */ + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.tasks = $util.emptyArray; + + /** + * ListTasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.nextPageToken = ""; + + /** + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + */ + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); + }; + + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); + if (error) + return "tasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + */ + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListTasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTasksResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; + }; + + return ListTasksResponse; + })(); + + v1.GetTaskRequest = (function() { + + /** + * Properties of a GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name + */ + + /** + * Constructs a new GetTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + */ + function GetTaskRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + */ + GetTaskRequest.prototype.name = ""; + + /** + * Creates a new GetTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + */ + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); + }; + + /** + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encode = function encode(message, writer) { + 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 GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + 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 GetTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTaskRequest.verify = function verify(message) { + if (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 GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + */ + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTaskRequest.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 GetTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; + }; + + return GetTaskRequest; + })(); + + v1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encode = function encode(message, writer) { + 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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + 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 GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.verify = function verify(message) { + if (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 GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobRequest.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 GetJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; + }; + + return GetJobRequest; + })(); + + v1.RunTaskRequest = (function() { + + /** + * Properties of a RunTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IRunTaskRequest + * @property {string|null} [name] RunTaskRequest name + * @property {Object.|null} [labels] RunTaskRequest labels + * @property {Object.|null} [args] RunTaskRequest args + */ + + /** + * Constructs a new RunTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunTaskRequest. + * @implements IRunTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + */ + function RunTaskRequest(properties) { + this.labels = {}; + this.args = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + */ + RunTaskRequest.prototype.name = ""; + + /** + * RunTaskRequest labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + */ + RunTaskRequest.prototype.labels = $util.emptyObject; + + /** + * RunTaskRequest args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + */ + RunTaskRequest.prototype.args = $util.emptyObject; + + /** + * Creates a new RunTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest instance + */ + RunTaskRequest.create = function create(properties) { + return new RunTaskRequest(properties); + }; + + /** + * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + 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 4: { + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunTaskRequest.verify = function verify(message) { + if (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.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.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + */ + RunTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.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.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.RunTaskRequest} message RunTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.args = {}; + } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + return object; + }; + + /** + * Converts this RunTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + * @returns {Object.} JSON object + */ + RunTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskRequest"; + }; + + return RunTaskRequest; + })(); + + v1.RunTaskResponse = (function() { + + /** + * Properties of a RunTaskResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IRunTaskResponse + * @property {google.cloud.dataplex.v1.IJob|null} [job] RunTaskResponse job + */ + + /** + * Constructs a new RunTaskResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunTaskResponse. + * @implements IRunTaskResponse + * @constructor + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + */ + function RunTaskResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunTaskResponse job. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} job + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @instance + */ + RunTaskResponse.prototype.job = null; + + /** + * Creates a new RunTaskResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse instance + */ + RunTaskResponse.create = function create(properties) { + return new RunTaskResponse(properties); + }; + + /** + * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.dataplex.v1.Job.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.job = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunTaskResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; + + /** + * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + */ + RunTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskResponse.job: object expected"); + message.job = $root.google.cloud.dataplex.v1.Job.fromObject(object.job); + } + return message; + }; + + /** + * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.RunTaskResponse} message RunTaskResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunTaskResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.job = null; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.dataplex.v1.Job.toObject(message.job, options); + return object; + }; + + /** + * Converts this RunTaskResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @instance + * @returns {Object.} JSON object + */ + RunTaskResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunTaskResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskResponse"; + }; + + return RunTaskResponse; + })(); + + v1.ListJobsRequest = (function() { + + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + */ + + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; + + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; + + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; + + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.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 ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + 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 ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + 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 ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.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 ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + }; + + return ListJobsRequest; + })(); + + v1.ListJobsResponse = (function() { + + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + */ + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); + }; + + /** + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + }; + + return ListJobsResponse; + })(); + + v1.CancelJobRequest = (function() { + + /** + * Properties of a CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name + */ + + /** + * Constructs a new CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + */ + function CancelJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + */ + CancelJobRequest.prototype.name = ""; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + */ + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); + }; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encode = function encode(message, writer) { + 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 CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + 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 CancelJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelJobRequest.verify = function verify(message) { + if (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 CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + */ + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelJobRequest.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 CancelJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; + }; + + return CancelJobRequest; + })(); + + v1.CreateEnvironmentRequest = (function() { + + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly + */ + + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environmentId. + * @member {string} environmentId + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environmentId = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * CreateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environmentId = reader.string(); + break; + } + case 3: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + if (!$util.isString(message.environmentId)) + return "environmentId: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environmentId != null) + message.environmentId = String(object.environmentId); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environmentId = ""; + object.environment = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + object.environmentId = message.environmentId; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + }; + + return CreateEnvironmentRequest; + })(); + + v1.UpdateEnvironmentRequest = (function() { + + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEnvironmentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly + */ + + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; + + /** + * UpdateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.environment = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + }; + + return UpdateEnvironmentRequest; + })(); + + v1.DeleteEnvironmentRequest = (function() { + + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + }; + + return DeleteEnvironmentRequest; + })(); + + v1.ListEnvironmentsRequest = (function() { + + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @property {string|null} [filter] ListEnvironmentsRequest filter + * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy + */ + + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; + + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * ListEnvironmentsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.filter = ""; + + /** + * ListEnvironmentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + }; + + return ListEnvironmentsRequest; + })(); + + v1.ListEnvironmentsResponse = (function() { + + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ + + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dataplex.v1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + }; + + return ListEnvironmentsResponse; + })(); + + v1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; + }; + + return GetEnvironmentRequest; + })(); + + v1.ListSessionsRequest = (function() { + + /** + * Properties of a ListSessionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListSessionsRequest + * @property {string|null} [parent] ListSessionsRequest parent + * @property {number|null} [pageSize] ListSessionsRequest pageSize + * @property {string|null} [pageToken] ListSessionsRequest pageToken + * @property {string|null} [filter] ListSessionsRequest filter + */ + + /** + * Constructs a new ListSessionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListSessionsRequest. + * @implements IListSessionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + */ + function ListSessionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSessionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.parent = ""; + + /** + * ListSessionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.pageSize = 0; + + /** + * ListSessionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.pageToken = ""; + + /** + * ListSessionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.filter = ""; + + /** + * Creates a new ListSessionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance + */ + ListSessionsRequest.create = function create(properties) { + return new ListSessionsRequest(properties); + }; + + /** + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsRequest.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 ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSessionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + 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 ListSessionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSessionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionsRequest.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 ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + */ + ListSessionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + 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 ListSessionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionsRequest.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 ListSessionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSessionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSessionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; + }; + + return ListSessionsRequest; + })(); + + v1.ListSessionsResponse = (function() { + + /** + * Properties of a ListSessionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListSessionsResponse + * @property {Array.|null} [sessions] ListSessionsResponse sessions + * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken + */ + + /** + * Constructs a new ListSessionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListSessionsResponse. + * @implements IListSessionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + */ + function ListSessionsResponse(properties) { + this.sessions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSessionsResponse sessions. + * @member {Array.} sessions + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.sessions = $util.emptyArray; + + /** + * ListSessionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSessionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance + */ + ListSessionsResponse.create = function create(properties) { + return new ListSessionsResponse(properties); + }; + + /** + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessions != null && message.sessions.length) + for (var i = 0; i < message.sessions.length; ++i) + $root.google.cloud.dataplex.v1.Session.encode(message.sessions[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 ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.sessions && message.sessions.length)) + message.sessions = []; + message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSessionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessions != null && message.hasOwnProperty("sessions")) { + if (!Array.isArray(message.sessions)) + return "sessions: array expected"; + for (var i = 0; i < message.sessions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); + if (error) + return "sessions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + */ + ListSessionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + if (object.sessions) { + if (!Array.isArray(object.sessions)) + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); + message.sessions = []; + for (var i = 0; i < object.sessions.length; ++i) { + if (typeof object.sessions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); + message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sessions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sessions && message.sessions.length) { + object.sessions = []; + for (var j = 0; j < message.sessions.length; ++j) + object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSessionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSessionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSessionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; + }; + + return ListSessionsResponse; + })(); + + v1.Task = (function() { + + /** + * Properties of a Task. + * @memberof google.cloud.dataplex.v1 + * @interface ITask + * @property {string|null} [name] Task name + * @property {string|null} [uid] Task uid + * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime + * @property {string|null} [description] Task description + * @property {string|null} [displayName] Task displayName + * @property {google.cloud.dataplex.v1.State|null} [state] Task state + * @property {Object.|null} [labels] Task labels + * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus + * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook + */ + + /** + * Constructs a new Task. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Task. + * @implements ITask + * @constructor + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + */ + function Task(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]]; + } + + /** + * Task name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.name = ""; + + /** + * Task uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.uid = ""; + + /** + * Task createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.createTime = null; + + /** + * Task updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.updateTime = null; + + /** + * Task description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.description = ""; + + /** + * Task displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.displayName = ""; + + /** + * Task state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.state = 0; + + /** + * Task labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.labels = $util.emptyObject; + + /** + * Task triggerSpec. + * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.triggerSpec = null; + + /** + * Task executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionSpec = null; + + /** + * Task executionStatus. + * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionStatus = null; + + /** + * Task spark. + * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.spark = null; + + /** + * Task notebook. + * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.notebook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Task config. + * @member {"spark"|"notebook"|undefined} config + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Object.defineProperty(Task.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Task instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task} Task instance + */ + Task.create = function create(properties) { + return new Task(properties); + }; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) + $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) + $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Task message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 100: { + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 201: { + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); + break; + } + case 300: { + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; + } + case 302: { + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Task message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Task.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (error) + return "triggerSpec." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } + if (message.spark != null && message.hasOwnProperty("spark")) { + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); + if (error) + return "spark." + error; + } + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.config === 1) + return "config: multiple values"; + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); + if (error) + return "notebook." + error; + } + } + return null; + }; + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task} Task + */ + Task.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task) + return object; + var message = new $root.google.cloud.dataplex.v1.Task(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.dataplex.v1.Task.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.triggerSpec != null) { + if (typeof object.triggerSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); + } + if (object.spark != null) { + if (typeof object.spark !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); + } + return message; + }; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.Task} message Task + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Task.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.triggerSpec = null; + object.executionSpec = null; + object.executionStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) + object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); + if (message.spark != null && message.hasOwnProperty("spark")) { + object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); + if (options.oneofs) + object.config = "spark"; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); + if (options.oneofs) + object.config = "notebook"; + } + return object; + }; + + /** + * Converts this Task to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task + * @instance + * @returns {Object.} JSON object + */ + Task.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Task + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; + }; + + Task.InfrastructureSpec = (function() { + + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork + */ + + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfrastructureSpec batch. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.batch = null; + + /** + * InfrastructureSpec containerImage. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.containerImage = null; + + /** + * InfrastructureSpec vpcNetwork. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.vpcNetwork = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"batch"|undefined} resources + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["batch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"containerImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["containerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec network. + * @member {"vpcNetwork"|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "network", { + get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 52: { + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + } + case 101: { + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + } + case 150: { + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); + if (error) + return "batch." + error; + } + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); + if (error) + return "containerImage." + error; + } + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + properties.network = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); + if (error) + return "vpcNetwork." + error; + } + } + return null; + }; + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); + } + if (object.containerImage != null) { + if (typeof object.containerImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); + } + if (object.vpcNetwork != null) { + if (typeof object.vpcNetwork !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); + } + return message; + }; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); + if (options.oneofs) + object.resources = "batch"; + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); + if (options.oneofs) + object.runtime = "containerImage"; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); + if (options.oneofs) + object.network = "vpcNetwork"; + } + return object; + }; + + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; + }; + + InfrastructureSpec.BatchComputeResources = (function() { + + /** + * Properties of a BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IBatchComputeResources + * @property {number|null} [executorsCount] BatchComputeResources executorsCount + * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount + */ + + /** + * Constructs a new BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a BatchComputeResources. + * @implements IBatchComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + */ + function BatchComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchComputeResources executorsCount. + * @member {number} executorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.executorsCount = 0; + + /** + * BatchComputeResources maxExecutorsCount. + * @member {number} maxExecutorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.maxExecutorsCount = 0; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance + */ + BatchComputeResources.create = function create(properties) { + return new BatchComputeResources(properties); + }; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); + if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); + return writer; + }; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.executorsCount = reader.int32(); + break; + } + case 2: { + message.maxExecutorsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + if (!$util.isInteger(message.executorsCount)) + return "executorsCount: integer expected"; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + if (!$util.isInteger(message.maxExecutorsCount)) + return "maxExecutorsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + */ + BatchComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + if (object.executorsCount != null) + message.executorsCount = object.executorsCount | 0; + if (object.maxExecutorsCount != null) + message.maxExecutorsCount = object.maxExecutorsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executorsCount = 0; + object.maxExecutorsCount = 0; + } + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + object.executorsCount = message.executorsCount; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + object.maxExecutorsCount = message.maxExecutorsCount; + return object; + }; + + /** + * Converts this BatchComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + * @returns {Object.} JSON object + */ + BatchComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; + }; + + return BatchComputeResources; + })(); + + InfrastructureSpec.ContainerImageRuntime = (function() { + + /** + * Properties of a ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IContainerImageRuntime + * @property {string|null} [image] ContainerImageRuntime image + * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars + * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages + * @property {Object.|null} [properties] ContainerImageRuntime properties + */ + + /** + * Constructs a new ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a ContainerImageRuntime. + * @implements IContainerImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + */ + function ContainerImageRuntime(properties) { + this.javaJars = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerImageRuntime image. + * @member {string} image + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.image = ""; + + /** + * ContainerImageRuntime javaJars. + * @member {Array.} javaJars + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.javaJars = $util.emptyArray; + + /** + * ContainerImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * ContainerImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance + */ + ContainerImageRuntime.create = function create(properties) { + return new ContainerImageRuntime(properties); + }; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); + if (message.javaJars != null && message.javaJars.length) + for (var i = 0; i < message.javaJars.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.image = reader.string(); + break; + } + case 2: { + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + 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.properties[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.javaJars != null && message.hasOwnProperty("javaJars")) { + if (!Array.isArray(message.javaJars)) + return "javaJars: array expected"; + for (var i = 0; i < message.javaJars.length; ++i) + if (!$util.isString(message.javaJars[i])) + return "javaJars: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + */ + ContainerImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.image != null) + message.image = String(object.image); + if (object.javaJars) { + if (!Array.isArray(object.javaJars)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); + message.javaJars = []; + for (var i = 0; i < object.javaJars.length; ++i) + message.javaJars[i] = String(object.javaJars[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaJars = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + object.image = ""; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + if (message.javaJars && message.javaJars.length) { + object.javaJars = []; + for (var j = 0; j < message.javaJars.length; ++j) + object.javaJars[j] = message.javaJars[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + * @returns {Object.} JSON object + */ + ContainerImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContainerImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; + }; + + return ContainerImageRuntime; + })(); + + InfrastructureSpec.VpcNetwork = (function() { + + /** + * Properties of a VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IVpcNetwork + * @property {string|null} [network] VpcNetwork network + * @property {string|null} [subNetwork] VpcNetwork subNetwork + * @property {Array.|null} [networkTags] VpcNetwork networkTags + */ + + /** + * Constructs a new VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a VpcNetwork. + * @implements IVpcNetwork + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + */ + function VpcNetwork(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcNetwork network. + * @member {string|null|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.network = null; + + /** + * VpcNetwork subNetwork. + * @member {string|null|undefined} subNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.subNetwork = null; + + /** + * VpcNetwork networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.networkTags = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcNetwork networkName. + * @member {"network"|"subNetwork"|undefined} networkName + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + Object.defineProperty(VpcNetwork.prototype, "networkName", { + get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + */ + VpcNetwork.create = function create(properties) { + return new VpcNetwork(properties); + }; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + return writer; + }; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subNetwork = reader.string(); + break; + } + case 3: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcNetwork message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcNetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties.networkName = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + if (properties.networkName === 1) + return "networkName: multiple values"; + properties.networkName = 1; + if (!$util.isString(message.subNetwork)) + return "subNetwork: string expected"; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + return null; + }; + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + */ + VpcNetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + if (object.network != null) + message.network = String(object.network); + if (object.subNetwork != null) + message.subNetwork = String(object.subNetwork); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcNetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object.networkName = "network"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + object.subNetwork = message.subNetwork; + if (options.oneofs) + object.networkName = "subNetwork"; + } + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + return object; + }; + + /** + * Converts this VpcNetwork to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + * @returns {Object.} JSON object + */ + VpcNetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcNetwork + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; + }; + + return VpcNetwork; + })(); + + return InfrastructureSpec; + })(); + + Task.TriggerSpec = (function() { + + /** + * Properties of a TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface ITriggerSpec + * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type + * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime + * @property {boolean|null} [disabled] TriggerSpec disabled + * @property {number|null} [maxRetries] TriggerSpec maxRetries + * @property {string|null} [schedule] TriggerSpec schedule + */ + + /** + * Constructs a new TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a TriggerSpec. + * @implements ITriggerSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + */ + function TriggerSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerSpec type. + * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.type = 0; + + /** + * TriggerSpec startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.startTime = null; + + /** + * TriggerSpec disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.disabled = false; + + /** + * TriggerSpec maxRetries. + * @member {number} maxRetries + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.maxRetries = 0; + + /** + * TriggerSpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TriggerSpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + Object.defineProperty(TriggerSpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + */ + TriggerSpec.create = function create(properties) { + return new TriggerSpec(properties); + }; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 7: { + message.maxRetries = reader.int32(); + break; + } + case 100: { + message.schedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + if (!$util.isInteger(message.maxRetries)) + return "maxRetries: integer expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + */ + TriggerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ON_DEMAND": + case 1: + message.type = 1; + break; + case "RECURRING": + case 2: + message.type = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.maxRetries != null) + message.maxRetries = object.maxRetries | 0; + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.maxRetries = 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + object.maxRetries = message.maxRetries; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this TriggerSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + * @returns {Object.} JSON object + */ + TriggerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} RECURRING=2 RECURRING value + */ + TriggerSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "RECURRING"] = 2; + return values; + })(); + + return TriggerSpec; + })(); + + Task.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionSpec + * @property {Object.|null} [args] ExecutionSpec args + * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {string|null} [project] ExecutionSpec project + * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + * @property {string|null} [kmsKey] ExecutionSpec kmsKey + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + this.args = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionSpec args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.args = $util.emptyObject; + + /** + * ExecutionSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.serviceAccount = ""; + + /** + * ExecutionSpec project. + * @member {string} project + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.project = ""; + + /** + * ExecutionSpec maxJobExecutionLifetime. + * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.maxJobExecutionLifetime = null; + + /** + * ExecutionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.kmsKey = ""; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); + if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) + $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 7: { + message.project = reader.string(); + break; + } + case 8: { + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.kmsKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); + if (error) + return "maxJobExecutionLifetime." + error; + } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); + if (object.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.project != null) + message.project = String(object.project); + if (object.maxJobExecutionLifetime != null) { + if (typeof object.maxJobExecutionLifetime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + } + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.args = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.project = ""; + object.maxJobExecutionLifetime = null; + object.kmsKey = ""; + } + var keys2; + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) + object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; + }; + + return ExecutionSpec; + })(); + + Task.SparkTaskConfig = (function() { + + /** + * Properties of a SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface ISparkTaskConfig + * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri + * @property {string|null} [mainClass] SparkTaskConfig mainClass + * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile + * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile + * @property {string|null} [sqlScript] SparkTaskConfig sqlScript + * @property {Array.|null} [fileUris] SparkTaskConfig fileUris + * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + */ + + /** + * Constructs a new SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a SparkTaskConfig. + * @implements ISparkTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + */ + function SparkTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SparkTaskConfig mainJarFileUri. + * @member {string|null|undefined} mainJarFileUri + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainJarFileUri = null; + + /** + * SparkTaskConfig mainClass. + * @member {string|null|undefined} mainClass + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainClass = null; + + /** + * SparkTaskConfig pythonScriptFile. + * @member {string|null|undefined} pythonScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.pythonScriptFile = null; + + /** + * SparkTaskConfig sqlScriptFile. + * @member {string|null|undefined} sqlScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScriptFile = null; + + /** + * SparkTaskConfig sqlScript. + * @member {string|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScript = null; + + /** + * SparkTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * SparkTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * SparkTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.infrastructureSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SparkTaskConfig driver. + * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + Object.defineProperty(SparkTaskConfig.prototype, "driver", { + get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + */ + SparkTaskConfig.create = function create(properties) { + return new SparkTaskConfig(properties); + }; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); + if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); + if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); + if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.mainJarFileUri = reader.string(); + break; + } + case 101: { + message.mainClass = reader.string(); + break; + } + case 102: { + message.pythonScriptFile = reader.string(); + break; + } + case 104: { + message.sqlScriptFile = reader.string(); + break; + } + case 105: { + message.sqlScript = reader.string(); + break; + } + case 3: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 4: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + case 6: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + properties.driver = 1; + if (!$util.isString(message.mainJarFileUri)) + return "mainJarFileUri: string expected"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.mainClass)) + return "mainClass: string expected"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.pythonScriptFile)) + return "pythonScriptFile: string expected"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScriptFile)) + return "sqlScriptFile: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + return null; + }; + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + */ + SparkTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + if (object.mainJarFileUri != null) + message.mainJarFileUri = String(object.mainJarFileUri); + if (object.mainClass != null) + message.mainClass = String(object.mainClass); + if (object.pythonScriptFile != null) + message.pythonScriptFile = String(object.pythonScriptFile); + if (object.sqlScriptFile != null) + message.sqlScriptFile = String(object.sqlScriptFile); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + return message; + }; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) + object.infrastructureSpec = null; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + object.mainJarFileUri = message.mainJarFileUri; + if (options.oneofs) + object.driver = "mainJarFileUri"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + object.mainClass = message.mainClass; + if (options.oneofs) + object.driver = "mainClass"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + object.pythonScriptFile = message.pythonScriptFile; + if (options.oneofs) + object.driver = "pythonScriptFile"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + object.sqlScriptFile = message.sqlScriptFile; + if (options.oneofs) + object.driver = "sqlScriptFile"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = message.sqlScript; + if (options.oneofs) + object.driver = "sqlScript"; + } + return object; + }; + + /** + * Converts this SparkTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + * @returns {Object.} JSON object + */ + SparkTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SparkTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; + }; + + return SparkTaskConfig; + })(); + + Task.NotebookTaskConfig = (function() { + + /** + * Properties of a NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface INotebookTaskConfig + * @property {string|null} [notebook] NotebookTaskConfig notebook + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec + * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris + * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris + */ + + /** + * Constructs a new NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a NotebookTaskConfig. + * @implements INotebookTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + */ + function NotebookTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotebookTaskConfig notebook. + * @member {string} notebook + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.notebook = ""; + + /** + * NotebookTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.infrastructureSpec = null; + + /** + * NotebookTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * NotebookTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance + */ + NotebookTaskConfig.create = function create(properties) { + return new NotebookTaskConfig(properties); + }; + + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); + return writer; + }; + + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.notebook = reader.string(); + break; + } + case 3: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 6: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotebookTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotebookTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebook != null && message.hasOwnProperty("notebook")) + if (!$util.isString(message.notebook)) + return "notebook: string expected"; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + return null; + }; + + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + */ + NotebookTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + if (object.notebook != null) + message.notebook = String(object.notebook); + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + return message; + }; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotebookTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) { + object.infrastructureSpec = null; + object.notebook = ""; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = message.notebook; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + return object; + }; + + /** + * Converts this NotebookTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + * @returns {Object.} JSON object + */ + NotebookTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotebookTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; + }; + + return NotebookTaskConfig; + })(); + + Task.ExecutionStatus = (function() { + + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime + * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob + */ + + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.updateTime = null; + + /** + * ExecutionStatus latestJob. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJob = null; + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.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 3, wireType 2 =*/26).fork()).ldelim(); + if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) + $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.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.latestJob != null && message.hasOwnProperty("latestJob")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); + if (error) + return "latestJob." + error; + } + return null; + }; + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.latestJob != null) { + if (typeof object.latestJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); + message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.latestJob = null; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.latestJob != null && message.hasOwnProperty("latestJob")) + object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + return object; + }; + + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; + }; + + return ExecutionStatus; + })(); + + return Task; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.dataplex.v1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [uid] Job uid + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state + * @property {number|null} [retryCount] Job retryCount + * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service + * @property {string|null} [serviceJob] Job serviceJob + * @property {string|null} [message] Job message + * @property {Object.|null} [labels] Job labels + * @property {google.cloud.dataplex.v1.Job.Trigger|null} [trigger] Job trigger + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Job executionSpec + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + */ + function Job(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]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.uid = ""; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.endTime = null; + + /** + * Job state. + * @member {google.cloud.dataplex.v1.Job.State} state + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job retryCount. + * @member {number} retryCount + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.retryCount = 0; + + /** + * Job service. + * @member {google.cloud.dataplex.v1.Job.Service} service + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.service = 0; + + /** + * Job serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.serviceJob = ""; + + /** + * Job message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.message = ""; + + /** + * Job labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.labels = $util.emptyObject; + + /** + * Job trigger. + * @member {google.cloud.dataplex.v1.Job.Trigger} trigger + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.trigger = 0; + + /** + * Job executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.executionSpec = null; + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.trigger); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retryCount = reader.uint32(); + break; + } + case 7: { + message.service = reader.int32(); + break; + } + case 8: { + message.serviceJob = reader.string(); + break; + } + case 9: { + message.message = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 11: { + message.trigger = reader.int32(); + break; + } + case 100: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + if (!$util.isInteger(message.retryCount)) + return "retryCount: integer expected"; + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Job) + return object; + var message = new $root.google.cloud.dataplex.v1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELLING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.retryCount != null) + message.retryCount = object.retryCount >>> 0; + 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 "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + if (object.message != null) + message.message = String(object.message); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "TRIGGER_UNSPECIFIED": + case 0: + message.trigger = 0; + break; + case "TASK_CONFIG": + case 1: + message.trigger = 1; + break; + case "RUN_REQUEST": + case 2: + message.trigger = 2; + break; + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retryCount = 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.message = ""; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.executionSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + object.retryCount = message.retryCount; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + 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.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] : message.trigger; + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; + }; + + /** + * Service enum. + * @name google.cloud.dataplex.v1.Job.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + Job.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; + })(); + + /** + * Trigger enum. + * @name google.cloud.dataplex.v1.Job.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} TASK_CONFIG=1 TASK_CONFIG value + * @property {number} RUN_REQUEST=2 RUN_REQUEST value + */ + Job.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TASK_CONFIG"] = 1; + values[valuesById[2] = "RUN_REQUEST"] = 2; + return values; + })(); + + return Job; + })(); + + v1.ContentService = (function() { + + /** + * Constructs a new ContentService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ContentService + * @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 ContentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; + + /** + * Creates new ContentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.ContentService + * @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 {ContentService} RPC service. Useful where requests and/or responses are streamed. + */ + ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef CreateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ + + /** + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.CreateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.createContent = function createContent(request, callback) { + return this.rpcCall(createContent, $root.google.cloud.dataplex.v1.CreateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "CreateContent" }); + + /** + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef UpdateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ + + /** + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.UpdateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.updateContent = function updateContent(request, callback) { + return this.rpcCall(updateContent, $root.google.cloud.dataplex.v1.UpdateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "UpdateContent" }); + + /** + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef DeleteContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.DeleteContentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.deleteContent = function deleteContent(request, callback) { + return this.rpcCall(deleteContent, $root.google.cloud.dataplex.v1.DeleteContentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteContent" }); + + /** + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef GetContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ + + /** + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { + return this.rpcCall(getContent, $root.google.cloud.dataplex.v1.GetContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "GetContent" }); + + /** + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. + * @memberof google.cloud.dataplex.v1.ContentService + * @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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef ListContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListContentResponse} [response] ListContentResponse + */ + + /** + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { + return this.rpcCall(listContent, $root.google.cloud.dataplex.v1.ListContentRequest, $root.google.cloud.dataplex.v1.ListContentResponse, request, callback); + }, "name", { value: "ListContent" }); + + /** + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ContentService; + })(); + + v1.CreateContentRequest = (function() { + + /** + * Properties of a CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateContentRequest + * @property {string|null} [parent] CreateContentRequest parent + * @property {google.cloud.dataplex.v1.IContent|null} [content] CreateContentRequest content + * @property {boolean|null} [validateOnly] CreateContentRequest validateOnly + */ + + /** + * Constructs a new CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateContentRequest. + * @implements ICreateContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + */ + function CreateContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.parent = ""; + + /** + * CreateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.content = null; + + /** + * CreateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest instance + */ + CreateContentRequest.create = function create(properties) { + return new CreateContentRequest(properties); + }; + + /** + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateContentRequest.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.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateContentRequest.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.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + */ + CreateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.CreateContentRequest} message CreateContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.content = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateContentRequest"; + }; + + return CreateContentRequest; + })(); + + v1.UpdateContentRequest = (function() { + + /** + * Properties of an UpdateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateContentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContentRequest updateMask + * @property {google.cloud.dataplex.v1.IContent|null} [content] UpdateContentRequest content + * @property {boolean|null} [validateOnly] UpdateContentRequest validateOnly + */ + + /** + * Constructs a new UpdateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateContentRequest. + * @implements IUpdateContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + */ + function UpdateContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateContentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.updateMask = null; + + /** + * UpdateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.content = null; + + /** + * UpdateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + */ + UpdateContentRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest instance + */ + UpdateContentRequest.create = function create(properties) { + return new UpdateContentRequest(properties); + }; + + /** + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + */ + UpdateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateContentRequest} message UpdateContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.content = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateContentRequest"; + }; + + return UpdateContentRequest; + })(); + + v1.DeleteContentRequest = (function() { + + /** + * Properties of a DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteContentRequest + * @property {string|null} [name] DeleteContentRequest name + */ + + /** + * Constructs a new DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteContentRequest. + * @implements IDeleteContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + */ + function DeleteContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @instance + */ + DeleteContentRequest.prototype.name = ""; + + /** + * Creates a new DeleteContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest instance + */ + DeleteContentRequest.create = function create(properties) { + return new DeleteContentRequest(properties); + }; + + /** + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteContentRequest.encode = function encode(message, writer) { + 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 DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); + 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 DeleteContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteContentRequest.verify = function verify(message) { + if (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 DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest + */ + DeleteContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteContentRequest} message DeleteContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteContentRequest.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 DeleteContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteContentRequest"; + }; + + return DeleteContentRequest; + })(); + + v1.ListContentRequest = (function() { + + /** + * Properties of a ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentRequest + * @property {string|null} [parent] ListContentRequest parent + * @property {number|null} [pageSize] ListContentRequest pageSize + * @property {string|null} [pageToken] ListContentRequest pageToken + * @property {string|null} [filter] ListContentRequest filter + */ + + /** + * Constructs a new ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentRequest. + * @implements IListContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set + */ + function ListContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.parent = ""; + + /** + * ListContentRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.pageSize = 0; + + /** + * ListContentRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.pageToken = ""; + + /** + * ListContentRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.filter = ""; + + /** + * Creates a new ListContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest instance + */ + ListContentRequest.create = function create(properties) { + return new ListContentRequest(properties); + }; + + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.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 ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + 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 ListContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContentRequest.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 ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + */ + ListContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + 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 ListContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.ListContentRequest} message ListContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentRequest.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 ListContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + * @returns {Object.} JSON object + */ + ListContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentRequest"; + }; + + return ListContentRequest; + })(); + + v1.ListContentResponse = (function() { + + /** + * Properties of a ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentResponse + * @property {Array.|null} [content] ListContentResponse content + * @property {string|null} [nextPageToken] ListContentResponse nextPageToken + */ + + /** + * Constructs a new ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentResponse. + * @implements IListContentResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set + */ + function ListContentResponse(properties) { + this.content = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListContentResponse content. + * @member {Array.} content + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.content = $util.emptyArray; + + /** + * ListContentResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + */ + ListContentResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListContentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse instance + */ + ListContentResponse.create = function create(properties) { + return new ListContentResponse(properties); + }; + + /** + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.content.length) + for (var i = 0; i < message.content.length; ++i) + $root.google.cloud.dataplex.v1.Content.encode(message.content[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 ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.content && message.content.length)) + message.content = []; + message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListContentResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + if (!Array.isArray(message.content)) + return "content: array expected"; + for (var i = 0; i < message.content.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content[i]); + if (error) + return "content." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + */ + ListContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + if (object.content) { + if (!Array.isArray(object.content)) + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: array expected"); + message.content = []; + for (var i = 0; i < object.content.length; ++i) { + if (typeof object.content[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: object expected"); + message.content[i] = $root.google.cloud.dataplex.v1.Content.fromObject(object.content[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.ListContentResponse} message ListContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.content = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.content && message.content.length) { + object.content = []; + for (var j = 0; j < message.content.length; ++j) + object.content[j] = $root.google.cloud.dataplex.v1.Content.toObject(message.content[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListContentResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance + * @returns {Object.} JSON object + */ + ListContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListContentResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentResponse"; + }; + + return ListContentResponse; + })(); + + v1.GetContentRequest = (function() { + + /** + * Properties of a GetContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetContentRequest + * @property {string|null} [name] GetContentRequest name + * @property {google.cloud.dataplex.v1.GetContentRequest.ContentView|null} [view] GetContentRequest view + */ + + /** + * Constructs a new GetContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetContentRequest. + * @implements IGetContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + */ + function GetContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + */ + GetContentRequest.prototype.name = ""; + + /** + * GetContentRequest view. + * @member {google.cloud.dataplex.v1.GetContentRequest.ContentView} view + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + */ + GetContentRequest.prototype.view = 0; + + /** + * Creates a new GetContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest instance + */ + GetContentRequest.create = function create(properties) { + return new GetContentRequest(properties); + }; + + /** + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetContentRequest.verify = function verify(message) { + if (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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + */ + GetContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "CONTENT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {google.cloud.dataplex.v1.GetContentRequest} message GetContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "CONTENT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @instance + * @returns {Object.} JSON object + */ + GetContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetContentRequest"; + }; + + /** + * ContentView enum. + * @name google.cloud.dataplex.v1.GetContentRequest.ContentView + * @enum {number} + * @property {number} CONTENT_VIEW_UNSPECIFIED=0 CONTENT_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + GetContentRequest.ContentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + return GetContentRequest; + })(); + + v1.DataDiscoverySpec = (function() { + + /** + * Properties of a DataDiscoverySpec. + * @memberof google.cloud.dataplex.v1 + * @interface IDataDiscoverySpec + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null} [bigqueryPublishingConfig] DataDiscoverySpec bigqueryPublishingConfig + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null} [storageConfig] DataDiscoverySpec storageConfig + */ + + /** + * Constructs a new DataDiscoverySpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataDiscoverySpec. + * @implements IDataDiscoverySpec + * @constructor + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set + */ + function DataDiscoverySpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataDiscoverySpec bigqueryPublishingConfig. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null|undefined} bigqueryPublishingConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @instance + */ + DataDiscoverySpec.prototype.bigqueryPublishingConfig = null; + + /** + * DataDiscoverySpec storageConfig. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null|undefined} storageConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @instance + */ + DataDiscoverySpec.prototype.storageConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataDiscoverySpec resourceConfig. + * @member {"storageConfig"|undefined} resourceConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @instance + */ + Object.defineProperty(DataDiscoverySpec.prototype, "resourceConfig", { + get: $util.oneOfGetter($oneOfFields = ["storageConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataDiscoverySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec instance + */ + DataDiscoverySpec.create = function create(properties) { + return new DataDiscoverySpec(properties); + }; + + /** + * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataDiscoverySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryPublishingConfig != null && Object.hasOwnProperty.call(message, "bigqueryPublishingConfig")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.encode(message.bigqueryPublishingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataDiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataDiscoverySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataDiscoverySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.decode(reader, reader.uint32()); + break; + } + case 100: { + message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataDiscoverySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataDiscoverySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataDiscoverySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify(message.bigqueryPublishingConfig); + if (error) + return "bigqueryPublishingConfig." + error; + } + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + properties.resourceConfig = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify(message.storageConfig); + if (error) + return "storageConfig." + error; + } + } + return null; + }; + + /** + * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec + */ + DataDiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); + if (object.bigqueryPublishingConfig != null) { + if (typeof object.bigqueryPublishingConfig !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.bigqueryPublishingConfig: object expected"); + message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.fromObject(object.bigqueryPublishingConfig); + } + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.storageConfig: object expected"); + message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.fromObject(object.storageConfig); + } + return message; + }; + + /** + * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec} message DataDiscoverySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataDiscoverySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryPublishingConfig = null; + if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) + object.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.toObject(message.bigqueryPublishingConfig, options); + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + object.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.toObject(message.storageConfig, options); + if (options.oneofs) + object.resourceConfig = "storageConfig"; + } + return object; + }; + + /** + * Converts this DataDiscoverySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @instance + * @returns {Object.} JSON object + */ + DataDiscoverySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataDiscoverySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataDiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec"; + }; + + DataDiscoverySpec.BigQueryPublishingConfig = (function() { + + /** + * Properties of a BigQueryPublishingConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @interface IBigQueryPublishingConfig + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null} [tableType] BigQueryPublishingConfig tableType + * @property {string|null} [connection] BigQueryPublishingConfig connection + */ + + /** + * Constructs a new BigQueryPublishingConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @classdesc Represents a BigQueryPublishingConfig. + * @implements IBigQueryPublishingConfig + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set + */ + function BigQueryPublishingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryPublishingConfig tableType. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType} tableType + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + */ + BigQueryPublishingConfig.prototype.tableType = 0; + + /** + * BigQueryPublishingConfig connection. + * @member {string} connection + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + */ + BigQueryPublishingConfig.prototype.connection = ""; + + /** + * Creates a new BigQueryPublishingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig instance + */ + BigQueryPublishingConfig.create = function create(properties) { + return new BigQueryPublishingConfig(properties); + }; + + /** + * Encodes the specified BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableType != null && Object.hasOwnProperty.call(message, "tableType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tableType); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.connection); + return writer; + }; + + /** + * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tableType = reader.int32(); + break; + } + case 3: { + message.connection = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryPublishingConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryPublishingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableType != null && message.hasOwnProperty("tableType")) + switch (message.tableType) { + default: + return "tableType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.connection != null && message.hasOwnProperty("connection")) + if (!$util.isString(message.connection)) + return "connection: string expected"; + return null; + }; + + /** + * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + */ + BigQueryPublishingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); + switch (object.tableType) { + default: + if (typeof object.tableType === "number") { + message.tableType = object.tableType; + break; + } + break; + case "TABLE_TYPE_UNSPECIFIED": + case 0: + message.tableType = 0; + break; + case "EXTERNAL": + case 1: + message.tableType = 1; + break; + case "BIGLAKE": + case 2: + message.tableType = 2; + break; + } + if (object.connection != null) + message.connection = String(object.connection); + return message; + }; + + /** + * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} message BigQueryPublishingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryPublishingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableType = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; + object.connection = ""; + } + if (message.tableType != null && message.hasOwnProperty("tableType")) + object.tableType = options.enums === String ? $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] === undefined ? message.tableType : $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] : message.tableType; + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = message.connection; + return object; + }; + + /** + * Converts this BigQueryPublishingConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + * @returns {Object.} JSON object + */ + BigQueryPublishingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryPublishingConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryPublishingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"; + }; + + /** + * TableType enum. + * @name google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType + * @enum {number} + * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value + * @property {number} EXTERNAL=1 EXTERNAL value + * @property {number} BIGLAKE=2 BIGLAKE value + */ + BigQueryPublishingConfig.TableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTERNAL"] = 1; + values[valuesById[2] = "BIGLAKE"] = 2; + return values; + })(); + + return BigQueryPublishingConfig; + })(); + + DataDiscoverySpec.StorageConfig = (function() { + + /** + * Properties of a StorageConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @interface IStorageConfig + * @property {Array.|null} [includePatterns] StorageConfig includePatterns + * @property {Array.|null} [excludePatterns] StorageConfig excludePatterns + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null} [csvOptions] StorageConfig csvOptions + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null} [jsonOptions] StorageConfig jsonOptions + */ + + /** + * Constructs a new StorageConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @classdesc Represents a StorageConfig. + * @implements IStorageConfig + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set + */ + function StorageConfig(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageConfig includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.includePatterns = $util.emptyArray; + + /** + * StorageConfig excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.excludePatterns = $util.emptyArray; + + /** + * StorageConfig csvOptions. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.csvOptions = null; + + /** + * StorageConfig jsonOptions. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.jsonOptions = null; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig instance + */ + StorageConfig.create = function create(properties) { + return new StorageConfig(properties); + }; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 2: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 3: { + message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + return null; + }; + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + */ + StorageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.fromObject(object.jsonOptions); + } + return message; + }; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} message StorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.toObject(message.jsonOptions, options); + return object; + }; + + /** + * Converts this StorageConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + * @returns {Object.} JSON object + */ + StorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"; + }; + + StorageConfig.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [typeInferenceDisabled] CsvOptions typeInferenceDisabled + * @property {string|null} [quote] CsvOptions quote + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions typeInferenceDisabled. + * @member {boolean} typeInferenceDisabled + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.typeInferenceDisabled = false; + + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.typeInferenceDisabled); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.quote); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.typeInferenceDisabled = reader.bool(); + break; + } + case 5: { + message.quote = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + if (typeof message.typeInferenceDisabled !== "boolean") + return "typeInferenceDisabled: boolean expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.typeInferenceDisabled != null) + message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.typeInferenceDisabled = false; + object.quote = ""; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + object.typeInferenceDisabled = message.typeInferenceDisabled; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"; + }; + + return CsvOptions; + })(); + + StorageConfig.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [typeInferenceDisabled] JsonOptions typeInferenceDisabled + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * JsonOptions typeInferenceDisabled. + * @member {boolean} typeInferenceDisabled + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + */ + JsonOptions.prototype.typeInferenceDisabled = false; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.typeInferenceDisabled); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.typeInferenceDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + if (typeof message.typeInferenceDisabled !== "boolean") + return "typeInferenceDisabled: boolean expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.typeInferenceDisabled != null) + message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.typeInferenceDisabled = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + object.typeInferenceDisabled = message.typeInferenceDisabled; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"; + }; + + return JsonOptions; + })(); + + return StorageConfig; + })(); + + return DataDiscoverySpec; + })(); + + v1.DataDiscoveryResult = (function() { + + /** + * Properties of a DataDiscoveryResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataDiscoveryResult + * @property {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null} [bigqueryPublishing] DataDiscoveryResult bigqueryPublishing + */ + + /** + * Constructs a new DataDiscoveryResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataDiscoveryResult. + * @implements IDataDiscoveryResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set + */ + function DataDiscoveryResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataDiscoveryResult bigqueryPublishing. + * @member {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null|undefined} bigqueryPublishing + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @instance + */ + DataDiscoveryResult.prototype.bigqueryPublishing = null; + + /** + * Creates a new DataDiscoveryResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult instance + */ + DataDiscoveryResult.create = function create(properties) { + return new DataDiscoveryResult(properties); + }; + + /** + * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataDiscoveryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryPublishing != null && Object.hasOwnProperty.call(message, "bigqueryPublishing")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.encode(message.bigqueryPublishing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataDiscoveryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataDiscoveryResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataDiscoveryResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataDiscoveryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataDiscoveryResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataDiscoveryResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify(message.bigqueryPublishing); + if (error) + return "bigqueryPublishing." + error; + } + return null; + }; + + /** + * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult + */ + DataDiscoveryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); + if (object.bigqueryPublishing != null) { + if (typeof object.bigqueryPublishing !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoveryResult.bigqueryPublishing: object expected"); + message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.fromObject(object.bigqueryPublishing); + } + return message; + }; + + /** + * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult} message DataDiscoveryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataDiscoveryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryPublishing = null; + if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) + object.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.toObject(message.bigqueryPublishing, options); + return object; + }; + + /** + * Converts this DataDiscoveryResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @instance + * @returns {Object.} JSON object + */ + DataDiscoveryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataDiscoveryResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataDiscoveryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult"; + }; + + DataDiscoveryResult.BigQueryPublishing = (function() { + + /** + * Properties of a BigQueryPublishing. + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @interface IBigQueryPublishing + * @property {string|null} [dataset] BigQueryPublishing dataset + */ + + /** + * Constructs a new BigQueryPublishing. + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @classdesc Represents a BigQueryPublishing. + * @implements IBigQueryPublishing + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set + */ + function BigQueryPublishing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryPublishing dataset. + * @member {string} dataset + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @instance + */ + BigQueryPublishing.prototype.dataset = ""; + + /** + * Creates a new BigQueryPublishing instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing instance + */ + BigQueryPublishing.create = function create(properties) { + return new BigQueryPublishing(properties); + }; + + /** + * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishing.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); + return writer; + }; + + /** + * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryPublishing message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryPublishing.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"; + return null; + }; + + /** + * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + */ + BigQueryPublishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); + if (object.dataset != null) + message.dataset = String(object.dataset); + return message; + }; + + /** + * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} message BigQueryPublishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryPublishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataset = ""; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + return object; + }; + + /** + * Converts this BigQueryPublishing to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @instance + * @returns {Object.} JSON object + */ + BigQueryPublishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryPublishing + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryPublishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"; + }; + + return BigQueryPublishing; + })(); + + return DataDiscoveryResult; + })(); + + v1.DataProfileSpec = (function() { + + /** + * Properties of a DataProfileSpec. + * @memberof google.cloud.dataplex.v1 + * @interface IDataProfileSpec + * @property {number|null} [samplingPercent] DataProfileSpec samplingPercent + * @property {string|null} [rowFilter] DataProfileSpec rowFilter + * @property {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null} [postScanActions] DataProfileSpec postScanActions + * @property {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null} [includeFields] DataProfileSpec includeFields + * @property {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null} [excludeFields] DataProfileSpec excludeFields + */ + + /** + * Constructs a new DataProfileSpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataProfileSpec. + * @implements IDataProfileSpec + * @constructor + * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set + */ + function DataProfileSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileSpec samplingPercent. + * @member {number} samplingPercent + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + */ + DataProfileSpec.prototype.samplingPercent = 0; + + /** + * DataProfileSpec rowFilter. + * @member {string} rowFilter + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + */ + DataProfileSpec.prototype.rowFilter = ""; + + /** + * DataProfileSpec postScanActions. + * @member {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null|undefined} postScanActions + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + */ + DataProfileSpec.prototype.postScanActions = null; + + /** + * DataProfileSpec includeFields. + * @member {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null|undefined} includeFields + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + */ + DataProfileSpec.prototype.includeFields = null; + + /** + * DataProfileSpec excludeFields. + * @member {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null|undefined} excludeFields + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + */ + DataProfileSpec.prototype.excludeFields = null; + + /** + * Creates a new DataProfileSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec instance + */ + DataProfileSpec.create = function create(properties) { + return new DataProfileSpec(properties); + }; + + /** + * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.samplingPercent); + if (message.rowFilter != null && Object.hasOwnProperty.call(message, "rowFilter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rowFilter); + if (message.postScanActions != null && Object.hasOwnProperty.call(message, "postScanActions")) + $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.encode(message.postScanActions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.includeFields != null && Object.hasOwnProperty.call(message, "includeFields")) + $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.encode(message.includeFields, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.excludeFields != null && Object.hasOwnProperty.call(message, "excludeFields")) + $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.encode(message.excludeFields, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.samplingPercent = reader.float(); + break; + } + case 3: { + message.rowFilter = reader.string(); + break; + } + case 4: { + message.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.decode(reader, reader.uint32()); + break; + } + case 6: { + message.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + if (typeof message.samplingPercent !== "number") + return "samplingPercent: number expected"; + if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) + if (!$util.isString(message.rowFilter)) + return "rowFilter: string expected"; + if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify(message.postScanActions); + if (error) + return "postScanActions." + error; + } + if (message.includeFields != null && message.hasOwnProperty("includeFields")) { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify(message.includeFields); + if (error) + return "includeFields." + error; + } + if (message.excludeFields != null && message.hasOwnProperty("excludeFields")) { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify(message.excludeFields); + if (error) + return "excludeFields." + error; + } + return null; + }; + + /** + * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec + */ + DataProfileSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileSpec(); + if (object.samplingPercent != null) + message.samplingPercent = Number(object.samplingPercent); + if (object.rowFilter != null) + message.rowFilter = String(object.rowFilter); + if (object.postScanActions != null) { + if (typeof object.postScanActions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.postScanActions: object expected"); + message.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.fromObject(object.postScanActions); + } + if (object.includeFields != null) { + if (typeof object.includeFields !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.includeFields: object expected"); + message.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fromObject(object.includeFields); + } + if (object.excludeFields != null) { + if (typeof object.excludeFields !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.excludeFields: object expected"); + message.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fromObject(object.excludeFields); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec} message DataProfileSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.samplingPercent = 0; + object.rowFilter = ""; + object.postScanActions = null; + object.includeFields = null; + object.excludeFields = null; + } + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; + if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) + object.rowFilter = message.rowFilter; + if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) + object.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.toObject(message.postScanActions, options); + if (message.includeFields != null && message.hasOwnProperty("includeFields")) + object.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.toObject(message.includeFields, options); + if (message.excludeFields != null && message.hasOwnProperty("excludeFields")) + object.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.toObject(message.excludeFields, options); + return object; + }; + + /** + * Converts this DataProfileSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @instance + * @returns {Object.} JSON object + */ + DataProfileSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec"; + }; + + DataProfileSpec.PostScanActions = (function() { + + /** + * Properties of a PostScanActions. + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @interface IPostScanActions + * @property {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null} [bigqueryExport] PostScanActions bigqueryExport + */ + + /** + * Constructs a new PostScanActions. + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @classdesc Represents a PostScanActions. + * @implements IPostScanActions + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions=} [properties] Properties to set + */ + function PostScanActions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostScanActions bigqueryExport. + * @member {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null|undefined} bigqueryExport + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @instance + */ + PostScanActions.prototype.bigqueryExport = null; + + /** + * Creates a new PostScanActions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions instance + */ + PostScanActions.create = function create(properties) { + return new PostScanActions(properties); + }; + + /** + * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions} message PostScanActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryExport != null && Object.hasOwnProperty.call(message, "bigqueryExport")) + $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.encode(message.bigqueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions} message PostScanActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostScanActions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostScanActions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostScanActions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostScanActions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify(message.bigqueryExport); + if (error) + return "bigqueryExport." + error; + } + return null; + }; + + /** + * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions + */ + PostScanActions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(); + if (object.bigqueryExport != null) { + if (typeof object.bigqueryExport !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.bigqueryExport: object expected"); + message.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.fromObject(object.bigqueryExport); + } + return message; + }; + + /** + * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} message PostScanActions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostScanActions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryExport = null; + if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) + object.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.toObject(message.bigqueryExport, options); + return object; + }; + + /** + * Converts this PostScanActions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @instance + * @returns {Object.} JSON object + */ + PostScanActions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostScanActions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostScanActions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"; + }; + + PostScanActions.BigQueryExport = (function() { + + /** + * Properties of a BigQueryExport. + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @interface IBigQueryExport + * @property {string|null} [resultsTable] BigQueryExport resultsTable + */ + + /** + * Constructs a new BigQueryExport. + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + * @classdesc Represents a BigQueryExport. + * @implements IBigQueryExport + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport=} [properties] Properties to set + */ + function BigQueryExport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryExport resultsTable. + * @member {string} resultsTable + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @instance + */ + BigQueryExport.prototype.resultsTable = ""; + + /** + * Creates a new BigQueryExport instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport instance + */ + BigQueryExport.create = function create(properties) { + return new BigQueryExport(properties); + }; + + /** + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resultsTable != null && Object.hasOwnProperty.call(message, "resultsTable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resultsTable); + return writer; + }; + + /** + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resultsTable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryExport message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryExport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) + if (!$util.isString(message.resultsTable)) + return "resultsTable: string expected"; + return null; + }; + + /** + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport + */ + BigQueryExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(); + if (object.resultsTable != null) + message.resultsTable = String(object.resultsTable); + return message; + }; + + /** + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} message BigQueryExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.resultsTable = ""; + if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) + object.resultsTable = message.resultsTable; + return object; + }; + + /** + * Converts this BigQueryExport to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @instance + * @returns {Object.} JSON object + */ + BigQueryExport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryExport + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"; + }; + + return BigQueryExport; + })(); + + return PostScanActions; + })(); + + DataProfileSpec.SelectedFields = (function() { + + /** + * Properties of a SelectedFields. + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @interface ISelectedFields + * @property {Array.|null} [fieldNames] SelectedFields fieldNames + */ + + /** + * Constructs a new SelectedFields. + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @classdesc Represents a SelectedFields. + * @implements ISelectedFields + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields=} [properties] Properties to set + */ + function SelectedFields(properties) { + this.fieldNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectedFields fieldNames. + * @member {Array.} fieldNames + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @instance + */ + SelectedFields.prototype.fieldNames = $util.emptyArray; + + /** + * Creates a new SelectedFields instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields instance + */ + SelectedFields.create = function create(properties) { + return new SelectedFields(properties); + }; + + /** + * Encodes the specified SelectedFields message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields} message SelectedFields message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectedFields.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldNames != null && message.fieldNames.length) + for (var i = 0; i < message.fieldNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldNames[i]); + return writer; + }; + + /** + * Encodes the specified SelectedFields message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields} message SelectedFields message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectedFields.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectedFields message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectedFields.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.fieldNames && message.fieldNames.length)) + message.fieldNames = []; + message.fieldNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectedFields message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectedFields.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectedFields message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectedFields.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldNames != null && message.hasOwnProperty("fieldNames")) { + if (!Array.isArray(message.fieldNames)) + return "fieldNames: array expected"; + for (var i = 0; i < message.fieldNames.length; ++i) + if (!$util.isString(message.fieldNames[i])) + return "fieldNames: string[] expected"; + } + return null; + }; + + /** + * Creates a SelectedFields message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields + */ + SelectedFields.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(); + if (object.fieldNames) { + if (!Array.isArray(object.fieldNames)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fieldNames: array expected"); + message.fieldNames = []; + for (var i = 0; i < object.fieldNames.length; ++i) + message.fieldNames[i] = String(object.fieldNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a SelectedFields message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} message SelectedFields + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectedFields.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fieldNames = []; + if (message.fieldNames && message.fieldNames.length) { + object.fieldNames = []; + for (var j = 0; j < message.fieldNames.length; ++j) + object.fieldNames[j] = message.fieldNames[j]; + } + return object; + }; + + /** + * Converts this SelectedFields to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @instance + * @returns {Object.} JSON object + */ + SelectedFields.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectedFields + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectedFields.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"; + }; + + return SelectedFields; + })(); + + return DataProfileSpec; + })(); + + v1.DataProfileResult = (function() { + + /** + * Properties of a DataProfileResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataProfileResult + * @property {number|Long|null} [rowCount] DataProfileResult rowCount + * @property {google.cloud.dataplex.v1.DataProfileResult.IProfile|null} [profile] DataProfileResult profile + * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataProfileResult scannedData + * @property {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null} [postScanActionsResult] DataProfileResult postScanActionsResult + */ + + /** + * Constructs a new DataProfileResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataProfileResult. + * @implements IDataProfileResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set + */ + function DataProfileResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + */ + DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataProfileResult profile. + * @member {google.cloud.dataplex.v1.DataProfileResult.IProfile|null|undefined} profile + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + */ + DataProfileResult.prototype.profile = null; + + /** + * DataProfileResult scannedData. + * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + */ + DataProfileResult.prototype.scannedData = null; + + /** + * DataProfileResult postScanActionsResult. + * @member {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null|undefined} postScanActionsResult + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + */ + DataProfileResult.prototype.postScanActionsResult = null; + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult instance + */ + DataProfileResult.create = function create(properties) { + return new DataProfileResult(properties); + }; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCount); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) + $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.rowCount = reader.int64(); + break; + } + case 4: { + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.decode(reader, reader.uint32()); + break; + } + case 5: { + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); + break; + } + case 6: { + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.profile != null && message.hasOwnProperty("profile")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.verify(message.profile); + if (error) + return "profile." + error; + } + if (message.scannedData != null && message.hasOwnProperty("scannedData")) { + var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); + if (error) + return "scannedData." + error; + } + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify(message.postScanActionsResult); + if (error) + return "postScanActionsResult." + error; + } + return null; + }; + + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult + */ + DataProfileResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.profile != null) { + if (typeof object.profile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.profile: object expected"); + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.fromObject(object.profile); + } + if (object.scannedData != null) { + if (typeof object.scannedData !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.scannedData: object expected"); + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); + } + if (object.postScanActionsResult != null) { + if (typeof object.postScanActionsResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.postScanActionsResult: object expected"); + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.fromObject(object.postScanActionsResult); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult} message DataProfileResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileResult.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.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.profile = null; + object.scannedData = null; + object.postScanActionsResult = null; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.toObject(message.profile, options); + if (message.scannedData != null && message.hasOwnProperty("scannedData")) + object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) + object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.toObject(message.postScanActionsResult, options); + return object; + }; + + /** + * Converts this DataProfileResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + * @returns {Object.} JSON object + */ + DataProfileResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult"; + }; + + DataProfileResult.Profile = (function() { + + /** + * Properties of a Profile. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @interface IProfile + * @property {Array.|null} [fields] Profile fields + */ + + /** + * Constructs a new Profile. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @classdesc Represents a Profile. + * @implements IProfile + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set + */ + function Profile(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]]; + } + + /** + * Profile fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @instance + */ + Profile.prototype.fields = $util.emptyArray; + + /** + * Creates a new Profile instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile instance + */ + Profile.create = function create(properties) { + return new Profile(properties); + }; + + /** + * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Profile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Profile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Profile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Profile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Profile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Profile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Profile message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Profile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Profile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile + */ + Profile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.fromObject(object.fields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Profile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile} message Profile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Profile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.toObject(message.fields[j], options); + } + return object; + }; + + /** + * Converts this Profile to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @instance + * @returns {Object.} JSON object + */ + Profile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Profile + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Profile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile"; + }; + + Profile.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @interface IField + * @property {string|null} [name] Field name + * @property {string|null} [type] Field type + * @property {string|null} [mode] Field mode + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null} [profile] Field profile + */ + + /** + * Constructs a new Field. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set + */ + function Field(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.name = ""; + + /** + * Field type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.type = ""; + + /** + * Field mode. + * @member {string} mode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.mode = ""; + + /** + * Field profile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null|undefined} profile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.profile = null; + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + if (!writer) + 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 2 =*/18).string(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.mode = reader.string(); + break; + } + case 4: { + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.profile != null && message.hasOwnProperty("profile")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify(message.profile); + if (error) + return "profile." + error; + } + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.mode != null) + message.mode = String(object.mode); + if (object.profile != null) { + if (typeof object.profile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.profile: object expected"); + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.fromObject(object.profile); + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = ""; + object.mode = ""; + object.profile = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = message.mode; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.toObject(message.profile, options); + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"; + }; + + Field.ProfileInfo = (function() { + + /** + * Properties of a ProfileInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @interface IProfileInfo + * @property {number|null} [nullRatio] ProfileInfo nullRatio + * @property {number|null} [distinctRatio] ProfileInfo distinctRatio + * @property {Array.|null} [topNValues] ProfileInfo topNValues + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null} [stringProfile] ProfileInfo stringProfile + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null} [integerProfile] ProfileInfo integerProfile + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null} [doubleProfile] ProfileInfo doubleProfile + */ + + /** + * Constructs a new ProfileInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @classdesc Represents a ProfileInfo. + * @implements IProfileInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set + */ + function ProfileInfo(properties) { + this.topNValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProfileInfo nullRatio. + * @member {number} nullRatio + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.nullRatio = 0; + + /** + * ProfileInfo distinctRatio. + * @member {number} distinctRatio + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.distinctRatio = 0; + + /** + * ProfileInfo topNValues. + * @member {Array.} topNValues + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.topNValues = $util.emptyArray; + + /** + * ProfileInfo stringProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null|undefined} stringProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.stringProfile = null; + + /** + * ProfileInfo integerProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null|undefined} integerProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.integerProfile = null; + + /** + * ProfileInfo doubleProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null|undefined} doubleProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.doubleProfile = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ProfileInfo fieldInfo. + * @member {"stringProfile"|"integerProfile"|"doubleProfile"|undefined} fieldInfo + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + Object.defineProperty(ProfileInfo.prototype, "fieldInfo", { + get: $util.oneOfGetter($oneOfFields = ["stringProfile", "integerProfile", "doubleProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProfileInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo instance + */ + ProfileInfo.create = function create(properties) { + return new ProfileInfo(properties); + }; + + /** + * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullRatio != null && Object.hasOwnProperty.call(message, "nullRatio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.nullRatio); + if (message.distinctRatio != null && Object.hasOwnProperty.call(message, "distinctRatio")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.distinctRatio); + if (message.topNValues != null && message.topNValues.length) + for (var i = 0; i < message.topNValues.length; ++i) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.encode(message.topNValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stringProfile != null && Object.hasOwnProperty.call(message, "stringProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.encode(message.stringProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.integerProfile != null && Object.hasOwnProperty.call(message, "integerProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.encode(message.integerProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.doubleProfile != null && Object.hasOwnProperty.call(message, "doubleProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.encode(message.doubleProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.nullRatio = reader.double(); + break; + } + case 3: { + message.distinctRatio = reader.double(); + break; + } + case 4: { + if (!(message.topNValues && message.topNValues.length)) + message.topNValues = []; + message.topNValues.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.decode(reader, reader.uint32())); + break; + } + case 101: { + message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.decode(reader, reader.uint32()); + break; + } + case 102: { + message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.decode(reader, reader.uint32()); + break; + } + case 103: { + message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProfileInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProfileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) + if (typeof message.nullRatio !== "number") + return "nullRatio: number expected"; + if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) + if (typeof message.distinctRatio !== "number") + return "distinctRatio: number expected"; + if (message.topNValues != null && message.hasOwnProperty("topNValues")) { + if (!Array.isArray(message.topNValues)) + return "topNValues: array expected"; + for (var i = 0; i < message.topNValues.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify(message.topNValues[i]); + if (error) + return "topNValues." + error; + } + } + if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify(message.stringProfile); + if (error) + return "stringProfile." + error; + } + } + if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { + if (properties.fieldInfo === 1) + return "fieldInfo: multiple values"; + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify(message.integerProfile); + if (error) + return "integerProfile." + error; + } + } + if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { + if (properties.fieldInfo === 1) + return "fieldInfo: multiple values"; + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify(message.doubleProfile); + if (error) + return "doubleProfile." + error; + } + } + return null; + }; + + /** + * Creates a ProfileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + */ + ProfileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); + if (object.nullRatio != null) + message.nullRatio = Number(object.nullRatio); + if (object.distinctRatio != null) + message.distinctRatio = Number(object.distinctRatio); + if (object.topNValues) { + if (!Array.isArray(object.topNValues)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: array expected"); + message.topNValues = []; + for (var i = 0; i < object.topNValues.length; ++i) { + if (typeof object.topNValues[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: object expected"); + message.topNValues[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.fromObject(object.topNValues[i]); + } + } + if (object.stringProfile != null) { + if (typeof object.stringProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.stringProfile: object expected"); + message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.fromObject(object.stringProfile); + } + if (object.integerProfile != null) { + if (typeof object.integerProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.integerProfile: object expected"); + message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.fromObject(object.integerProfile); + } + if (object.doubleProfile != null) { + if (typeof object.doubleProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.doubleProfile: object expected"); + message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.fromObject(object.doubleProfile); + } + return message; + }; + + /** + * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} message ProfileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProfileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.topNValues = []; + if (options.defaults) { + object.nullRatio = 0; + object.distinctRatio = 0; + } + if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) + object.nullRatio = options.json && !isFinite(message.nullRatio) ? String(message.nullRatio) : message.nullRatio; + if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) + object.distinctRatio = options.json && !isFinite(message.distinctRatio) ? String(message.distinctRatio) : message.distinctRatio; + if (message.topNValues && message.topNValues.length) { + object.topNValues = []; + for (var j = 0; j < message.topNValues.length; ++j) + object.topNValues[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.toObject(message.topNValues[j], options); + } + if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { + object.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.toObject(message.stringProfile, options); + if (options.oneofs) + object.fieldInfo = "stringProfile"; + } + if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { + object.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.toObject(message.integerProfile, options); + if (options.oneofs) + object.fieldInfo = "integerProfile"; + } + if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { + object.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.toObject(message.doubleProfile, options); + if (options.oneofs) + object.fieldInfo = "doubleProfile"; + } + return object; + }; + + /** + * Converts this ProfileInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + * @returns {Object.} JSON object + */ + ProfileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProfileInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProfileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"; + }; + + ProfileInfo.StringFieldInfo = (function() { + + /** + * Properties of a StringFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IStringFieldInfo + * @property {number|Long|null} [minLength] StringFieldInfo minLength + * @property {number|Long|null} [maxLength] StringFieldInfo maxLength + * @property {number|null} [averageLength] StringFieldInfo averageLength + */ + + /** + * Constructs a new StringFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a StringFieldInfo. + * @implements IStringFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set + */ + function StringFieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringFieldInfo minLength. + * @member {number|Long} minLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.minLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StringFieldInfo maxLength. + * @member {number|Long} maxLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.maxLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StringFieldInfo averageLength. + * @member {number} averageLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.averageLength = 0; + + /** + * Creates a new StringFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo instance + */ + StringFieldInfo.create = function create(properties) { + return new StringFieldInfo(properties); + }; + + /** + * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minLength != null && Object.hasOwnProperty.call(message, "minLength")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minLength); + if (message.maxLength != null && Object.hasOwnProperty.call(message, "maxLength")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxLength); + if (message.averageLength != null && Object.hasOwnProperty.call(message, "averageLength")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.averageLength); + return writer; + }; + + /** + * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minLength = reader.int64(); + break; + } + case 2: { + message.maxLength = reader.int64(); + break; + } + case 3: { + message.averageLength = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minLength != null && message.hasOwnProperty("minLength")) + if (!$util.isInteger(message.minLength) && !(message.minLength && $util.isInteger(message.minLength.low) && $util.isInteger(message.minLength.high))) + return "minLength: integer|Long expected"; + if (message.maxLength != null && message.hasOwnProperty("maxLength")) + if (!$util.isInteger(message.maxLength) && !(message.maxLength && $util.isInteger(message.maxLength.low) && $util.isInteger(message.maxLength.high))) + return "maxLength: integer|Long expected"; + if (message.averageLength != null && message.hasOwnProperty("averageLength")) + if (typeof message.averageLength !== "number") + return "averageLength: number expected"; + return null; + }; + + /** + * Creates a StringFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + */ + StringFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); + if (object.minLength != null) + if ($util.Long) + (message.minLength = $util.Long.fromValue(object.minLength)).unsigned = false; + else if (typeof object.minLength === "string") + message.minLength = parseInt(object.minLength, 10); + else if (typeof object.minLength === "number") + message.minLength = object.minLength; + else if (typeof object.minLength === "object") + message.minLength = new $util.LongBits(object.minLength.low >>> 0, object.minLength.high >>> 0).toNumber(); + if (object.maxLength != null) + if ($util.Long) + (message.maxLength = $util.Long.fromValue(object.maxLength)).unsigned = false; + else if (typeof object.maxLength === "string") + message.maxLength = parseInt(object.maxLength, 10); + else if (typeof object.maxLength === "number") + message.maxLength = object.maxLength; + else if (typeof object.maxLength === "object") + message.maxLength = new $util.LongBits(object.maxLength.low >>> 0, object.maxLength.high >>> 0).toNumber(); + if (object.averageLength != null) + message.averageLength = Number(object.averageLength); + return message; + }; + + /** + * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} message StringFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFieldInfo.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.minLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minLength = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxLength = options.longs === String ? "0" : 0; + object.averageLength = 0; + } + if (message.minLength != null && message.hasOwnProperty("minLength")) + if (typeof message.minLength === "number") + object.minLength = options.longs === String ? String(message.minLength) : message.minLength; + else + object.minLength = options.longs === String ? $util.Long.prototype.toString.call(message.minLength) : options.longs === Number ? new $util.LongBits(message.minLength.low >>> 0, message.minLength.high >>> 0).toNumber() : message.minLength; + if (message.maxLength != null && message.hasOwnProperty("maxLength")) + if (typeof message.maxLength === "number") + object.maxLength = options.longs === String ? String(message.maxLength) : message.maxLength; + else + object.maxLength = options.longs === String ? $util.Long.prototype.toString.call(message.maxLength) : options.longs === Number ? new $util.LongBits(message.maxLength.low >>> 0, message.maxLength.high >>> 0).toNumber() : message.maxLength; + if (message.averageLength != null && message.hasOwnProperty("averageLength")) + object.averageLength = options.json && !isFinite(message.averageLength) ? String(message.averageLength) : message.averageLength; + return object; + }; + + /** + * Converts this StringFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + * @returns {Object.} JSON object + */ + StringFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"; + }; + + return StringFieldInfo; + })(); + + ProfileInfo.IntegerFieldInfo = (function() { + + /** + * Properties of an IntegerFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IIntegerFieldInfo + * @property {number|null} [average] IntegerFieldInfo average + * @property {number|null} [standardDeviation] IntegerFieldInfo standardDeviation + * @property {number|Long|null} [min] IntegerFieldInfo min + * @property {Array.|null} [quartiles] IntegerFieldInfo quartiles + * @property {number|Long|null} [max] IntegerFieldInfo max + */ + + /** + * Constructs a new IntegerFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents an IntegerFieldInfo. + * @implements IIntegerFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set + */ + function IntegerFieldInfo(properties) { + this.quartiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntegerFieldInfo average. + * @member {number} average + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.average = 0; + + /** + * IntegerFieldInfo standardDeviation. + * @member {number} standardDeviation + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.standardDeviation = 0; + + /** + * IntegerFieldInfo min. + * @member {number|Long} min + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IntegerFieldInfo quartiles. + * @member {Array.} quartiles + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.quartiles = $util.emptyArray; + + /** + * IntegerFieldInfo max. + * @member {number|Long} max + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.max = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IntegerFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo instance + */ + IntegerFieldInfo.create = function create(properties) { + return new IntegerFieldInfo(properties); + }; + + /** + * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntegerFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.average != null && Object.hasOwnProperty.call(message, "average")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); + if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.max); + if (message.quartiles != null && message.quartiles.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.quartiles.length; ++i) + writer.int64(message.quartiles[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntegerFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntegerFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.average = reader.double(); + break; + } + case 3: { + message.standardDeviation = reader.double(); + break; + } + case 4: { + message.min = reader.int64(); + break; + } + case 6: { + if (!(message.quartiles && message.quartiles.length)) + message.quartiles = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.quartiles.push(reader.int64()); + } else + message.quartiles.push(reader.int64()); + break; + } + case 5: { + message.max = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntegerFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntegerFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntegerFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.average != null && message.hasOwnProperty("average")) + if (typeof message.average !== "number") + return "average: number expected"; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + if (typeof message.standardDeviation !== "number") + return "standardDeviation: number expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high))) + return "min: integer|Long expected"; + if (message.quartiles != null && message.hasOwnProperty("quartiles")) { + if (!Array.isArray(message.quartiles)) + return "quartiles: array expected"; + for (var i = 0; i < message.quartiles.length; ++i) + if (!$util.isInteger(message.quartiles[i]) && !(message.quartiles[i] && $util.isInteger(message.quartiles[i].low) && $util.isInteger(message.quartiles[i].high))) + return "quartiles: integer|Long[] expected"; + } + if (message.max != null && message.hasOwnProperty("max")) + if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high))) + return "max: integer|Long expected"; + return null; + }; + + /** + * Creates an IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + */ + IntegerFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); + if (object.average != null) + message.average = Number(object.average); + if (object.standardDeviation != null) + message.standardDeviation = Number(object.standardDeviation); + if (object.min != null) + if ($util.Long) + (message.min = $util.Long.fromValue(object.min)).unsigned = false; + else if (typeof object.min === "string") + message.min = parseInt(object.min, 10); + else if (typeof object.min === "number") + message.min = object.min; + else if (typeof object.min === "object") + message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber(); + if (object.quartiles) { + if (!Array.isArray(object.quartiles)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.quartiles: array expected"); + message.quartiles = []; + for (var i = 0; i < object.quartiles.length; ++i) + if ($util.Long) + (message.quartiles[i] = $util.Long.fromValue(object.quartiles[i])).unsigned = false; + else if (typeof object.quartiles[i] === "string") + message.quartiles[i] = parseInt(object.quartiles[i], 10); + else if (typeof object.quartiles[i] === "number") + message.quartiles[i] = object.quartiles[i]; + else if (typeof object.quartiles[i] === "object") + message.quartiles[i] = new $util.LongBits(object.quartiles[i].low >>> 0, object.quartiles[i].high >>> 0).toNumber(); + } + if (object.max != null) + if ($util.Long) + (message.max = $util.Long.fromValue(object.max)).unsigned = false; + else if (typeof object.max === "string") + message.max = parseInt(object.max, 10); + else if (typeof object.max === "number") + message.max = object.max; + else if (typeof object.max === "object") + message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} message IntegerFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntegerFieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quartiles = []; + if (options.defaults) { + object.average = 0; + object.standardDeviation = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.min = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max = options.longs === String ? "0" : 0; + } + if (message.average != null && message.hasOwnProperty("average")) + object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min === "number") + object.min = options.longs === String ? String(message.min) : message.min; + else + object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max === "number") + object.max = options.longs === String ? String(message.max) : message.max; + else + object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max; + if (message.quartiles && message.quartiles.length) { + object.quartiles = []; + for (var j = 0; j < message.quartiles.length; ++j) + if (typeof message.quartiles[j] === "number") + object.quartiles[j] = options.longs === String ? String(message.quartiles[j]) : message.quartiles[j]; + else + object.quartiles[j] = options.longs === String ? $util.Long.prototype.toString.call(message.quartiles[j]) : options.longs === Number ? new $util.LongBits(message.quartiles[j].low >>> 0, message.quartiles[j].high >>> 0).toNumber() : message.quartiles[j]; + } + return object; + }; + + /** + * Converts this IntegerFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + * @returns {Object.} JSON object + */ + IntegerFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntegerFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntegerFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"; + }; + + return IntegerFieldInfo; + })(); + + ProfileInfo.DoubleFieldInfo = (function() { + + /** + * Properties of a DoubleFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IDoubleFieldInfo + * @property {number|null} [average] DoubleFieldInfo average + * @property {number|null} [standardDeviation] DoubleFieldInfo standardDeviation + * @property {number|null} [min] DoubleFieldInfo min + * @property {Array.|null} [quartiles] DoubleFieldInfo quartiles + * @property {number|null} [max] DoubleFieldInfo max + */ + + /** + * Constructs a new DoubleFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a DoubleFieldInfo. + * @implements IDoubleFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set + */ + function DoubleFieldInfo(properties) { + this.quartiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleFieldInfo average. + * @member {number} average + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.average = 0; + + /** + * DoubleFieldInfo standardDeviation. + * @member {number} standardDeviation + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.standardDeviation = 0; + + /** + * DoubleFieldInfo min. + * @member {number} min + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.min = 0; + + /** + * DoubleFieldInfo quartiles. + * @member {Array.} quartiles + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.quartiles = $util.emptyArray; + + /** + * DoubleFieldInfo max. + * @member {number} max + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.max = 0; + + /** + * Creates a new DoubleFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo instance + */ + DoubleFieldInfo.create = function create(properties) { + return new DoubleFieldInfo(properties); + }; + + /** + * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.average != null && Object.hasOwnProperty.call(message, "average")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); + if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.max); + if (message.quartiles != null && message.quartiles.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.quartiles.length; ++i) + writer.double(message.quartiles[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.average = reader.double(); + break; + } + case 3: { + message.standardDeviation = reader.double(); + break; + } + case 4: { + message.min = reader.double(); + break; + } + case 6: { + if (!(message.quartiles && message.quartiles.length)) + message.quartiles = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.quartiles.push(reader.double()); + } else + message.quartiles.push(reader.double()); + break; + } + case 5: { + message.max = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.average != null && message.hasOwnProperty("average")) + if (typeof message.average !== "number") + return "average: number expected"; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + if (typeof message.standardDeviation !== "number") + return "standardDeviation: number expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.quartiles != null && message.hasOwnProperty("quartiles")) { + if (!Array.isArray(message.quartiles)) + return "quartiles: array expected"; + for (var i = 0; i < message.quartiles.length; ++i) + if (typeof message.quartiles[i] !== "number") + return "quartiles: number[] expected"; + } + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + */ + DoubleFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); + if (object.average != null) + message.average = Number(object.average); + if (object.standardDeviation != null) + message.standardDeviation = Number(object.standardDeviation); + if (object.min != null) + message.min = Number(object.min); + if (object.quartiles) { + if (!Array.isArray(object.quartiles)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.quartiles: array expected"); + message.quartiles = []; + for (var i = 0; i < object.quartiles.length; ++i) + message.quartiles[i] = Number(object.quartiles[i]); + } + if (object.max != null) + message.max = Number(object.max); + return message; + }; + + /** + * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} message DoubleFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleFieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quartiles = []; + if (options.defaults) { + object.average = 0; + object.standardDeviation = 0; + object.min = 0; + object.max = 0; + } + if (message.average != null && message.hasOwnProperty("average")) + object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (message.quartiles && message.quartiles.length) { + object.quartiles = []; + for (var j = 0; j < message.quartiles.length; ++j) + object.quartiles[j] = options.json && !isFinite(message.quartiles[j]) ? String(message.quartiles[j]) : message.quartiles[j]; + } + return object; + }; + + /** + * Converts this DoubleFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + * @returns {Object.} JSON object + */ + DoubleFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"; + }; + + return DoubleFieldInfo; + })(); + + ProfileInfo.TopNValue = (function() { + + /** + * Properties of a TopNValue. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface ITopNValue + * @property {string|null} [value] TopNValue value + * @property {number|Long|null} [count] TopNValue count + * @property {number|null} [ratio] TopNValue ratio + */ + + /** + * Constructs a new TopNValue. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a TopNValue. + * @implements ITopNValue + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set + */ + function TopNValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TopNValue value. + * @member {string} value + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + */ + TopNValue.prototype.value = ""; + + /** + * TopNValue count. + * @member {number|Long} count + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + */ + TopNValue.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TopNValue ratio. + * @member {number} ratio + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + */ + TopNValue.prototype.ratio = 0; + + /** + * Creates a new TopNValue instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue instance + */ + TopNValue.create = function create(properties) { + return new TopNValue(properties); + }; + + /** + * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TopNValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.ratio); + return writer; + }; + + /** + * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TopNValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TopNValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TopNValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.count = reader.int64(); + break; + } + case 3: { + message.ratio = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TopNValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TopNValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TopNValue message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TopNValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.ratio != null && message.hasOwnProperty("ratio")) + if (typeof message.ratio !== "number") + return "ratio: number expected"; + return null; + }; + + /** + * Creates a TopNValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + */ + TopNValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); + if (object.value != null) + message.value = String(object.value); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.ratio != null) + message.ratio = Number(object.ratio); + return message; + }; + + /** + * Creates a plain object from a TopNValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} message TopNValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TopNValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.ratio = 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.ratio != null && message.hasOwnProperty("ratio")) + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + return object; + }; + + /** + * Converts this TopNValue to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + * @returns {Object.} JSON object + */ + TopNValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TopNValue + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TopNValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"; + }; + + return TopNValue; + })(); + + return ProfileInfo; + })(); + + return Field; + })(); + + return Profile; + })(); + + DataProfileResult.PostScanActionsResult = (function() { + + /** + * Properties of a PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @interface IPostScanActionsResult + * @property {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult + */ + + /** + * Constructs a new PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @classdesc Represents a PostScanActionsResult. + * @implements IPostScanActionsResult + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult=} [properties] Properties to set + */ + function PostScanActionsResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostScanActionsResult bigqueryExportResult. + * @member {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @instance + */ + PostScanActionsResult.prototype.bigqueryExportResult = null; + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult instance + */ + PostScanActionsResult.create = function create(properties) { + return new PostScanActionsResult(properties); + }; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostScanActionsResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostScanActionsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); + if (error) + return "bigqueryExportResult." + error; + } + return null; + }; + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult + */ + PostScanActionsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(); + if (object.bigqueryExportResult != null) { + if (typeof object.bigqueryExportResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.bigqueryExportResult: object expected"); + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); + } + return message; + }; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} message PostScanActionsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostScanActionsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryExportResult = null; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) + object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); + return object; + }; + + /** + * Converts this PostScanActionsResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @instance + * @returns {Object.} JSON object + */ + PostScanActionsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostScanActionsResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"; + }; + + PostScanActionsResult.BigQueryExportResult = (function() { + + /** + * Properties of a BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @interface IBigQueryExportResult + * @property {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state + * @property {string|null} [message] BigQueryExportResult message + */ + + /** + * Constructs a new BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + * @classdesc Represents a BigQueryExportResult. + * @implements IBigQueryExportResult + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + */ + function BigQueryExportResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryExportResult state. + * @member {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State} state + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.state = 0; + + /** + * BigQueryExportResult message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.message = ""; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance + */ + BigQueryExportResult.create = function create(properties) { + return new BigQueryExportResult(properties); + }; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryExportResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + */ + BigQueryExportResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "SKIPPED": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryExportResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this BigQueryExportResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @instance + * @returns {Object.} JSON object + */ + BigQueryExportResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryExportResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} SKIPPED=3 SKIPPED value + */ + BigQueryExportResult.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "SKIPPED"] = 3; + return values; + })(); + + return BigQueryExportResult; + })(); + + return PostScanActionsResult; + })(); + + return DataProfileResult; + })(); + + v1.Trigger = (function() { + + /** + * Properties of a Trigger. + * @memberof google.cloud.dataplex.v1 + * @interface ITrigger + * @property {google.cloud.dataplex.v1.Trigger.IOnDemand|null} [onDemand] Trigger onDemand + * @property {google.cloud.dataplex.v1.Trigger.ISchedule|null} [schedule] Trigger schedule + */ + + /** + * Constructs a new Trigger. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Trigger. + * @implements ITrigger + * @constructor + * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set + */ + function Trigger(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trigger onDemand. + * @member {google.cloud.dataplex.v1.Trigger.IOnDemand|null|undefined} onDemand + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Trigger.prototype.onDemand = null; + + /** + * Trigger schedule. + * @member {google.cloud.dataplex.v1.Trigger.ISchedule|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Trigger.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Trigger mode. + * @member {"onDemand"|"schedule"|undefined} mode + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Object.defineProperty(Trigger.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["onDemand", "schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Trigger instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger} Trigger instance + */ + Trigger.create = function create(properties) { + return new Trigger(properties); + }; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onDemand != null && Object.hasOwnProperty.call(message, "onDemand")) + $root.google.cloud.dataplex.v1.Trigger.OnDemand.encode(message.onDemand, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + $root.google.cloud.dataplex.v1.Trigger.Schedule.encode(message.schedule, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.decode(reader, reader.uint32()); + break; + } + case 101: { + message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trigger message. + * @function verify + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onDemand != null && message.hasOwnProperty("onDemand")) { + properties.mode = 1; + { + var error = $root.google.cloud.dataplex.v1.Trigger.OnDemand.verify(message.onDemand); + if (error) + return "onDemand." + error; + } + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.cloud.dataplex.v1.Trigger.Schedule.verify(message.schedule); + if (error) + return "schedule." + error; + } + } + return null; + }; + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + */ + Trigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger) + return object; + var message = new $root.google.cloud.dataplex.v1.Trigger(); + if (object.onDemand != null) { + if (typeof object.onDemand !== "object") + throw TypeError(".google.cloud.dataplex.v1.Trigger.onDemand: object expected"); + message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.fromObject(object.onDemand); + } + if (object.schedule != null) { + if (typeof object.schedule !== "object") + throw TypeError(".google.cloud.dataplex.v1.Trigger.schedule: object expected"); + message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.fromObject(object.schedule); + } + return message; + }; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.Trigger} message Trigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.onDemand != null && message.hasOwnProperty("onDemand")) { + object.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.toObject(message.onDemand, options); + if (options.oneofs) + object.mode = "onDemand"; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.toObject(message.schedule, options); + if (options.oneofs) + object.mode = "schedule"; + } + return object; + }; + + /** + * Converts this Trigger to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + * @returns {Object.} JSON object + */ + Trigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trigger + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger"; + }; + + Trigger.OnDemand = (function() { + + /** + * Properties of an OnDemand. + * @memberof google.cloud.dataplex.v1.Trigger + * @interface IOnDemand + */ + + /** + * Constructs a new OnDemand. + * @memberof google.cloud.dataplex.v1.Trigger + * @classdesc Represents an OnDemand. + * @implements IOnDemand + * @constructor + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set + */ + function OnDemand(properties) { + if (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 OnDemand instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand instance + */ + OnDemand.create = function create(properties) { + return new OnDemand(properties); + }; + + /** + * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnDemand.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnDemand.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OnDemand message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnDemand.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OnDemand message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnDemand.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OnDemand message. + * @function verify + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OnDemand.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + */ + OnDemand.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger.OnDemand) + return object; + return new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); + }; + + /** + * Creates a plain object from an OnDemand message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.OnDemand} message OnDemand + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OnDemand.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OnDemand to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @instance + * @returns {Object.} JSON object + */ + OnDemand.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OnDemand + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OnDemand.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.OnDemand"; + }; + + return OnDemand; + })(); + + Trigger.Schedule = (function() { + + /** + * Properties of a Schedule. + * @memberof google.cloud.dataplex.v1.Trigger + * @interface ISchedule + * @property {string|null} [cron] Schedule cron + */ + + /** + * Constructs a new Schedule. + * @memberof google.cloud.dataplex.v1.Trigger + * @classdesc Represents a Schedule. + * @implements ISchedule + * @constructor + * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set + */ + function Schedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schedule cron. + * @member {string} cron + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @instance + */ + Schedule.prototype.cron = ""; + + /** + * Creates a new Schedule instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule instance + */ + Schedule.create = function create(properties) { + return new Schedule(properties); + }; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cron != null && Object.hasOwnProperty.call(message, "cron")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cron); + return writer; + }; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cron = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schedule message. + * @function verify + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cron != null && message.hasOwnProperty("cron")) + if (!$util.isString(message.cron)) + return "cron: string expected"; + return null; + }; + + /** + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule + */ + Schedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger.Schedule) + return object; + var message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); + if (object.cron != null) + message.cron = String(object.cron); + return message; + }; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {google.cloud.dataplex.v1.Trigger.Schedule} message Schedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cron = ""; + if (message.cron != null && message.hasOwnProperty("cron")) + object.cron = message.cron; + return object; + }; + + /** + * Converts this Schedule to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @instance + * @returns {Object.} JSON object + */ + Schedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schedule + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Trigger.Schedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.Schedule"; + }; + + return Schedule; + })(); + + return Trigger; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.dataplex.v1 + * @interface IDataSource + * @property {string|null} [entity] DataSource entity + * @property {string|null} [resource] DataSource resource + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.dataplex.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 entity. + * @member {string|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DataSource + * @instance + */ + DataSource.prototype.entity = null; + + /** + * DataSource resource. + * @member {string|null|undefined} resource + * @memberof google.cloud.dataplex.v1.DataSource + * @instance + */ + DataSource.prototype.resource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSource source. + * @member {"entity"|"resource"|undefined} source + * @memberof google.cloud.dataplex.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["entity", "resource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.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.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.entity); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.resource); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DataSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.entity = reader.string(); + break; + } + case 101: { + message.resource = reader.string(); + 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.dataplex.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.entity != null && message.hasOwnProperty("entity")) { + properties.source = 1; + if (!$util.isString(message.entity)) + return "entity: string expected"; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.resource)) + return "resource: string expected"; + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataSource) + return object; + var message = new $root.google.cloud.dataplex.v1.DataSource(); + if (object.entity != null) + message.entity = String(object.entity); + if (object.resource != null) + message.resource = String(object.resource); + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.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 (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = message.entity; + if (options.oneofs) + object.source = "entity"; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + object.resource = message.resource; + if (options.oneofs) + object.source = "resource"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.DataSource"; + }; + + return DataSource; + })(); + + v1.ScannedData = (function() { + + /** + * Properties of a ScannedData. + * @memberof google.cloud.dataplex.v1 + * @interface IScannedData + * @property {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null} [incrementalField] ScannedData incrementalField + */ + + /** + * Constructs a new ScannedData. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ScannedData. + * @implements IScannedData + * @constructor + * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set + */ + function ScannedData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScannedData incrementalField. + * @member {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null|undefined} incrementalField + * @memberof google.cloud.dataplex.v1.ScannedData + * @instance + */ + ScannedData.prototype.incrementalField = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ScannedData dataRange. + * @member {"incrementalField"|undefined} dataRange + * @memberof google.cloud.dataplex.v1.ScannedData + * @instance + */ + Object.defineProperty(ScannedData.prototype, "dataRange", { + get: $util.oneOfGetter($oneOfFields = ["incrementalField"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ScannedData instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData instance + */ + ScannedData.create = function create(properties) { + return new ScannedData(properties); + }; + + /** + * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScannedData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.incrementalField != null && Object.hasOwnProperty.call(message, "incrementalField")) + $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.encode(message.incrementalField, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScannedData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScannedData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScannedData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScannedData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScannedData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScannedData message. + * @function verify + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScannedData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { + properties.dataRange = 1; + { + var error = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.verify(message.incrementalField); + if (error) + return "incrementalField." + error; + } + } + return null; + }; + + /** + * Creates a ScannedData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData + */ + ScannedData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ScannedData) + return object; + var message = new $root.google.cloud.dataplex.v1.ScannedData(); + if (object.incrementalField != null) { + if (typeof object.incrementalField !== "object") + throw TypeError(".google.cloud.dataplex.v1.ScannedData.incrementalField: object expected"); + message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.fromObject(object.incrementalField); + } + return message; + }; + + /** + * Creates a plain object from a ScannedData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {google.cloud.dataplex.v1.ScannedData} message ScannedData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScannedData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { + object.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.toObject(message.incrementalField, options); + if (options.oneofs) + object.dataRange = "incrementalField"; + } + return object; + }; + + /** + * Converts this ScannedData to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ScannedData + * @instance + * @returns {Object.} JSON object + */ + ScannedData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScannedData + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ScannedData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScannedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData"; + }; + + ScannedData.IncrementalField = (function() { + + /** + * Properties of an IncrementalField. + * @memberof google.cloud.dataplex.v1.ScannedData + * @interface IIncrementalField + * @property {string|null} [field] IncrementalField field + * @property {string|null} [start] IncrementalField start + * @property {string|null} [end] IncrementalField end + */ + + /** + * Constructs a new IncrementalField. + * @memberof google.cloud.dataplex.v1.ScannedData + * @classdesc Represents an IncrementalField. + * @implements IIncrementalField + * @constructor + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set + */ + function IncrementalField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IncrementalField field. + * @member {string} field + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.field = ""; + + /** + * IncrementalField start. + * @member {string} start + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.start = ""; + + /** + * IncrementalField end. + * @member {string} end + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.end = ""; + + /** + * Creates a new IncrementalField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField instance + */ + IncrementalField.create = function create(properties) { + return new IncrementalField(properties); + }; + + /** + * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.end); + return writer; + }; + + /** + * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.start = reader.string(); + break; + } + case 3: { + message.end = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalField message. + * @function verify + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isString(message.start)) + return "start: string expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isString(message.end)) + return "end: string expected"; + return null; + }; + + /** + * Creates an IncrementalField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + */ + IncrementalField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ScannedData.IncrementalField) + return object; + var message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); + if (object.field != null) + message.field = String(object.field); + if (object.start != null) + message.start = String(object.start); + if (object.end != null) + message.end = String(object.end); + return message; + }; + + /** + * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IncrementalField} message IncrementalField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.start = ""; + object.end = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + 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 IncrementalField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + * @returns {Object.} JSON object + */ + IncrementalField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncrementalField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData.IncrementalField"; + }; + + return IncrementalField; + })(); + + return ScannedData; + })(); + + v1.DataQualitySpec = (function() { + + /** + * Properties of a DataQualitySpec. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualitySpec + * @property {Array.|null} [rules] DataQualitySpec rules + * @property {number|null} [samplingPercent] DataQualitySpec samplingPercent + * @property {string|null} [rowFilter] DataQualitySpec rowFilter + * @property {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null} [postScanActions] DataQualitySpec postScanActions + */ + + /** + * Constructs a new DataQualitySpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualitySpec. + * @implements IDataQualitySpec + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set + */ + function DataQualitySpec(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]]; + } + + /** + * DataQualitySpec rules. + * @member {Array.} rules + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + */ + DataQualitySpec.prototype.rules = $util.emptyArray; + + /** + * DataQualitySpec samplingPercent. + * @member {number} samplingPercent + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + */ + DataQualitySpec.prototype.samplingPercent = 0; + + /** + * DataQualitySpec rowFilter. + * @member {string} rowFilter + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + */ + DataQualitySpec.prototype.rowFilter = ""; + + /** + * DataQualitySpec postScanActions. + * @member {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null|undefined} postScanActions + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + */ + DataQualitySpec.prototype.postScanActions = null; + + /** + * Creates a new DataQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec instance + */ + DataQualitySpec.create = function create(properties) { + return new DataQualitySpec(properties); + }; + + /** + * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.samplingPercent); + if (message.rowFilter != null && Object.hasOwnProperty.call(message, "rowFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rowFilter); + if (message.postScanActions != null && Object.hasOwnProperty.call(message, "postScanActions")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.encode(message.postScanActions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualitySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); + 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.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32())); + break; + } + case 4: { + message.samplingPercent = reader.float(); + break; + } + case 5: { + message.rowFilter = reader.string(); + break; + } + case 6: { + message.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualitySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + if (typeof message.samplingPercent !== "number") + return "samplingPercent: number expected"; + if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) + if (!$util.isString(message.rowFilter)) + return "rowFilter: string expected"; + if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify(message.postScanActions); + if (error) + return "postScanActions." + error; + } + return null; + }; + + /** + * Creates a DataQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + */ + DataQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: object expected"); + message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rules[i]); + } + } + if (object.samplingPercent != null) + message.samplingPercent = Number(object.samplingPercent); + if (object.rowFilter != null) + message.rowFilter = String(object.rowFilter); + if (object.postScanActions != null) { + if (typeof object.postScanActions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.postScanActions: object expected"); + message.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.fromObject(object.postScanActions); + } + return message; + }; + + /** + * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec} message DataQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) { + object.samplingPercent = 0; + object.rowFilter = ""; + object.postScanActions = null; + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rules[j], options); + } + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; + if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) + object.rowFilter = message.rowFilter; + if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) + object.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.toObject(message.postScanActions, options); + return object; + }; + + /** + * Converts this DataQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + * @returns {Object.} JSON object + */ + DataQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualitySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec"; + }; + + DataQualitySpec.PostScanActions = (function() { + + /** + * Properties of a PostScanActions. + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @interface IPostScanActions + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null} [bigqueryExport] PostScanActions bigqueryExport + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null} [notificationReport] PostScanActions notificationReport + */ + + /** + * Constructs a new PostScanActions. + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @classdesc Represents a PostScanActions. + * @implements IPostScanActions + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions=} [properties] Properties to set + */ + function PostScanActions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostScanActions bigqueryExport. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null|undefined} bigqueryExport + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @instance + */ + PostScanActions.prototype.bigqueryExport = null; + + /** + * PostScanActions notificationReport. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null|undefined} notificationReport + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @instance + */ + PostScanActions.prototype.notificationReport = null; + + /** + * Creates a new PostScanActions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions instance + */ + PostScanActions.create = function create(properties) { + return new PostScanActions(properties); + }; + + /** + * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions} message PostScanActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryExport != null && Object.hasOwnProperty.call(message, "bigqueryExport")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.encode(message.bigqueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.notificationReport != null && Object.hasOwnProperty.call(message, "notificationReport")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.encode(message.notificationReport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions} message PostScanActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostScanActions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostScanActions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostScanActions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostScanActions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify(message.bigqueryExport); + if (error) + return "bigqueryExport." + error; + } + if (message.notificationReport != null && message.hasOwnProperty("notificationReport")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify(message.notificationReport); + if (error) + return "notificationReport." + error; + } + return null; + }; + + /** + * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions + */ + PostScanActions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(); + if (object.bigqueryExport != null) { + if (typeof object.bigqueryExport !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.bigqueryExport: object expected"); + message.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.fromObject(object.bigqueryExport); + } + if (object.notificationReport != null) { + if (typeof object.notificationReport !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.notificationReport: object expected"); + message.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.fromObject(object.notificationReport); + } + return message; + }; + + /** + * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} message PostScanActions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostScanActions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bigqueryExport = null; + object.notificationReport = null; + } + if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) + object.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.toObject(message.bigqueryExport, options); + if (message.notificationReport != null && message.hasOwnProperty("notificationReport")) + object.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.toObject(message.notificationReport, options); + return object; + }; + + /** + * Converts this PostScanActions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @instance + * @returns {Object.} JSON object + */ + PostScanActions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostScanActions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostScanActions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"; + }; + + PostScanActions.BigQueryExport = (function() { + + /** + * Properties of a BigQueryExport. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface IBigQueryExport + * @property {string|null} [resultsTable] BigQueryExport resultsTable + */ + + /** + * Constructs a new BigQueryExport. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a BigQueryExport. + * @implements IBigQueryExport + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport=} [properties] Properties to set + */ + function BigQueryExport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryExport resultsTable. + * @member {string} resultsTable + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @instance + */ + BigQueryExport.prototype.resultsTable = ""; + + /** + * Creates a new BigQueryExport instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport instance + */ + BigQueryExport.create = function create(properties) { + return new BigQueryExport(properties); + }; + + /** + * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resultsTable != null && Object.hasOwnProperty.call(message, "resultsTable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resultsTable); + return writer; + }; + + /** + * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resultsTable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryExport message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryExport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) + if (!$util.isString(message.resultsTable)) + return "resultsTable: string expected"; + return null; + }; + + /** + * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport + */ + BigQueryExport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(); + if (object.resultsTable != null) + message.resultsTable = String(object.resultsTable); + return message; + }; + + /** + * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} message BigQueryExport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryExport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.resultsTable = ""; + if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) + object.resultsTable = message.resultsTable; + return object; + }; + + /** + * Converts this BigQueryExport to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @instance + * @returns {Object.} JSON object + */ + BigQueryExport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryExport + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"; + }; + + return BigQueryExport; + })(); + + PostScanActions.Recipients = (function() { + + /** + * Properties of a Recipients. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface IRecipients + * @property {Array.|null} [emails] Recipients emails + */ + + /** + * Constructs a new Recipients. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a Recipients. + * @implements IRecipients + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients=} [properties] Properties to set + */ + function Recipients(properties) { + this.emails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Recipients emails. + * @member {Array.} emails + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @instance + */ + Recipients.prototype.emails = $util.emptyArray; + + /** + * Creates a new Recipients instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients instance + */ + Recipients.create = function create(properties) { + return new Recipients(properties); + }; + + /** + * Encodes the specified Recipients message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients} message Recipients message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Recipients.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.emails != null && message.emails.length) + for (var i = 0; i < message.emails.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.emails[i]); + return writer; + }; + + /** + * Encodes the specified Recipients message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients} message Recipients message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Recipients.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Recipients message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Recipients.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.emails && message.emails.length)) + message.emails = []; + message.emails.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Recipients message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Recipients.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Recipients message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Recipients.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.emails != null && message.hasOwnProperty("emails")) { + if (!Array.isArray(message.emails)) + return "emails: array expected"; + for (var i = 0; i < message.emails.length; ++i) + if (!$util.isString(message.emails[i])) + return "emails: string[] expected"; + } + return null; + }; + + /** + * Creates a Recipients message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients + */ + Recipients.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients(); + if (object.emails) { + if (!Array.isArray(object.emails)) + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.emails: array expected"); + message.emails = []; + for (var i = 0; i < object.emails.length; ++i) + message.emails[i] = String(object.emails[i]); + } + return message; + }; + + /** + * Creates a plain object from a Recipients message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} message Recipients + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Recipients.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.emails = []; + if (message.emails && message.emails.length) { + object.emails = []; + for (var j = 0; j < message.emails.length; ++j) + object.emails[j] = message.emails[j]; + } + return object; + }; + + /** + * Converts this Recipients to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @instance + * @returns {Object.} JSON object + */ + Recipients.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Recipients + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Recipients.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"; + }; + + return Recipients; + })(); + + PostScanActions.ScoreThresholdTrigger = (function() { + + /** + * Properties of a ScoreThresholdTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface IScoreThresholdTrigger + * @property {number|null} [scoreThreshold] ScoreThresholdTrigger scoreThreshold + */ + + /** + * Constructs a new ScoreThresholdTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a ScoreThresholdTrigger. + * @implements IScoreThresholdTrigger + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger=} [properties] Properties to set + */ + function ScoreThresholdTrigger(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScoreThresholdTrigger scoreThreshold. + * @member {number} scoreThreshold + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @instance + */ + ScoreThresholdTrigger.prototype.scoreThreshold = 0; + + /** + * Creates a new ScoreThresholdTrigger instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger instance + */ + ScoreThresholdTrigger.create = function create(properties) { + return new ScoreThresholdTrigger(properties); + }; + + /** + * Encodes the specified ScoreThresholdTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger} message ScoreThresholdTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScoreThresholdTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scoreThreshold != null && Object.hasOwnProperty.call(message, "scoreThreshold")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.scoreThreshold); + return writer; + }; + + /** + * Encodes the specified ScoreThresholdTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger} message ScoreThresholdTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScoreThresholdTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScoreThresholdTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScoreThresholdTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.scoreThreshold = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScoreThresholdTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScoreThresholdTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScoreThresholdTrigger message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScoreThresholdTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scoreThreshold != null && message.hasOwnProperty("scoreThreshold")) + if (typeof message.scoreThreshold !== "number") + return "scoreThreshold: number expected"; + return null; + }; + + /** + * Creates a ScoreThresholdTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger + */ + ScoreThresholdTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger(); + if (object.scoreThreshold != null) + message.scoreThreshold = Number(object.scoreThreshold); + return message; + }; + + /** + * Creates a plain object from a ScoreThresholdTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} message ScoreThresholdTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScoreThresholdTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scoreThreshold = 0; + if (message.scoreThreshold != null && message.hasOwnProperty("scoreThreshold")) + object.scoreThreshold = options.json && !isFinite(message.scoreThreshold) ? String(message.scoreThreshold) : message.scoreThreshold; + return object; + }; + + /** + * Converts this ScoreThresholdTrigger to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @instance + * @returns {Object.} JSON object + */ + ScoreThresholdTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScoreThresholdTrigger + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScoreThresholdTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"; + }; + + return ScoreThresholdTrigger; + })(); + + PostScanActions.JobFailureTrigger = (function() { + + /** + * Properties of a JobFailureTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface IJobFailureTrigger + */ + + /** + * Constructs a new JobFailureTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a JobFailureTrigger. + * @implements IJobFailureTrigger + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger=} [properties] Properties to set + */ + function JobFailureTrigger(properties) { + if (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 JobFailureTrigger instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger instance + */ + JobFailureTrigger.create = function create(properties) { + return new JobFailureTrigger(properties); + }; + + /** + * Encodes the specified JobFailureTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger} message JobFailureTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobFailureTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified JobFailureTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger} message JobFailureTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobFailureTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobFailureTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobFailureTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobFailureTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobFailureTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobFailureTrigger message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobFailureTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a JobFailureTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger + */ + JobFailureTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger) + return object; + return new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger(); + }; + + /** + * Creates a plain object from a JobFailureTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} message JobFailureTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobFailureTrigger.toObject = function toObject() { + return {}; + }; + + /** + * Converts this JobFailureTrigger to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @instance + * @returns {Object.} JSON object + */ + JobFailureTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobFailureTrigger + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobFailureTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"; + }; + + return JobFailureTrigger; + })(); + + PostScanActions.JobEndTrigger = (function() { + + /** + * Properties of a JobEndTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface IJobEndTrigger + */ + + /** + * Constructs a new JobEndTrigger. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a JobEndTrigger. + * @implements IJobEndTrigger + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger=} [properties] Properties to set + */ + function JobEndTrigger(properties) { + if (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 JobEndTrigger instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger instance + */ + JobEndTrigger.create = function create(properties) { + return new JobEndTrigger(properties); + }; + + /** + * Encodes the specified JobEndTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger} message JobEndTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEndTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified JobEndTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger} message JobEndTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEndTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEndTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEndTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEndTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEndTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEndTrigger message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEndTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a JobEndTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger + */ + JobEndTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger) + return object; + return new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger(); + }; + + /** + * Creates a plain object from a JobEndTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} message JobEndTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEndTrigger.toObject = function toObject() { + return {}; + }; + + /** + * Converts this JobEndTrigger to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @instance + * @returns {Object.} JSON object + */ + JobEndTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobEndTrigger + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobEndTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"; + }; + + return JobEndTrigger; + })(); + + PostScanActions.NotificationReport = (function() { + + /** + * Properties of a NotificationReport. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @interface INotificationReport + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null} [recipients] NotificationReport recipients + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null} [scoreThresholdTrigger] NotificationReport scoreThresholdTrigger + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null} [jobFailureTrigger] NotificationReport jobFailureTrigger + * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null} [jobEndTrigger] NotificationReport jobEndTrigger + */ + + /** + * Constructs a new NotificationReport. + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + * @classdesc Represents a NotificationReport. + * @implements INotificationReport + * @constructor + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport=} [properties] Properties to set + */ + function NotificationReport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationReport recipients. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null|undefined} recipients + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @instance + */ + NotificationReport.prototype.recipients = null; + + /** + * NotificationReport scoreThresholdTrigger. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null|undefined} scoreThresholdTrigger + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @instance + */ + NotificationReport.prototype.scoreThresholdTrigger = null; + + /** + * NotificationReport jobFailureTrigger. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null|undefined} jobFailureTrigger + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @instance + */ + NotificationReport.prototype.jobFailureTrigger = null; + + /** + * NotificationReport jobEndTrigger. + * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null|undefined} jobEndTrigger + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @instance + */ + NotificationReport.prototype.jobEndTrigger = null; + + /** + * Creates a new NotificationReport instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport instance + */ + NotificationReport.create = function create(properties) { + return new NotificationReport(properties); + }; + + /** + * Encodes the specified NotificationReport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport} message NotificationReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recipients != null && Object.hasOwnProperty.call(message, "recipients")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.encode(message.recipients, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.scoreThresholdTrigger != null && Object.hasOwnProperty.call(message, "scoreThresholdTrigger")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.encode(message.scoreThresholdTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jobFailureTrigger != null && Object.hasOwnProperty.call(message, "jobFailureTrigger")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.encode(message.jobFailureTrigger, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jobEndTrigger != null && Object.hasOwnProperty.call(message, "jobEndTrigger")) + $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.encode(message.jobEndTrigger, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationReport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport} message NotificationReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationReport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.decode(reader, reader.uint32()); + break; + } + case 2: { + message.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.decode(reader, reader.uint32()); + break; + } + case 4: { + message.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationReport message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recipients != null && message.hasOwnProperty("recipients")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify(message.recipients); + if (error) + return "recipients." + error; + } + if (message.scoreThresholdTrigger != null && message.hasOwnProperty("scoreThresholdTrigger")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify(message.scoreThresholdTrigger); + if (error) + return "scoreThresholdTrigger." + error; + } + if (message.jobFailureTrigger != null && message.hasOwnProperty("jobFailureTrigger")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify(message.jobFailureTrigger); + if (error) + return "jobFailureTrigger." + error; + } + if (message.jobEndTrigger != null && message.hasOwnProperty("jobEndTrigger")) { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify(message.jobEndTrigger); + if (error) + return "jobEndTrigger." + error; + } + return null; + }; + + /** + * Creates a NotificationReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport + */ + NotificationReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport(); + if (object.recipients != null) { + if (typeof object.recipients !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.recipients: object expected"); + message.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.fromObject(object.recipients); + } + if (object.scoreThresholdTrigger != null) { + if (typeof object.scoreThresholdTrigger !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.scoreThresholdTrigger: object expected"); + message.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.fromObject(object.scoreThresholdTrigger); + } + if (object.jobFailureTrigger != null) { + if (typeof object.jobFailureTrigger !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.jobFailureTrigger: object expected"); + message.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.fromObject(object.jobFailureTrigger); + } + if (object.jobEndTrigger != null) { + if (typeof object.jobEndTrigger !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.jobEndTrigger: object expected"); + message.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.fromObject(object.jobEndTrigger); + } + return message; + }; + + /** + * Creates a plain object from a NotificationReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} message NotificationReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.recipients = null; + object.scoreThresholdTrigger = null; + object.jobFailureTrigger = null; + object.jobEndTrigger = null; + } + if (message.recipients != null && message.hasOwnProperty("recipients")) + object.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.toObject(message.recipients, options); + if (message.scoreThresholdTrigger != null && message.hasOwnProperty("scoreThresholdTrigger")) + object.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.toObject(message.scoreThresholdTrigger, options); + if (message.jobFailureTrigger != null && message.hasOwnProperty("jobFailureTrigger")) + object.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.toObject(message.jobFailureTrigger, options); + if (message.jobEndTrigger != null && message.hasOwnProperty("jobEndTrigger")) + object.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.toObject(message.jobEndTrigger, options); + return object; + }; + + /** + * Converts this NotificationReport to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @instance + * @returns {Object.} JSON object + */ + NotificationReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationReport + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"; + }; + + return NotificationReport; + })(); + + return PostScanActions; + })(); + + return DataQualitySpec; + })(); + + v1.DataQualityResult = (function() { + + /** + * Properties of a DataQualityResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityResult + * @property {boolean|null} [passed] DataQualityResult passed + * @property {number|null} [score] DataQualityResult score + * @property {Array.|null} [dimensions] DataQualityResult dimensions + * @property {Array.|null} [columns] DataQualityResult columns + * @property {Array.|null} [rules] DataQualityResult rules + * @property {number|Long|null} [rowCount] DataQualityResult rowCount + * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataQualityResult scannedData + * @property {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null} [postScanActionsResult] DataQualityResult postScanActionsResult + */ + + /** + * Constructs a new DataQualityResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityResult. + * @implements IDataQualityResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set + */ + function DataQualityResult(properties) { + this.dimensions = []; + this.columns = []; + 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]]; + } + + /** + * DataQualityResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.passed = false; + + /** + * DataQualityResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.score = null; + + /** + * DataQualityResult dimensions. + * @member {Array.} dimensions + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.dimensions = $util.emptyArray; + + /** + * DataQualityResult columns. + * @member {Array.} columns + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.columns = $util.emptyArray; + + /** + * DataQualityResult rules. + * @member {Array.} rules + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rules = $util.emptyArray; + + /** + * DataQualityResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityResult scannedData. + * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.scannedData = null; + + /** + * DataQualityResult postScanActionsResult. + * @member {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null|undefined} postScanActionsResult + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.postScanActionsResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQualityResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + Object.defineProperty(DataQualityResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult instance + */ + DataQualityResult.create = function create(properties) { + return new DataQualityResult(properties); + }; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityDimensionResult.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityRuleResult.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowCount); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passed); + if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) + $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.score); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityColumnResult.encode(message.columns[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.passed = reader.bool(); + break; + } + case 9: { + message.score = reader.float(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.cloud.dataplex.v1.DataQualityDimensionResult.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.dataplex.v1.DataQualityColumnResult.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.dataplex.v1.DataQualityRuleResult.decode(reader, reader.uint32())); + break; + } + case 4: { + message.rowCount = reader.int64(); + break; + } + case 7: { + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + 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.dataplex.v1.DataQualityColumnResult.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityRuleResult.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.scannedData != null && message.hasOwnProperty("scannedData")) { + var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); + if (error) + return "scannedData." + error; + } + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify(message.postScanActionsResult); + if (error) + return "postScanActionsResult." + error; + } + return null; + }; + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + */ + DataQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityResult(); + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.score != null) + message.score = Number(object.score); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: object expected"); + message.dimensions[i] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.fromObject(object.dimensions[i]); + } + } + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.columns: object expected"); + message.columns[i] = $root.google.cloud.dataplex.v1.DataQualityColumnResult.fromObject(object.columns[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: object expected"); + message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.fromObject(object.rules[i]); + } + } + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.scannedData != null) { + if (typeof object.scannedData !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.scannedData: object expected"); + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); + } + if (object.postScanActionsResult != null) { + if (typeof object.postScanActionsResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.postScanActionsResult: object expected"); + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.fromObject(object.postScanActionsResult); + } + return message; + }; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult} message DataQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.rules = []; + object.columns = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.passed = false; + object.scannedData = null; + object.postScanActionsResult = null; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.toObject(message.dimensions[j], options); + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.toObject(message.rules[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + if (message.scannedData != null && message.hasOwnProperty("scannedData")) + object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) + object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.toObject(message.postScanActionsResult, options); + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.dataplex.v1.DataQualityColumnResult.toObject(message.columns[j], options); + } + return object; + }; + + /** + * Converts this DataQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult"; + }; + + DataQualityResult.PostScanActionsResult = (function() { + + /** + * Properties of a PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @interface IPostScanActionsResult + * @property {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult + */ + + /** + * Constructs a new PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @classdesc Represents a PostScanActionsResult. + * @implements IPostScanActionsResult + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult=} [properties] Properties to set + */ + function PostScanActionsResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostScanActionsResult bigqueryExportResult. + * @member {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @instance + */ + PostScanActionsResult.prototype.bigqueryExportResult = null; + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult instance + */ + PostScanActionsResult.create = function create(properties) { + return new PostScanActionsResult(properties); + }; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostScanActionsResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostScanActionsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); + if (error) + return "bigqueryExportResult." + error; + } + return null; + }; + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult + */ + PostScanActionsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(); + if (object.bigqueryExportResult != null) { + if (typeof object.bigqueryExportResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.bigqueryExportResult: object expected"); + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); + } + return message; + }; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} message PostScanActionsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostScanActionsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryExportResult = null; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) + object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); + return object; + }; + + /** + * Converts this PostScanActionsResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @instance + * @returns {Object.} JSON object + */ + PostScanActionsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostScanActionsResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"; + }; + + PostScanActionsResult.BigQueryExportResult = (function() { + + /** + * Properties of a BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @interface IBigQueryExportResult + * @property {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state + * @property {string|null} [message] BigQueryExportResult message + */ + + /** + * Constructs a new BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + * @classdesc Represents a BigQueryExportResult. + * @implements IBigQueryExportResult + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + */ + function BigQueryExportResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryExportResult state. + * @member {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State} state + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.state = 0; + + /** + * BigQueryExportResult message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.message = ""; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance + */ + BigQueryExportResult.create = function create(properties) { + return new BigQueryExportResult(properties); + }; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryExportResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + */ + BigQueryExportResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "SKIPPED": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryExportResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this BigQueryExportResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @instance + * @returns {Object.} JSON object + */ + BigQueryExportResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryExportResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} SKIPPED=3 SKIPPED value + */ + BigQueryExportResult.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "SKIPPED"] = 3; + return values; + })(); + + return BigQueryExportResult; + })(); + + return PostScanActionsResult; + })(); + + return DataQualityResult; + })(); + + v1.DataQualityRuleResult = (function() { + + /** + * Properties of a DataQualityRuleResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityRuleResult + * @property {google.cloud.dataplex.v1.IDataQualityRule|null} [rule] DataQualityRuleResult rule + * @property {boolean|null} [passed] DataQualityRuleResult passed + * @property {number|Long|null} [evaluatedCount] DataQualityRuleResult evaluatedCount + * @property {number|Long|null} [passedCount] DataQualityRuleResult passedCount + * @property {number|Long|null} [nullCount] DataQualityRuleResult nullCount + * @property {number|null} [passRatio] DataQualityRuleResult passRatio + * @property {string|null} [failingRowsQuery] DataQualityRuleResult failingRowsQuery + * @property {number|Long|null} [assertionRowCount] DataQualityRuleResult assertionRowCount + */ + + /** + * Constructs a new DataQualityRuleResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityRuleResult. + * @implements IDataQualityRuleResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set + */ + function DataQualityRuleResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityRuleResult rule. + * @member {google.cloud.dataplex.v1.IDataQualityRule|null|undefined} rule + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.rule = null; + + /** + * DataQualityRuleResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passed = false; + + /** + * DataQualityRuleResult evaluatedCount. + * @member {number|Long} evaluatedCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.evaluatedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult passedCount. + * @member {number|Long} passedCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult nullCount. + * @member {number|Long} nullCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.nullCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult passRatio. + * @member {number} passRatio + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passRatio = 0; + + /** + * DataQualityRuleResult failingRowsQuery. + * @member {string} failingRowsQuery + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.failingRowsQuery = ""; + + /** + * DataQualityRuleResult assertionRowCount. + * @member {number|Long} assertionRowCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.assertionRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataQualityRuleResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult instance + */ + DataQualityRuleResult.create = function create(properties) { + return new DataQualityRuleResult(properties); + }; + + /** + * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRuleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) + $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nullCount != null && Object.hasOwnProperty.call(message, "nullCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.nullCount); + if (message.passRatio != null && Object.hasOwnProperty.call(message, "passRatio")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.passRatio); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.passed); + if (message.passedCount != null && Object.hasOwnProperty.call(message, "passedCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.passedCount); + if (message.evaluatedCount != null && Object.hasOwnProperty.call(message, "evaluatedCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.evaluatedCount); + if (message.failingRowsQuery != null && Object.hasOwnProperty.call(message, "failingRowsQuery")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.failingRowsQuery); + if (message.assertionRowCount != null && Object.hasOwnProperty.call(message, "assertionRowCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.assertionRowCount); + return writer; + }; + + /** + * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRuleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRuleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32()); + break; + } + case 7: { + message.passed = reader.bool(); + break; + } + case 9: { + message.evaluatedCount = reader.int64(); + break; + } + case 8: { + message.passedCount = reader.int64(); + break; + } + case 5: { + message.nullCount = reader.int64(); + break; + } + case 6: { + message.passRatio = reader.double(); + break; + } + case 10: { + message.failingRowsQuery = reader.string(); + break; + } + case 11: { + message.assertionRowCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRuleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityRuleResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityRuleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rule != null && message.hasOwnProperty("rule")) { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rule); + if (error) + return "rule." + error; + } + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) + if (!$util.isInteger(message.evaluatedCount) && !(message.evaluatedCount && $util.isInteger(message.evaluatedCount.low) && $util.isInteger(message.evaluatedCount.high))) + return "evaluatedCount: integer|Long expected"; + if (message.passedCount != null && message.hasOwnProperty("passedCount")) + if (!$util.isInteger(message.passedCount) && !(message.passedCount && $util.isInteger(message.passedCount.low) && $util.isInteger(message.passedCount.high))) + return "passedCount: integer|Long expected"; + if (message.nullCount != null && message.hasOwnProperty("nullCount")) + if (!$util.isInteger(message.nullCount) && !(message.nullCount && $util.isInteger(message.nullCount.low) && $util.isInteger(message.nullCount.high))) + return "nullCount: integer|Long expected"; + if (message.passRatio != null && message.hasOwnProperty("passRatio")) + if (typeof message.passRatio !== "number") + return "passRatio: number expected"; + if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) + if (!$util.isString(message.failingRowsQuery)) + return "failingRowsQuery: string expected"; + if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) + if (!$util.isInteger(message.assertionRowCount) && !(message.assertionRowCount && $util.isInteger(message.assertionRowCount.low) && $util.isInteger(message.assertionRowCount.high))) + return "assertionRowCount: integer|Long expected"; + return null; + }; + + /** + * Creates a DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + */ + DataQualityRuleResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRuleResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); + if (object.rule != null) { + if (typeof object.rule !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRuleResult.rule: object expected"); + message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rule); + } + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.evaluatedCount != null) + if ($util.Long) + (message.evaluatedCount = $util.Long.fromValue(object.evaluatedCount)).unsigned = false; + else if (typeof object.evaluatedCount === "string") + message.evaluatedCount = parseInt(object.evaluatedCount, 10); + else if (typeof object.evaluatedCount === "number") + message.evaluatedCount = object.evaluatedCount; + else if (typeof object.evaluatedCount === "object") + message.evaluatedCount = new $util.LongBits(object.evaluatedCount.low >>> 0, object.evaluatedCount.high >>> 0).toNumber(); + if (object.passedCount != null) + if ($util.Long) + (message.passedCount = $util.Long.fromValue(object.passedCount)).unsigned = false; + else if (typeof object.passedCount === "string") + message.passedCount = parseInt(object.passedCount, 10); + else if (typeof object.passedCount === "number") + message.passedCount = object.passedCount; + else if (typeof object.passedCount === "object") + message.passedCount = new $util.LongBits(object.passedCount.low >>> 0, object.passedCount.high >>> 0).toNumber(); + if (object.nullCount != null) + if ($util.Long) + (message.nullCount = $util.Long.fromValue(object.nullCount)).unsigned = false; + else if (typeof object.nullCount === "string") + message.nullCount = parseInt(object.nullCount, 10); + else if (typeof object.nullCount === "number") + message.nullCount = object.nullCount; + else if (typeof object.nullCount === "object") + message.nullCount = new $util.LongBits(object.nullCount.low >>> 0, object.nullCount.high >>> 0).toNumber(); + if (object.passRatio != null) + message.passRatio = Number(object.passRatio); + if (object.failingRowsQuery != null) + message.failingRowsQuery = String(object.failingRowsQuery); + if (object.assertionRowCount != null) + if ($util.Long) + (message.assertionRowCount = $util.Long.fromValue(object.assertionRowCount)).unsigned = false; + else if (typeof object.assertionRowCount === "string") + message.assertionRowCount = parseInt(object.assertionRowCount, 10); + else if (typeof object.assertionRowCount === "number") + message.assertionRowCount = object.assertionRowCount; + else if (typeof object.assertionRowCount === "object") + message.assertionRowCount = new $util.LongBits(object.assertionRowCount.low >>> 0, object.assertionRowCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityRuleResult} message DataQualityRuleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityRuleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rule = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nullCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nullCount = options.longs === String ? "0" : 0; + object.passRatio = 0; + object.passed = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.passedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.passedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.evaluatedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.evaluatedCount = options.longs === String ? "0" : 0; + object.failingRowsQuery = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.assertionRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.assertionRowCount = options.longs === String ? "0" : 0; + } + if (message.rule != null && message.hasOwnProperty("rule")) + object.rule = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rule, options); + if (message.nullCount != null && message.hasOwnProperty("nullCount")) + if (typeof message.nullCount === "number") + object.nullCount = options.longs === String ? String(message.nullCount) : message.nullCount; + else + object.nullCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullCount) : options.longs === Number ? new $util.LongBits(message.nullCount.low >>> 0, message.nullCount.high >>> 0).toNumber() : message.nullCount; + if (message.passRatio != null && message.hasOwnProperty("passRatio")) + object.passRatio = options.json && !isFinite(message.passRatio) ? String(message.passRatio) : message.passRatio; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + if (message.passedCount != null && message.hasOwnProperty("passedCount")) + if (typeof message.passedCount === "number") + object.passedCount = options.longs === String ? String(message.passedCount) : message.passedCount; + else + object.passedCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedCount) : options.longs === Number ? new $util.LongBits(message.passedCount.low >>> 0, message.passedCount.high >>> 0).toNumber() : message.passedCount; + if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) + if (typeof message.evaluatedCount === "number") + object.evaluatedCount = options.longs === String ? String(message.evaluatedCount) : message.evaluatedCount; + else + object.evaluatedCount = options.longs === String ? $util.Long.prototype.toString.call(message.evaluatedCount) : options.longs === Number ? new $util.LongBits(message.evaluatedCount.low >>> 0, message.evaluatedCount.high >>> 0).toNumber() : message.evaluatedCount; + if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) + object.failingRowsQuery = message.failingRowsQuery; + if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) + if (typeof message.assertionRowCount === "number") + object.assertionRowCount = options.longs === String ? String(message.assertionRowCount) : message.assertionRowCount; + else + object.assertionRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.assertionRowCount) : options.longs === Number ? new $util.LongBits(message.assertionRowCount.low >>> 0, message.assertionRowCount.high >>> 0).toNumber() : message.assertionRowCount; + return object; + }; + + /** + * Converts this DataQualityRuleResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityRuleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityRuleResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityRuleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRuleResult"; + }; + + return DataQualityRuleResult; + })(); + + v1.DataQualityDimensionResult = (function() { + + /** + * Properties of a DataQualityDimensionResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityDimensionResult + * @property {google.cloud.dataplex.v1.IDataQualityDimension|null} [dimension] DataQualityDimensionResult dimension + * @property {boolean|null} [passed] DataQualityDimensionResult passed + * @property {number|null} [score] DataQualityDimensionResult score + */ + + /** + * Constructs a new DataQualityDimensionResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityDimensionResult. + * @implements IDataQualityDimensionResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set + */ + function DataQualityDimensionResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityDimensionResult dimension. + * @member {google.cloud.dataplex.v1.IDataQualityDimension|null|undefined} dimension + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + */ + DataQualityDimensionResult.prototype.dimension = null; + + /** + * DataQualityDimensionResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + */ + DataQualityDimensionResult.prototype.passed = false; + + /** + * DataQualityDimensionResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + */ + DataQualityDimensionResult.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQualityDimensionResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + */ + Object.defineProperty(DataQualityDimensionResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQualityDimensionResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult instance + */ + DataQualityDimensionResult.create = function create(properties) { + return new DataQualityDimensionResult(properties); + }; + + /** + * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimensionResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.cloud.dataplex.v1.DataQualityDimension.encode(message.dimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passed); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); + return writer; + }; + + /** + * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimensionResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimensionResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.decode(reader, reader.uint32()); + break; + } + case 3: { + message.passed = reader.bool(); + break; + } + case 4: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimensionResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityDimensionResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityDimensionResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dimension != null && message.hasOwnProperty("dimension")) { + var error = $root.google.cloud.dataplex.v1.DataQualityDimension.verify(message.dimension); + if (error) + return "dimension." + error; + } + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + */ + DataQualityDimensionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityDimensionResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityDimensionResult.dimension: object expected"); + message.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.fromObject(object.dimension); + } + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityDimensionResult} message DataQualityDimensionResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityDimensionResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimension = null; + object.passed = false; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.toObject(message.dimension, options); + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this DataQualityDimensionResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityDimensionResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityDimensionResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityDimensionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityDimensionResult"; + }; + + return DataQualityDimensionResult; + })(); + + v1.DataQualityDimension = (function() { + + /** + * Properties of a DataQualityDimension. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityDimension + * @property {string|null} [name] DataQualityDimension name + */ + + /** + * Constructs a new DataQualityDimension. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityDimension. + * @implements IDataQualityDimension + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityDimension=} [properties] Properties to set + */ + function DataQualityDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityDimension name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @instance + */ + DataQualityDimension.prototype.name = ""; + + /** + * Creates a new DataQualityDimension instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimension=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension instance + */ + DataQualityDimension.create = function create(properties) { + return new DataQualityDimension(properties); + }; + + /** + * Encodes the specified DataQualityDimension message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimension} message DataQualityDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimension.encode = function encode(message, writer) { + 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 DataQualityDimension message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimension} message DataQualityDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityDimension message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityDimension(); + 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 DataQualityDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityDimension message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityDimension.verify = function verify(message) { + if (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 DataQualityDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension + */ + DataQualityDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityDimension) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityDimension(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DataQualityDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {google.cloud.dataplex.v1.DataQualityDimension} message DataQualityDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityDimension.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 DataQualityDimension to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @instance + * @returns {Object.} JSON object + */ + DataQualityDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityDimension + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityDimension"; + }; + + return DataQualityDimension; + })(); + + v1.DataQualityRule = (function() { + + /** + * Properties of a DataQualityRule. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityRule + * @property {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null} [rangeExpectation] DataQualityRule rangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null} [nonNullExpectation] DataQualityRule nonNullExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null} [setExpectation] DataQualityRule setExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null} [regexExpectation] DataQualityRule regexExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null} [uniquenessExpectation] DataQualityRule uniquenessExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null} [statisticRangeExpectation] DataQualityRule statisticRangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null} [rowConditionExpectation] DataQualityRule rowConditionExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null} [tableConditionExpectation] DataQualityRule tableConditionExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null} [sqlAssertion] DataQualityRule sqlAssertion + * @property {string|null} [column] DataQualityRule column + * @property {boolean|null} [ignoreNull] DataQualityRule ignoreNull + * @property {string|null} [dimension] DataQualityRule dimension + * @property {number|null} [threshold] DataQualityRule threshold + * @property {string|null} [name] DataQualityRule name + * @property {string|null} [description] DataQualityRule description + * @property {boolean|null} [suspended] DataQualityRule suspended + */ + + /** + * Constructs a new DataQualityRule. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityRule. + * @implements IDataQualityRule + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set + */ + function DataQualityRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityRule rangeExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null|undefined} rangeExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.rangeExpectation = null; + + /** + * DataQualityRule nonNullExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null|undefined} nonNullExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.nonNullExpectation = null; + + /** + * DataQualityRule setExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null|undefined} setExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.setExpectation = null; + + /** + * DataQualityRule regexExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null|undefined} regexExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.regexExpectation = null; + + /** + * DataQualityRule uniquenessExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null|undefined} uniquenessExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.uniquenessExpectation = null; + + /** + * DataQualityRule statisticRangeExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null|undefined} statisticRangeExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.statisticRangeExpectation = null; + + /** + * DataQualityRule rowConditionExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null|undefined} rowConditionExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.rowConditionExpectation = null; + + /** + * DataQualityRule tableConditionExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null|undefined} tableConditionExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.tableConditionExpectation = null; + + /** + * DataQualityRule sqlAssertion. + * @member {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null|undefined} sqlAssertion + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.sqlAssertion = null; + + /** + * DataQualityRule column. + * @member {string} column + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.column = ""; + + /** + * DataQualityRule ignoreNull. + * @member {boolean} ignoreNull + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.ignoreNull = false; + + /** + * DataQualityRule dimension. + * @member {string} dimension + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.dimension = ""; + + /** + * DataQualityRule threshold. + * @member {number} threshold + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.threshold = 0; + + /** + * DataQualityRule name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.name = ""; + + /** + * DataQualityRule description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.description = ""; + + /** + * DataQualityRule suspended. + * @member {boolean} suspended + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.suspended = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQualityRule ruleType. + * @member {"rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|"sqlAssertion"|undefined} ruleType + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + Object.defineProperty(DataQualityRule.prototype, "ruleType", { + get: $util.oneOfGetter($oneOfFields = ["rangeExpectation", "nonNullExpectation", "setExpectation", "regexExpectation", "uniquenessExpectation", "statisticRangeExpectation", "rowConditionExpectation", "tableConditionExpectation", "sqlAssertion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQualityRule instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule instance + */ + DataQualityRule.create = function create(properties) { + return new DataQualityRule(properties); + }; + + /** + * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeExpectation != null && Object.hasOwnProperty.call(message, "rangeExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.encode(message.rangeExpectation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nonNullExpectation != null && Object.hasOwnProperty.call(message, "nonNullExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.encode(message.nonNullExpectation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.setExpectation != null && Object.hasOwnProperty.call(message, "setExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.encode(message.setExpectation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.regexExpectation != null && Object.hasOwnProperty.call(message, "regexExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.encode(message.regexExpectation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uniquenessExpectation != null && Object.hasOwnProperty.call(message, "uniquenessExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.encode(message.uniquenessExpectation, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.statisticRangeExpectation != null && Object.hasOwnProperty.call(message, "statisticRangeExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.encode(message.statisticRangeExpectation, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.rowConditionExpectation != null && Object.hasOwnProperty.call(message, "rowConditionExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.encode(message.rowConditionExpectation, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.tableConditionExpectation != null && Object.hasOwnProperty.call(message, "tableConditionExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.encode(message.tableConditionExpectation, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.sqlAssertion != null && Object.hasOwnProperty.call(message, "sqlAssertion")) + $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.encode(message.sqlAssertion, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 500, wireType 2 =*/4002).string(message.column); + if (message.ignoreNull != null && Object.hasOwnProperty.call(message, "ignoreNull")) + writer.uint32(/* id 501, wireType 0 =*/4008).bool(message.ignoreNull); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 502, wireType 2 =*/4018).string(message.dimension); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 503, wireType 1 =*/4025).double(message.threshold); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 504, wireType 2 =*/4034).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 505, wireType 2 =*/4042).string(message.description); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 506, wireType 0 =*/4048).bool(message.suspended); + return writer; + }; + + /** + * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.decode(reader, reader.uint32()); + break; + } + case 100: { + message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.decode(reader, reader.uint32()); + break; + } + case 101: { + message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.decode(reader, reader.uint32()); + break; + } + case 200: { + message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.decode(reader, reader.uint32()); + break; + } + case 201: { + message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.decode(reader, reader.uint32()); + break; + } + case 202: { + message.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.decode(reader, reader.uint32()); + break; + } + case 500: { + message.column = reader.string(); + break; + } + case 501: { + message.ignoreNull = reader.bool(); + break; + } + case 502: { + message.dimension = reader.string(); + break; + } + case 503: { + message.threshold = reader.double(); + break; + } + case 504: { + message.name = reader.string(); + break; + } + case 505: { + message.description = reader.string(); + break; + } + case 506: { + message.suspended = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityRule message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify(message.rangeExpectation); + if (error) + return "rangeExpectation." + error; + } + } + if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify(message.nonNullExpectation); + if (error) + return "nonNullExpectation." + error; + } + } + if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify(message.setExpectation); + if (error) + return "setExpectation." + error; + } + } + if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify(message.regexExpectation); + if (error) + return "regexExpectation." + error; + } + } + if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify(message.uniquenessExpectation); + if (error) + return "uniquenessExpectation." + error; + } + } + if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify(message.statisticRangeExpectation); + if (error) + return "statisticRangeExpectation." + error; + } + } + if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify(message.rowConditionExpectation); + if (error) + return "rowConditionExpectation." + error; + } + } + if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify(message.tableConditionExpectation); + if (error) + return "tableConditionExpectation." + error; + } + } + if (message.sqlAssertion != null && message.hasOwnProperty("sqlAssertion")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify(message.sqlAssertion); + if (error) + return "sqlAssertion." + error; + } + } + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) + if (typeof message.ignoreNull !== "boolean") + return "ignoreNull: boolean expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; + return null; + }; + + /** + * Creates a DataQualityRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + */ + DataQualityRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule(); + if (object.rangeExpectation != null) { + if (typeof object.rangeExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rangeExpectation: object expected"); + message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.fromObject(object.rangeExpectation); + } + if (object.nonNullExpectation != null) { + if (typeof object.nonNullExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.nonNullExpectation: object expected"); + message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.fromObject(object.nonNullExpectation); + } + if (object.setExpectation != null) { + if (typeof object.setExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.setExpectation: object expected"); + message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.fromObject(object.setExpectation); + } + if (object.regexExpectation != null) { + if (typeof object.regexExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.regexExpectation: object expected"); + message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.fromObject(object.regexExpectation); + } + if (object.uniquenessExpectation != null) { + if (typeof object.uniquenessExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.uniquenessExpectation: object expected"); + message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.fromObject(object.uniquenessExpectation); + } + if (object.statisticRangeExpectation != null) { + if (typeof object.statisticRangeExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.statisticRangeExpectation: object expected"); + message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.fromObject(object.statisticRangeExpectation); + } + if (object.rowConditionExpectation != null) { + if (typeof object.rowConditionExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rowConditionExpectation: object expected"); + message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.fromObject(object.rowConditionExpectation); + } + if (object.tableConditionExpectation != null) { + if (typeof object.tableConditionExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.tableConditionExpectation: object expected"); + message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.fromObject(object.tableConditionExpectation); + } + if (object.sqlAssertion != null) { + if (typeof object.sqlAssertion !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.sqlAssertion: object expected"); + message.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.fromObject(object.sqlAssertion); + } + if (object.column != null) + message.column = String(object.column); + if (object.ignoreNull != null) + message.ignoreNull = Boolean(object.ignoreNull); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.threshold != null) + message.threshold = Number(object.threshold); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); + return message; + }; + + /** + * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule} message DataQualityRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.column = ""; + object.ignoreNull = false; + object.dimension = ""; + object.threshold = 0; + object.name = ""; + object.description = ""; + object.suspended = false; + } + if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { + object.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.toObject(message.rangeExpectation, options); + if (options.oneofs) + object.ruleType = "rangeExpectation"; + } + if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { + object.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.toObject(message.nonNullExpectation, options); + if (options.oneofs) + object.ruleType = "nonNullExpectation"; + } + if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { + object.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.toObject(message.setExpectation, options); + if (options.oneofs) + object.ruleType = "setExpectation"; + } + if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { + object.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.toObject(message.regexExpectation, options); + if (options.oneofs) + object.ruleType = "regexExpectation"; + } + if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { + object.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.toObject(message.uniquenessExpectation, options); + if (options.oneofs) + object.ruleType = "uniquenessExpectation"; + } + if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { + object.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.toObject(message.statisticRangeExpectation, options); + if (options.oneofs) + object.ruleType = "statisticRangeExpectation"; + } + if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { + object.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.toObject(message.rowConditionExpectation, options); + if (options.oneofs) + object.ruleType = "rowConditionExpectation"; + } + if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { + object.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.toObject(message.tableConditionExpectation, options); + if (options.oneofs) + object.ruleType = "tableConditionExpectation"; + } + if (message.sqlAssertion != null && message.hasOwnProperty("sqlAssertion")) { + object.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.toObject(message.sqlAssertion, options); + if (options.oneofs) + object.ruleType = "sqlAssertion"; + } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) + object.ignoreNull = message.ignoreNull; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; + return object; + }; + + /** + * Converts this DataQualityRule to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + * @returns {Object.} JSON object + */ + DataQualityRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityRule + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule"; + }; + + DataQualityRule.RangeExpectation = (function() { + + /** + * Properties of a RangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRangeExpectation + * @property {string|null} [minValue] RangeExpectation minValue + * @property {string|null} [maxValue] RangeExpectation maxValue + * @property {boolean|null} [strictMinEnabled] RangeExpectation strictMinEnabled + * @property {boolean|null} [strictMaxEnabled] RangeExpectation strictMaxEnabled + */ + + /** + * Constructs a new RangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RangeExpectation. + * @implements IRangeExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set + */ + function RangeExpectation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RangeExpectation minValue. + * @member {string} minValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.minValue = ""; + + /** + * RangeExpectation maxValue. + * @member {string} maxValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.maxValue = ""; + + /** + * RangeExpectation strictMinEnabled. + * @member {boolean} strictMinEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.strictMinEnabled = false; + + /** + * RangeExpectation strictMaxEnabled. + * @member {boolean} strictMaxEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.strictMaxEnabled = false; + + /** + * Creates a new RangeExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation instance + */ + RangeExpectation.create = function create(properties) { + return new RangeExpectation(properties); + }; + + /** + * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.minValue); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxValue); + if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.strictMinEnabled); + if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMaxEnabled); + return writer; + }; + + /** + * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minValue = reader.string(); + break; + } + case 2: { + message.maxValue = reader.string(); + break; + } + case 3: { + message.strictMinEnabled = reader.bool(); + break; + } + case 4: { + message.strictMaxEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RangeExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RangeExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minValue != null && message.hasOwnProperty("minValue")) + if (!$util.isString(message.minValue)) + return "minValue: string expected"; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + if (!$util.isString(message.maxValue)) + return "maxValue: string expected"; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + if (typeof message.strictMinEnabled !== "boolean") + return "strictMinEnabled: boolean expected"; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + if (typeof message.strictMaxEnabled !== "boolean") + return "strictMaxEnabled: boolean expected"; + return null; + }; + + /** + * Creates a RangeExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + */ + RangeExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); + if (object.minValue != null) + message.minValue = String(object.minValue); + if (object.maxValue != null) + message.maxValue = String(object.maxValue); + if (object.strictMinEnabled != null) + message.strictMinEnabled = Boolean(object.strictMinEnabled); + if (object.strictMaxEnabled != null) + message.strictMaxEnabled = Boolean(object.strictMaxEnabled); + return message; + }; + + /** + * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} message RangeExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RangeExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minValue = ""; + object.maxValue = ""; + object.strictMinEnabled = false; + object.strictMaxEnabled = false; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = message.minValue; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = message.maxValue; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + object.strictMinEnabled = message.strictMinEnabled; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + object.strictMaxEnabled = message.strictMaxEnabled; + return object; + }; + + /** + * Converts this RangeExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + * @returns {Object.} JSON object + */ + RangeExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RangeExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"; + }; + + return RangeExpectation; + })(); + + DataQualityRule.NonNullExpectation = (function() { + + /** + * Properties of a NonNullExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface INonNullExpectation + */ + + /** + * Constructs a new NonNullExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a NonNullExpectation. + * @implements INonNullExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set + */ + function NonNullExpectation(properties) { + if (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 NonNullExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation instance + */ + NonNullExpectation.create = function create(properties) { + return new NonNullExpectation(properties); + }; + + /** + * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonNullExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonNullExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonNullExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonNullExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NonNullExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NonNullExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a NonNullExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + */ + NonNullExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation) + return object; + return new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); + }; + + /** + * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} message NonNullExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NonNullExpectation.toObject = function toObject() { + return {}; + }; + + /** + * Converts this NonNullExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @instance + * @returns {Object.} JSON object + */ + NonNullExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NonNullExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NonNullExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"; + }; + + return NonNullExpectation; + })(); + + DataQualityRule.SetExpectation = (function() { + + /** + * Properties of a SetExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface ISetExpectation + * @property {Array.|null} [values] SetExpectation values + */ + + /** + * Constructs a new SetExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a SetExpectation. + * @implements ISetExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set + */ + function SetExpectation(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetExpectation values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @instance + */ + SetExpectation.prototype.values = $util.emptyArray; + + /** + * Creates a new SetExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation instance + */ + SetExpectation.create = function create(properties) { + return new SetExpectation(properties); + }; + + /** + * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a SetExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + */ + SetExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.SetExpectation.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} message SetExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this SetExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @instance + * @returns {Object.} JSON object + */ + SetExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"; + }; + + return SetExpectation; + })(); + + DataQualityRule.RegexExpectation = (function() { + + /** + * Properties of a RegexExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRegexExpectation + * @property {string|null} [regex] RegexExpectation regex + */ + + /** + * Constructs a new RegexExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RegexExpectation. + * @implements IRegexExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set + */ + function RegexExpectation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RegexExpectation regex. + * @member {string} regex + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @instance + */ + RegexExpectation.prototype.regex = ""; + + /** + * Creates a new RegexExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation instance + */ + RegexExpectation.create = function create(properties) { + return new RegexExpectation(properties); + }; + + /** + * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.regex); + return writer; + }; + + /** + * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.regex = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegexExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegexExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.regex != null && message.hasOwnProperty("regex")) + if (!$util.isString(message.regex)) + return "regex: string expected"; + return null; + }; + + /** + * Creates a RegexExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + */ + RegexExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); + if (object.regex != null) + message.regex = String(object.regex); + return message; + }; + + /** + * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} message RegexExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegexExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.regex = ""; + if (message.regex != null && message.hasOwnProperty("regex")) + object.regex = message.regex; + return object; + }; + + /** + * Converts this RegexExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @instance + * @returns {Object.} JSON object + */ + RegexExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegexExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegexExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"; + }; + + return RegexExpectation; + })(); + + DataQualityRule.UniquenessExpectation = (function() { + + /** + * Properties of an UniquenessExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IUniquenessExpectation + */ + + /** + * Constructs a new UniquenessExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents an UniquenessExpectation. + * @implements IUniquenessExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set + */ + function UniquenessExpectation(properties) { + if (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 UniquenessExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation instance + */ + UniquenessExpectation.create = function create(properties) { + return new UniquenessExpectation(properties); + }; + + /** + * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UniquenessExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UniquenessExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UniquenessExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UniquenessExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UniquenessExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UniquenessExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UniquenessExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + */ + UniquenessExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation) + return object; + return new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); + }; + + /** + * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} message UniquenessExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UniquenessExpectation.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UniquenessExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @instance + * @returns {Object.} JSON object + */ + UniquenessExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UniquenessExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UniquenessExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"; + }; + + return UniquenessExpectation; + })(); + + DataQualityRule.StatisticRangeExpectation = (function() { + + /** + * Properties of a StatisticRangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IStatisticRangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null} [statistic] StatisticRangeExpectation statistic + * @property {string|null} [minValue] StatisticRangeExpectation minValue + * @property {string|null} [maxValue] StatisticRangeExpectation maxValue + * @property {boolean|null} [strictMinEnabled] StatisticRangeExpectation strictMinEnabled + * @property {boolean|null} [strictMaxEnabled] StatisticRangeExpectation strictMaxEnabled + */ + + /** + * Constructs a new StatisticRangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a StatisticRangeExpectation. + * @implements IStatisticRangeExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set + */ + function StatisticRangeExpectation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatisticRangeExpectation statistic. + * @member {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic} statistic + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.statistic = 0; + + /** + * StatisticRangeExpectation minValue. + * @member {string} minValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.minValue = ""; + + /** + * StatisticRangeExpectation maxValue. + * @member {string} maxValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.maxValue = ""; + + /** + * StatisticRangeExpectation strictMinEnabled. + * @member {boolean} strictMinEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.strictMinEnabled = false; + + /** + * StatisticRangeExpectation strictMaxEnabled. + * @member {boolean} strictMaxEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.strictMaxEnabled = false; + + /** + * Creates a new StatisticRangeExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation instance + */ + StatisticRangeExpectation.create = function create(properties) { + return new StatisticRangeExpectation(properties); + }; + + /** + * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticRangeExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.statistic != null && Object.hasOwnProperty.call(message, "statistic")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.statistic); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.minValue); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxValue); + if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMinEnabled); + if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.strictMaxEnabled); + return writer; + }; + + /** + * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticRangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticRangeExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.statistic = reader.int32(); + break; + } + case 2: { + message.minValue = reader.string(); + break; + } + case 3: { + message.maxValue = reader.string(); + break; + } + case 4: { + message.strictMinEnabled = reader.bool(); + break; + } + case 5: { + message.strictMaxEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticRangeExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatisticRangeExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticRangeExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.statistic != null && message.hasOwnProperty("statistic")) + switch (message.statistic) { + default: + return "statistic: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + if (!$util.isString(message.minValue)) + return "minValue: string expected"; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + if (!$util.isString(message.maxValue)) + return "maxValue: string expected"; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + if (typeof message.strictMinEnabled !== "boolean") + return "strictMinEnabled: boolean expected"; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + if (typeof message.strictMaxEnabled !== "boolean") + return "strictMaxEnabled: boolean expected"; + return null; + }; + + /** + * Creates a StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + */ + StatisticRangeExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); + switch (object.statistic) { + default: + if (typeof object.statistic === "number") { + message.statistic = object.statistic; + break; + } + break; + case "STATISTIC_UNDEFINED": + case 0: + message.statistic = 0; + break; + case "MEAN": + case 1: + message.statistic = 1; + break; + case "MIN": + case 2: + message.statistic = 2; + break; + case "MAX": + case 3: + message.statistic = 3; + break; + } + if (object.minValue != null) + message.minValue = String(object.minValue); + if (object.maxValue != null) + message.maxValue = String(object.maxValue); + if (object.strictMinEnabled != null) + message.strictMinEnabled = Boolean(object.strictMinEnabled); + if (object.strictMaxEnabled != null) + message.strictMaxEnabled = Boolean(object.strictMaxEnabled); + return message; + }; + + /** + * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} message StatisticRangeExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticRangeExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.statistic = options.enums === String ? "STATISTIC_UNDEFINED" : 0; + object.minValue = ""; + object.maxValue = ""; + object.strictMinEnabled = false; + object.strictMaxEnabled = false; + } + if (message.statistic != null && message.hasOwnProperty("statistic")) + object.statistic = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] === undefined ? message.statistic : $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] : message.statistic; + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = message.minValue; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = message.maxValue; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + object.strictMinEnabled = message.strictMinEnabled; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + object.strictMaxEnabled = message.strictMaxEnabled; + return object; + }; + + /** + * Converts this StatisticRangeExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + * @returns {Object.} JSON object + */ + StatisticRangeExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatisticRangeExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatisticRangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"; + }; + + /** + * ColumnStatistic enum. + * @name google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic + * @enum {number} + * @property {number} STATISTIC_UNDEFINED=0 STATISTIC_UNDEFINED value + * @property {number} MEAN=1 MEAN value + * @property {number} MIN=2 MIN value + * @property {number} MAX=3 MAX value + */ + StatisticRangeExpectation.ColumnStatistic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATISTIC_UNDEFINED"] = 0; + values[valuesById[1] = "MEAN"] = 1; + values[valuesById[2] = "MIN"] = 2; + values[valuesById[3] = "MAX"] = 3; + return values; + })(); + + return StatisticRangeExpectation; + })(); + + DataQualityRule.RowConditionExpectation = (function() { + + /** + * Properties of a RowConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRowConditionExpectation + * @property {string|null} [sqlExpression] RowConditionExpectation sqlExpression + */ + + /** + * Constructs a new RowConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RowConditionExpectation. + * @implements IRowConditionExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set + */ + function RowConditionExpectation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RowConditionExpectation sqlExpression. + * @member {string} sqlExpression + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @instance + */ + RowConditionExpectation.prototype.sqlExpression = ""; + + /** + * Creates a new RowConditionExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation instance + */ + RowConditionExpectation.create = function create(properties) { + return new RowConditionExpectation(properties); + }; + + /** + * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowConditionExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); + return writer; + }; + + /** + * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowConditionExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlExpression = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowConditionExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowConditionExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowConditionExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + if (!$util.isString(message.sqlExpression)) + return "sqlExpression: string expected"; + return null; + }; + + /** + * Creates a RowConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + */ + RowConditionExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); + if (object.sqlExpression != null) + message.sqlExpression = String(object.sqlExpression); + return message; + }; + + /** + * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} message RowConditionExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowConditionExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlExpression = ""; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + object.sqlExpression = message.sqlExpression; + return object; + }; + + /** + * Converts this RowConditionExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @instance + * @returns {Object.} JSON object + */ + RowConditionExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowConditionExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"; + }; + + return RowConditionExpectation; + })(); + + DataQualityRule.TableConditionExpectation = (function() { + + /** + * Properties of a TableConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface ITableConditionExpectation + * @property {string|null} [sqlExpression] TableConditionExpectation sqlExpression + */ + + /** + * Constructs a new TableConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a TableConditionExpectation. + * @implements ITableConditionExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set + */ + function TableConditionExpectation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableConditionExpectation sqlExpression. + * @member {string} sqlExpression + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @instance + */ + TableConditionExpectation.prototype.sqlExpression = ""; + + /** + * Creates a new TableConditionExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation instance + */ + TableConditionExpectation.create = function create(properties) { + return new TableConditionExpectation(properties); + }; + + /** + * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableConditionExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); + return writer; + }; + + /** + * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableConditionExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlExpression = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableConditionExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableConditionExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableConditionExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + if (!$util.isString(message.sqlExpression)) + return "sqlExpression: string expected"; + return null; + }; + + /** + * Creates a TableConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + */ + TableConditionExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); + if (object.sqlExpression != null) + message.sqlExpression = String(object.sqlExpression); + return message; + }; + + /** + * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} message TableConditionExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableConditionExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlExpression = ""; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + object.sqlExpression = message.sqlExpression; + return object; + }; + + /** + * Converts this TableConditionExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @instance + * @returns {Object.} JSON object + */ + TableConditionExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableConditionExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"; + }; + + return TableConditionExpectation; + })(); + + DataQualityRule.SqlAssertion = (function() { + + /** + * Properties of a SqlAssertion. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface ISqlAssertion + * @property {string|null} [sqlStatement] SqlAssertion sqlStatement + */ + + /** + * Constructs a new SqlAssertion. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a SqlAssertion. + * @implements ISqlAssertion + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion=} [properties] Properties to set + */ + function SqlAssertion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SqlAssertion sqlStatement. + * @member {string} sqlStatement + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @instance + */ + SqlAssertion.prototype.sqlStatement = ""; + + /** + * Creates a new SqlAssertion instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion instance + */ + SqlAssertion.create = function create(properties) { + return new SqlAssertion(properties); + }; + + /** + * Encodes the specified SqlAssertion message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion} message SqlAssertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlAssertion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlStatement != null && Object.hasOwnProperty.call(message, "sqlStatement")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlStatement); + return writer; + }; + + /** + * Encodes the specified SqlAssertion message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion} message SqlAssertion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlAssertion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlAssertion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlAssertion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlStatement = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlAssertion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlAssertion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlAssertion message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlAssertion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlStatement != null && message.hasOwnProperty("sqlStatement")) + if (!$util.isString(message.sqlStatement)) + return "sqlStatement: string expected"; + return null; + }; + + /** + * Creates a SqlAssertion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion + */ + SqlAssertion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion(); + if (object.sqlStatement != null) + message.sqlStatement = String(object.sqlStatement); + return message; + }; + + /** + * Creates a plain object from a SqlAssertion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} message SqlAssertion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlAssertion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlStatement = ""; + if (message.sqlStatement != null && message.hasOwnProperty("sqlStatement")) + object.sqlStatement = message.sqlStatement; + return object; + }; + + /** + * Converts this SqlAssertion to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @instance + * @returns {Object.} JSON object + */ + SqlAssertion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlAssertion + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlAssertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"; + }; + + return SqlAssertion; + })(); + + return DataQualityRule; + })(); + + v1.DataQualityColumnResult = (function() { + + /** + * Properties of a DataQualityColumnResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityColumnResult + * @property {string|null} [column] DataQualityColumnResult column + * @property {number|null} [score] DataQualityColumnResult score + */ + + /** + * Constructs a new DataQualityColumnResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityColumnResult. + * @implements IDataQualityColumnResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityColumnResult=} [properties] Properties to set + */ + function DataQualityColumnResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityColumnResult column. + * @member {string} column + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @instance + */ + DataQualityColumnResult.prototype.column = ""; + + /** + * DataQualityColumnResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @instance + */ + DataQualityColumnResult.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQualityColumnResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @instance + */ + Object.defineProperty(DataQualityColumnResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQualityColumnResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityColumnResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult instance + */ + DataQualityColumnResult.create = function create(properties) { + return new DataQualityColumnResult(properties); + }; + + /** + * Encodes the specified DataQualityColumnResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityColumnResult} message DataQualityColumnResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityColumnResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); + return writer; + }; + + /** + * Encodes the specified DataQualityColumnResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityColumnResult} message DataQualityColumnResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityColumnResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityColumnResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityColumnResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityColumnResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.column = reader.string(); + break; + } + case 2: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityColumnResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityColumnResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityColumnResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityColumnResult.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.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a DataQualityColumnResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult + */ + DataQualityColumnResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityColumnResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityColumnResult(); + if (object.column != null) + message.column = String(object.column); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a DataQualityColumnResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityColumnResult} message DataQualityColumnResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityColumnResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.column = ""; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this DataQualityColumnResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityColumnResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityColumnResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityColumnResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityColumnResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityColumnResult"; + }; + + return DataQualityColumnResult; + })(); + + v1.DataTaxonomyService = (function() { + + /** + * Constructs a new DataTaxonomyService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataTaxonomyService + * @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 DataTaxonomyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataTaxonomyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataTaxonomyService; + + /** + * Creates new DataTaxonomyService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @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 {DataTaxonomyService} RPC service. Useful where requests and/or responses are streamed. + */ + DataTaxonomyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataTaxonomy}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef CreateDataTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataTaxonomy. + * @function createDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} request CreateDataTaxonomyRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.createDataTaxonomy = function createDataTaxonomy(request, callback) { + return this.rpcCall(createDataTaxonomy, $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataTaxonomy" }); + + /** + * Calls CreateDataTaxonomy. + * @function createDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} request CreateDataTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataTaxonomy}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef UpdateDataTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataTaxonomy. + * @function updateDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} request UpdateDataTaxonomyRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.updateDataTaxonomy = function updateDataTaxonomy(request, callback) { + return this.rpcCall(updateDataTaxonomy, $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataTaxonomy" }); + + /** + * Calls UpdateDataTaxonomy. + * @function updateDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} request UpdateDataTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataTaxonomy}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef DeleteDataTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataTaxonomy. + * @function deleteDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} request DeleteDataTaxonomyRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.deleteDataTaxonomy = function deleteDataTaxonomy(request, callback) { + return this.rpcCall(deleteDataTaxonomy, $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataTaxonomy" }); + + /** + * Calls DeleteDataTaxonomy. + * @function deleteDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} request DeleteDataTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataTaxonomies}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef ListDataTaxonomiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} [response] ListDataTaxonomiesResponse + */ + + /** + * Calls ListDataTaxonomies. + * @function listDataTaxonomies + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} request ListDataTaxonomiesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomiesCallback} callback Node-style callback called with the error, if any, and ListDataTaxonomiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.listDataTaxonomies = function listDataTaxonomies(request, callback) { + return this.rpcCall(listDataTaxonomies, $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse, request, callback); + }, "name", { value: "ListDataTaxonomies" }); + + /** + * Calls ListDataTaxonomies. + * @function listDataTaxonomies + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} request ListDataTaxonomiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataTaxonomy}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef GetDataTaxonomyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataTaxonomy} [response] DataTaxonomy + */ + + /** + * Calls GetDataTaxonomy. + * @function getDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} request GetDataTaxonomyRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomyCallback} callback Node-style callback called with the error, if any, and DataTaxonomy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.getDataTaxonomy = function getDataTaxonomy(request, callback) { + return this.rpcCall(getDataTaxonomy, $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest, $root.google.cloud.dataplex.v1.DataTaxonomy, request, callback); + }, "name", { value: "GetDataTaxonomy" }); + + /** + * Calls GetDataTaxonomy. + * @function getDataTaxonomy + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} request GetDataTaxonomyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttributeBinding}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef CreateDataAttributeBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataAttributeBinding. + * @function createDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} request CreateDataAttributeBindingRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.createDataAttributeBinding = function createDataAttributeBinding(request, callback) { + return this.rpcCall(createDataAttributeBinding, $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataAttributeBinding" }); + + /** + * Calls CreateDataAttributeBinding. + * @function createDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} request CreateDataAttributeBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttributeBinding}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef UpdateDataAttributeBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataAttributeBinding. + * @function updateDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} request UpdateDataAttributeBindingRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.updateDataAttributeBinding = function updateDataAttributeBinding(request, callback) { + return this.rpcCall(updateDataAttributeBinding, $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataAttributeBinding" }); + + /** + * Calls UpdateDataAttributeBinding. + * @function updateDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} request UpdateDataAttributeBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttributeBinding}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef DeleteDataAttributeBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataAttributeBinding. + * @function deleteDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} request DeleteDataAttributeBindingRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.deleteDataAttributeBinding = function deleteDataAttributeBinding(request, callback) { + return this.rpcCall(deleteDataAttributeBinding, $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataAttributeBinding" }); + + /** + * Calls DeleteDataAttributeBinding. + * @function deleteDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} request DeleteDataAttributeBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributeBindings}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef ListDataAttributeBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} [response] ListDataAttributeBindingsResponse + */ + + /** + * Calls ListDataAttributeBindings. + * @function listDataAttributeBindings + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} request ListDataAttributeBindingsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindingsCallback} callback Node-style callback called with the error, if any, and ListDataAttributeBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.listDataAttributeBindings = function listDataAttributeBindings(request, callback) { + return this.rpcCall(listDataAttributeBindings, $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse, request, callback); + }, "name", { value: "ListDataAttributeBindings" }); + + /** + * Calls ListDataAttributeBindings. + * @function listDataAttributeBindings + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} request ListDataAttributeBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttributeBinding}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef GetDataAttributeBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataAttributeBinding} [response] DataAttributeBinding + */ + + /** + * Calls GetDataAttributeBinding. + * @function getDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} request GetDataAttributeBindingRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and DataAttributeBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.getDataAttributeBinding = function getDataAttributeBinding(request, callback) { + return this.rpcCall(getDataAttributeBinding, $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, $root.google.cloud.dataplex.v1.DataAttributeBinding, request, callback); + }, "name", { value: "GetDataAttributeBinding" }); + + /** + * Calls GetDataAttributeBinding. + * @function getDataAttributeBinding + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} request GetDataAttributeBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttribute}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef CreateDataAttributeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataAttribute. + * @function createDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} request CreateDataAttributeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.createDataAttribute = function createDataAttribute(request, callback) { + return this.rpcCall(createDataAttribute, $root.google.cloud.dataplex.v1.CreateDataAttributeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataAttribute" }); + + /** + * Calls CreateDataAttribute. + * @function createDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} request CreateDataAttributeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttribute}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef UpdateDataAttributeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataAttribute. + * @function updateDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} request UpdateDataAttributeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.updateDataAttribute = function updateDataAttribute(request, callback) { + return this.rpcCall(updateDataAttribute, $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataAttribute" }); + + /** + * Calls UpdateDataAttribute. + * @function updateDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} request UpdateDataAttributeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttribute}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef DeleteDataAttributeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataAttribute. + * @function deleteDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} request DeleteDataAttributeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.deleteDataAttribute = function deleteDataAttribute(request, callback) { + return this.rpcCall(deleteDataAttribute, $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataAttribute" }); + + /** + * Calls DeleteDataAttribute. + * @function deleteDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} request DeleteDataAttributeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributes}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef ListDataAttributesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataAttributesResponse} [response] ListDataAttributesResponse + */ + + /** + * Calls ListDataAttributes. + * @function listDataAttributes + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} request ListDataAttributesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributesCallback} callback Node-style callback called with the error, if any, and ListDataAttributesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.listDataAttributes = function listDataAttributes(request, callback) { + return this.rpcCall(listDataAttributes, $root.google.cloud.dataplex.v1.ListDataAttributesRequest, $root.google.cloud.dataplex.v1.ListDataAttributesResponse, request, callback); + }, "name", { value: "ListDataAttributes" }); + + /** + * Calls ListDataAttributes. + * @function listDataAttributes + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} request ListDataAttributesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttribute}. + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @typedef GetDataAttributeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataAttribute} [response] DataAttribute + */ + + /** + * Calls GetDataAttribute. + * @function getDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} request GetDataAttributeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeCallback} callback Node-style callback called with the error, if any, and DataAttribute + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataTaxonomyService.prototype.getDataAttribute = function getDataAttribute(request, callback) { + return this.rpcCall(getDataAttribute, $root.google.cloud.dataplex.v1.GetDataAttributeRequest, $root.google.cloud.dataplex.v1.DataAttribute, request, callback); + }, "name", { value: "GetDataAttribute" }); + + /** + * Calls GetDataAttribute. + * @function getDataAttribute + * @memberof google.cloud.dataplex.v1.DataTaxonomyService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} request GetDataAttributeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataTaxonomyService; + })(); + + v1.DataTaxonomy = (function() { + + /** + * Properties of a DataTaxonomy. + * @memberof google.cloud.dataplex.v1 + * @interface IDataTaxonomy + * @property {string|null} [name] DataTaxonomy name + * @property {string|null} [uid] DataTaxonomy uid + * @property {google.protobuf.ITimestamp|null} [createTime] DataTaxonomy createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataTaxonomy updateTime + * @property {string|null} [description] DataTaxonomy description + * @property {string|null} [displayName] DataTaxonomy displayName + * @property {Object.|null} [labels] DataTaxonomy labels + * @property {number|null} [attributeCount] DataTaxonomy attributeCount + * @property {string|null} [etag] DataTaxonomy etag + * @property {number|null} [classCount] DataTaxonomy classCount + */ + + /** + * Constructs a new DataTaxonomy. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataTaxonomy. + * @implements IDataTaxonomy + * @constructor + * @param {google.cloud.dataplex.v1.IDataTaxonomy=} [properties] Properties to set + */ + function DataTaxonomy(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]]; + } + + /** + * DataTaxonomy name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.name = ""; + + /** + * DataTaxonomy uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.uid = ""; + + /** + * DataTaxonomy createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.createTime = null; + + /** + * DataTaxonomy updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.updateTime = null; + + /** + * DataTaxonomy description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.description = ""; + + /** + * DataTaxonomy displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.displayName = ""; + + /** + * DataTaxonomy labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.labels = $util.emptyObject; + + /** + * DataTaxonomy attributeCount. + * @member {number} attributeCount + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.attributeCount = 0; + + /** + * DataTaxonomy etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.etag = ""; + + /** + * DataTaxonomy classCount. + * @member {number} classCount + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + */ + DataTaxonomy.prototype.classCount = 0; + + /** + * Creates a new DataTaxonomy instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {google.cloud.dataplex.v1.IDataTaxonomy=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy instance + */ + DataTaxonomy.create = function create(properties) { + return new DataTaxonomy(properties); + }; + + /** + * Encodes the specified DataTaxonomy message. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {google.cloud.dataplex.v1.IDataTaxonomy} message DataTaxonomy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTaxonomy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.attributeCount != null && Object.hasOwnProperty.call(message, "attributeCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.attributeCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); + if (message.classCount != null && Object.hasOwnProperty.call(message, "classCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.classCount); + return writer; + }; + + /** + * Encodes the specified DataTaxonomy message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {google.cloud.dataplex.v1.IDataTaxonomy} message DataTaxonomy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataTaxonomy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataTaxonomy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTaxonomy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataTaxonomy(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 9: { + message.attributeCount = reader.int32(); + break; + } + case 10: { + message.etag = reader.string(); + break; + } + case 11: { + message.classCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataTaxonomy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataTaxonomy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataTaxonomy message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataTaxonomy.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) + if (!$util.isInteger(message.attributeCount)) + return "attributeCount: integer expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.classCount != null && message.hasOwnProperty("classCount")) + if (!$util.isInteger(message.classCount)) + return "classCount: integer expected"; + return null; + }; + + /** + * Creates a DataTaxonomy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy + */ + DataTaxonomy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataTaxonomy) + return object; + var message = new $root.google.cloud.dataplex.v1.DataTaxonomy(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataTaxonomy.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.dataplex.v1.DataTaxonomy.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataTaxonomy.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.attributeCount != null) + message.attributeCount = object.attributeCount | 0; + if (object.etag != null) + message.etag = String(object.etag); + if (object.classCount != null) + message.classCount = object.classCount | 0; + return message; + }; + + /** + * Creates a plain object from a DataTaxonomy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {google.cloud.dataplex.v1.DataTaxonomy} message DataTaxonomy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataTaxonomy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.attributeCount = 0; + object.etag = ""; + object.classCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.attributeCount != null && message.hasOwnProperty("attributeCount")) + object.attributeCount = message.attributeCount; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.classCount != null && message.hasOwnProperty("classCount")) + object.classCount = message.classCount; + return object; + }; + + /** + * Converts this DataTaxonomy to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @instance + * @returns {Object.} JSON object + */ + DataTaxonomy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataTaxonomy + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataTaxonomy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataTaxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataTaxonomy"; + }; + + return DataTaxonomy; + })(); + + v1.DataAttribute = (function() { + + /** + * Properties of a DataAttribute. + * @memberof google.cloud.dataplex.v1 + * @interface IDataAttribute + * @property {string|null} [name] DataAttribute name + * @property {string|null} [uid] DataAttribute uid + * @property {google.protobuf.ITimestamp|null} [createTime] DataAttribute createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataAttribute updateTime + * @property {string|null} [description] DataAttribute description + * @property {string|null} [displayName] DataAttribute displayName + * @property {Object.|null} [labels] DataAttribute labels + * @property {string|null} [parentId] DataAttribute parentId + * @property {number|null} [attributeCount] DataAttribute attributeCount + * @property {string|null} [etag] DataAttribute etag + * @property {google.cloud.dataplex.v1.IResourceAccessSpec|null} [resourceAccessSpec] DataAttribute resourceAccessSpec + * @property {google.cloud.dataplex.v1.IDataAccessSpec|null} [dataAccessSpec] DataAttribute dataAccessSpec + */ + + /** + * Constructs a new DataAttribute. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataAttribute. + * @implements IDataAttribute + * @constructor + * @param {google.cloud.dataplex.v1.IDataAttribute=} [properties] Properties to set + */ + function DataAttribute(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]]; + } + + /** + * DataAttribute name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.name = ""; + + /** + * DataAttribute uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.uid = ""; + + /** + * DataAttribute createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.createTime = null; + + /** + * DataAttribute updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.updateTime = null; + + /** + * DataAttribute description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.description = ""; + + /** + * DataAttribute displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.displayName = ""; + + /** + * DataAttribute labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.labels = $util.emptyObject; + + /** + * DataAttribute parentId. + * @member {string} parentId + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.parentId = ""; + + /** + * DataAttribute attributeCount. + * @member {number} attributeCount + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.attributeCount = 0; + + /** + * DataAttribute etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.etag = ""; + + /** + * DataAttribute resourceAccessSpec. + * @member {google.cloud.dataplex.v1.IResourceAccessSpec|null|undefined} resourceAccessSpec + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.resourceAccessSpec = null; + + /** + * DataAttribute dataAccessSpec. + * @member {google.cloud.dataplex.v1.IDataAccessSpec|null|undefined} dataAccessSpec + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + */ + DataAttribute.prototype.dataAccessSpec = null; + + /** + * Creates a new DataAttribute instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {google.cloud.dataplex.v1.IDataAttribute=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute instance + */ + DataAttribute.create = function create(properties) { + return new DataAttribute(properties); + }; + + /** + * Encodes the specified DataAttribute message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {google.cloud.dataplex.v1.IDataAttribute} message DataAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.parentId != null && Object.hasOwnProperty.call(message, "parentId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.parentId); + if (message.attributeCount != null && Object.hasOwnProperty.call(message, "attributeCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.attributeCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); + if (message.resourceAccessSpec != null && Object.hasOwnProperty.call(message, "resourceAccessSpec")) + $root.google.cloud.dataplex.v1.ResourceAccessSpec.encode(message.resourceAccessSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.dataAccessSpec != null && Object.hasOwnProperty.call(message, "dataAccessSpec")) + $root.google.cloud.dataplex.v1.DataAccessSpec.encode(message.dataAccessSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAttribute message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {google.cloud.dataplex.v1.IDataAttribute} message DataAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttribute(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.parentId = reader.string(); + break; + } + case 9: { + message.attributeCount = reader.int32(); + break; + } + case 10: { + message.etag = reader.string(); + break; + } + case 100: { + message.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAttribute message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAttribute.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.parentId != null && message.hasOwnProperty("parentId")) + if (!$util.isString(message.parentId)) + return "parentId: string expected"; + if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) + if (!$util.isInteger(message.attributeCount)) + return "attributeCount: integer expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.resourceAccessSpec != null && message.hasOwnProperty("resourceAccessSpec")) { + var error = $root.google.cloud.dataplex.v1.ResourceAccessSpec.verify(message.resourceAccessSpec); + if (error) + return "resourceAccessSpec." + error; + } + if (message.dataAccessSpec != null && message.hasOwnProperty("dataAccessSpec")) { + var error = $root.google.cloud.dataplex.v1.DataAccessSpec.verify(message.dataAccessSpec); + if (error) + return "dataAccessSpec." + error; + } + return null; + }; + + /** + * Creates a DataAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute + */ + DataAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataAttribute) + return object; + var message = new $root.google.cloud.dataplex.v1.DataAttribute(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttribute.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.dataplex.v1.DataAttribute.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttribute.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.parentId != null) + message.parentId = String(object.parentId); + if (object.attributeCount != null) + message.attributeCount = object.attributeCount | 0; + if (object.etag != null) + message.etag = String(object.etag); + if (object.resourceAccessSpec != null) { + if (typeof object.resourceAccessSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttribute.resourceAccessSpec: object expected"); + message.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.fromObject(object.resourceAccessSpec); + } + if (object.dataAccessSpec != null) { + if (typeof object.dataAccessSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttribute.dataAccessSpec: object expected"); + message.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.fromObject(object.dataAccessSpec); + } + return message; + }; + + /** + * Creates a plain object from a DataAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {google.cloud.dataplex.v1.DataAttribute} message DataAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.parentId = ""; + object.attributeCount = 0; + object.etag = ""; + object.resourceAccessSpec = null; + object.dataAccessSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.parentId != null && message.hasOwnProperty("parentId")) + object.parentId = message.parentId; + if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) + object.attributeCount = message.attributeCount; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.resourceAccessSpec != null && message.hasOwnProperty("resourceAccessSpec")) + object.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.toObject(message.resourceAccessSpec, options); + if (message.dataAccessSpec != null && message.hasOwnProperty("dataAccessSpec")) + object.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.toObject(message.dataAccessSpec, options); + return object; + }; + + /** + * Converts this DataAttribute to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataAttribute + * @instance + * @returns {Object.} JSON object + */ + DataAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAttribute + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttribute"; + }; + + return DataAttribute; + })(); + + v1.DataAttributeBinding = (function() { + + /** + * Properties of a DataAttributeBinding. + * @memberof google.cloud.dataplex.v1 + * @interface IDataAttributeBinding + * @property {string|null} [name] DataAttributeBinding name + * @property {string|null} [uid] DataAttributeBinding uid + * @property {google.protobuf.ITimestamp|null} [createTime] DataAttributeBinding createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataAttributeBinding updateTime + * @property {string|null} [description] DataAttributeBinding description + * @property {string|null} [displayName] DataAttributeBinding displayName + * @property {Object.|null} [labels] DataAttributeBinding labels + * @property {string|null} [etag] DataAttributeBinding etag + * @property {string|null} [resource] DataAttributeBinding resource + * @property {Array.|null} [attributes] DataAttributeBinding attributes + * @property {Array.|null} [paths] DataAttributeBinding paths + */ + + /** + * Constructs a new DataAttributeBinding. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataAttributeBinding. + * @implements IDataAttributeBinding + * @constructor + * @param {google.cloud.dataplex.v1.IDataAttributeBinding=} [properties] Properties to set + */ + function DataAttributeBinding(properties) { + this.labels = {}; + this.attributes = []; + 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]]; + } + + /** + * DataAttributeBinding name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.name = ""; + + /** + * DataAttributeBinding uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.uid = ""; + + /** + * DataAttributeBinding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.createTime = null; + + /** + * DataAttributeBinding updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.updateTime = null; + + /** + * DataAttributeBinding description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.description = ""; + + /** + * DataAttributeBinding displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.displayName = ""; + + /** + * DataAttributeBinding labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.labels = $util.emptyObject; + + /** + * DataAttributeBinding etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.etag = ""; + + /** + * DataAttributeBinding resource. + * @member {string|null|undefined} resource + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.resource = null; + + /** + * DataAttributeBinding attributes. + * @member {Array.} attributes + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.attributes = $util.emptyArray; + + /** + * DataAttributeBinding paths. + * @member {Array.} paths + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + DataAttributeBinding.prototype.paths = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataAttributeBinding resourceReference. + * @member {"resource"|undefined} resourceReference + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + */ + Object.defineProperty(DataAttributeBinding.prototype, "resourceReference", { + get: $util.oneOfGetter($oneOfFields = ["resource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataAttributeBinding instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {google.cloud.dataplex.v1.IDataAttributeBinding=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding instance + */ + DataAttributeBinding.create = function create(properties) { + return new DataAttributeBinding(properties); + }; + + /** + * Encodes the specified DataAttributeBinding message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {google.cloud.dataplex.v1.IDataAttributeBinding} message DataAttributeBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAttributeBinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.resource); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.attributes[i]); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.encode(message.paths[i], writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataAttributeBinding message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {google.cloud.dataplex.v1.IDataAttributeBinding} message DataAttributeBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAttributeBinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAttributeBinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAttributeBinding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttributeBinding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 100: { + message.resource = reader.string(); + break; + } + case 110: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push(reader.string()); + break; + } + case 120: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push($root.google.cloud.dataplex.v1.DataAttributeBinding.Path.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAttributeBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAttributeBinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAttributeBinding message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAttributeBinding.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + properties.resourceReference = 1; + if (!$util.isString(message.resource)) + return "resource: string expected"; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) + if (!$util.isString(message.attributes[i])) + return "attributes: string[] 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) { + var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.verify(message.paths[i]); + if (error) + return "paths." + error; + } + } + return null; + }; + + /** + * Creates a DataAttributeBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding + */ + DataAttributeBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataAttributeBinding) + return object; + var message = new $root.google.cloud.dataplex.v1.DataAttributeBinding(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.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.dataplex.v1.DataAttributeBinding.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.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.etag != null) + message.etag = String(object.etag); + if (object.resource != null) + message.resource = String(object.resource); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) + message.attributes[i] = String(object.attributes[i]); + } + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) { + if (typeof object.paths[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.paths: object expected"); + message.paths[i] = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.fromObject(object.paths[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataAttributeBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {google.cloud.dataplex.v1.DataAttributeBinding} message DataAttributeBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAttributeBinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.attributes = []; + object.paths = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.resource != null && message.hasOwnProperty("resource")) { + object.resource = message.resource; + if (options.oneofs) + object.resourceReference = "resource"; + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = message.attributes[j]; + } + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.toObject(message.paths[j], options); + } + return object; + }; + + /** + * Converts this DataAttributeBinding to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @instance + * @returns {Object.} JSON object + */ + DataAttributeBinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAttributeBinding + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAttributeBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttributeBinding"; + }; + + DataAttributeBinding.Path = (function() { + + /** + * Properties of a Path. + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @interface IPath + * @property {string|null} [name] Path name + * @property {Array.|null} [attributes] Path attributes + */ + + /** + * Constructs a new Path. + * @memberof google.cloud.dataplex.v1.DataAttributeBinding + * @classdesc Represents a Path. + * @implements IPath + * @constructor + * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath=} [properties] Properties to set + */ + function Path(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Path name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @instance + */ + Path.prototype.name = ""; + + /** + * Path attributes. + * @member {Array.} attributes + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @instance + */ + Path.prototype.attributes = $util.emptyArray; + + /** + * Creates a new Path instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path instance + */ + Path.create = function create(properties) { + return new Path(properties); + }; + + /** + * Encodes the specified Path message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath} message Path message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Path.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributes[i]); + return writer; + }; + + /** + * Encodes the specified Path message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath} message Path message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Path.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Path message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Path.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttributeBinding.Path(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Path message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Path.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Path message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Path.verify = function verify(message) { + if (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.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) + if (!$util.isString(message.attributes[i])) + return "attributes: string[] expected"; + } + return null; + }; + + /** + * Creates a Path message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path + */ + Path.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataAttributeBinding.Path) + return object; + var message = new $root.google.cloud.dataplex.v1.DataAttributeBinding.Path(); + if (object.name != null) + message.name = String(object.name); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.Path.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) + message.attributes[i] = String(object.attributes[i]); + } + return message; + }; + + /** + * Creates a plain object from a Path message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {google.cloud.dataplex.v1.DataAttributeBinding.Path} message Path + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Path.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = message.attributes[j]; + } + return object; + }; + + /** + * Converts this Path to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @instance + * @returns {Object.} JSON object + */ + Path.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Path + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Path.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttributeBinding.Path"; + }; + + return Path; + })(); + + return DataAttributeBinding; + })(); + + v1.CreateDataTaxonomyRequest = (function() { + + /** + * Properties of a CreateDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateDataTaxonomyRequest + * @property {string|null} [parent] CreateDataTaxonomyRequest parent + * @property {string|null} [dataTaxonomyId] CreateDataTaxonomyRequest dataTaxonomyId + * @property {google.cloud.dataplex.v1.IDataTaxonomy|null} [dataTaxonomy] CreateDataTaxonomyRequest dataTaxonomy + * @property {boolean|null} [validateOnly] CreateDataTaxonomyRequest validateOnly + */ + + /** + * Constructs a new CreateDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateDataTaxonomyRequest. + * @implements ICreateDataTaxonomyRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest=} [properties] Properties to set + */ + function CreateDataTaxonomyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataTaxonomyRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @instance + */ + CreateDataTaxonomyRequest.prototype.parent = ""; + + /** + * CreateDataTaxonomyRequest dataTaxonomyId. + * @member {string} dataTaxonomyId + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @instance + */ + CreateDataTaxonomyRequest.prototype.dataTaxonomyId = ""; + + /** + * CreateDataTaxonomyRequest dataTaxonomy. + * @member {google.cloud.dataplex.v1.IDataTaxonomy|null|undefined} dataTaxonomy + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @instance + */ + CreateDataTaxonomyRequest.prototype.dataTaxonomy = null; + + /** + * CreateDataTaxonomyRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @instance + */ + CreateDataTaxonomyRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateDataTaxonomyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest instance + */ + CreateDataTaxonomyRequest.create = function create(properties) { + return new CreateDataTaxonomyRequest(properties); + }; + + /** + * Encodes the specified CreateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} message CreateDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTaxonomyRequest.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.dataTaxonomyId != null && Object.hasOwnProperty.call(message, "dataTaxonomyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataTaxonomyId); + if (message.dataTaxonomy != null && Object.hasOwnProperty.call(message, "dataTaxonomy")) + $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} message CreateDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTaxonomyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataTaxonomyId = reader.string(); + break; + } + case 3: { + message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataTaxonomyRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataTaxonomyRequest.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.dataTaxonomyId != null && message.hasOwnProperty("dataTaxonomyId")) + if (!$util.isString(message.dataTaxonomyId)) + return "dataTaxonomyId: string expected"; + if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) { + var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomy); + if (error) + return "dataTaxonomy." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest + */ + CreateDataTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataTaxonomyId != null) + message.dataTaxonomyId = String(object.dataTaxonomyId); + if (object.dataTaxonomy != null) { + if (typeof object.dataTaxonomy !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateDataTaxonomyRequest.dataTaxonomy: object expected"); + message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomy); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDataTaxonomyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} message CreateDataTaxonomyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataTaxonomyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataTaxonomyId = ""; + object.dataTaxonomy = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataTaxonomyId != null && message.hasOwnProperty("dataTaxonomyId")) + object.dataTaxonomyId = message.dataTaxonomyId; + if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) + object.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomy, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDataTaxonomyRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataTaxonomyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataTaxonomyRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"; + }; + + return CreateDataTaxonomyRequest; + })(); + + v1.UpdateDataTaxonomyRequest = (function() { + + /** + * Properties of an UpdateDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateDataTaxonomyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataTaxonomyRequest updateMask + * @property {google.cloud.dataplex.v1.IDataTaxonomy|null} [dataTaxonomy] UpdateDataTaxonomyRequest dataTaxonomy + * @property {boolean|null} [validateOnly] UpdateDataTaxonomyRequest validateOnly + */ + + /** + * Constructs a new UpdateDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateDataTaxonomyRequest. + * @implements IUpdateDataTaxonomyRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest=} [properties] Properties to set + */ + function UpdateDataTaxonomyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataTaxonomyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @instance + */ + UpdateDataTaxonomyRequest.prototype.updateMask = null; + + /** + * UpdateDataTaxonomyRequest dataTaxonomy. + * @member {google.cloud.dataplex.v1.IDataTaxonomy|null|undefined} dataTaxonomy + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @instance + */ + UpdateDataTaxonomyRequest.prototype.dataTaxonomy = null; + + /** + * UpdateDataTaxonomyRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @instance + */ + UpdateDataTaxonomyRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDataTaxonomyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest instance + */ + UpdateDataTaxonomyRequest.create = function create(properties) { + return new UpdateDataTaxonomyRequest(properties); + }; + + /** + * Encodes the specified UpdateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTaxonomyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataTaxonomy != null && Object.hasOwnProperty.call(message, "dataTaxonomy")) + $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTaxonomyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataTaxonomyRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataTaxonomyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) { + var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomy); + if (error) + return "dataTaxonomy." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest + */ + UpdateDataTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataTaxonomy != null) { + if (typeof object.dataTaxonomy !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.dataTaxonomy: object expected"); + message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomy); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateDataTaxonomyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataTaxonomyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataTaxonomy = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) + object.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomy, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateDataTaxonomyRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataTaxonomyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataTaxonomyRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"; + }; + + return UpdateDataTaxonomyRequest; + })(); + + v1.GetDataTaxonomyRequest = (function() { + + /** + * Properties of a GetDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataTaxonomyRequest + * @property {string|null} [name] GetDataTaxonomyRequest name + */ + + /** + * Constructs a new GetDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataTaxonomyRequest. + * @implements IGetDataTaxonomyRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest=} [properties] Properties to set + */ + function GetDataTaxonomyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataTaxonomyRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @instance + */ + GetDataTaxonomyRequest.prototype.name = ""; + + /** + * Creates a new GetDataTaxonomyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest instance + */ + GetDataTaxonomyRequest.create = function create(properties) { + return new GetDataTaxonomyRequest(properties); + }; + + /** + * Encodes the specified GetDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} message GetDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTaxonomyRequest.encode = function encode(message, writer) { + 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 GetDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} message GetDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTaxonomyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest(); + 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 GetDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataTaxonomyRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataTaxonomyRequest.verify = function verify(message) { + if (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 GetDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest + */ + GetDataTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataTaxonomyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataTaxonomyRequest} message GetDataTaxonomyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataTaxonomyRequest.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 GetDataTaxonomyRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataTaxonomyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataTaxonomyRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataTaxonomyRequest"; + }; + + return GetDataTaxonomyRequest; + })(); + + v1.ListDataTaxonomiesRequest = (function() { + + /** + * Properties of a ListDataTaxonomiesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataTaxonomiesRequest + * @property {string|null} [parent] ListDataTaxonomiesRequest parent + * @property {number|null} [pageSize] ListDataTaxonomiesRequest pageSize + * @property {string|null} [pageToken] ListDataTaxonomiesRequest pageToken + * @property {string|null} [filter] ListDataTaxonomiesRequest filter + * @property {string|null} [orderBy] ListDataTaxonomiesRequest orderBy + */ + + /** + * Constructs a new ListDataTaxonomiesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataTaxonomiesRequest. + * @implements IListDataTaxonomiesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest=} [properties] Properties to set + */ + function ListDataTaxonomiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTaxonomiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + */ + ListDataTaxonomiesRequest.prototype.parent = ""; + + /** + * ListDataTaxonomiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + */ + ListDataTaxonomiesRequest.prototype.pageSize = 0; + + /** + * ListDataTaxonomiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + */ + ListDataTaxonomiesRequest.prototype.pageToken = ""; + + /** + * ListDataTaxonomiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + */ + ListDataTaxonomiesRequest.prototype.filter = ""; + + /** + * ListDataTaxonomiesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + */ + ListDataTaxonomiesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataTaxonomiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest instance + */ + ListDataTaxonomiesRequest.create = function create(properties) { + return new ListDataTaxonomiesRequest(properties); + }; + + /** + * Encodes the specified ListDataTaxonomiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} message ListDataTaxonomiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTaxonomiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} message ListDataTaxonomiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTaxonomiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTaxonomiesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTaxonomiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest + */ + ListDataTaxonomiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataTaxonomiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} message ListDataTaxonomiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTaxonomiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataTaxonomiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataTaxonomiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTaxonomiesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"; + }; + + return ListDataTaxonomiesRequest; + })(); + + v1.ListDataTaxonomiesResponse = (function() { + + /** + * Properties of a ListDataTaxonomiesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataTaxonomiesResponse + * @property {Array.|null} [dataTaxonomies] ListDataTaxonomiesResponse dataTaxonomies + * @property {string|null} [nextPageToken] ListDataTaxonomiesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListDataTaxonomiesResponse unreachableLocations + */ + + /** + * Constructs a new ListDataTaxonomiesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataTaxonomiesResponse. + * @implements IListDataTaxonomiesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse=} [properties] Properties to set + */ + function ListDataTaxonomiesResponse(properties) { + this.dataTaxonomies = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataTaxonomiesResponse dataTaxonomies. + * @member {Array.} dataTaxonomies + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @instance + */ + ListDataTaxonomiesResponse.prototype.dataTaxonomies = $util.emptyArray; + + /** + * ListDataTaxonomiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @instance + */ + ListDataTaxonomiesResponse.prototype.nextPageToken = ""; + + /** + * ListDataTaxonomiesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @instance + */ + ListDataTaxonomiesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListDataTaxonomiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse instance + */ + ListDataTaxonomiesResponse.create = function create(properties) { + return new ListDataTaxonomiesResponse(properties); + }; + + /** + * Encodes the specified ListDataTaxonomiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse} message ListDataTaxonomiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTaxonomiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataTaxonomies != null && message.dataTaxonomies.length) + for (var i = 0; i < message.dataTaxonomies.length; ++i) + $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListDataTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse} message ListDataTaxonomiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTaxonomiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataTaxonomies && message.dataTaxonomies.length)) + message.dataTaxonomies = []; + message.dataTaxonomies.push($root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataTaxonomiesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataTaxonomiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataTaxonomies != null && message.hasOwnProperty("dataTaxonomies")) { + if (!Array.isArray(message.dataTaxonomies)) + return "dataTaxonomies: array expected"; + for (var i = 0; i < message.dataTaxonomies.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomies[i]); + if (error) + return "dataTaxonomies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse + */ + ListDataTaxonomiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(); + if (object.dataTaxonomies) { + if (!Array.isArray(object.dataTaxonomies)) + throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.dataTaxonomies: array expected"); + message.dataTaxonomies = []; + for (var i = 0; i < object.dataTaxonomies.length; ++i) { + if (typeof object.dataTaxonomies[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.dataTaxonomies: object expected"); + message.dataTaxonomies[i] = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDataTaxonomiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} message ListDataTaxonomiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataTaxonomiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataTaxonomies = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataTaxonomies && message.dataTaxonomies.length) { + object.dataTaxonomies = []; + for (var j = 0; j < message.dataTaxonomies.length; ++j) + object.dataTaxonomies[j] = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListDataTaxonomiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataTaxonomiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataTaxonomiesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"; + }; + + return ListDataTaxonomiesResponse; + })(); + + v1.DeleteDataTaxonomyRequest = (function() { + + /** + * Properties of a DeleteDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteDataTaxonomyRequest + * @property {string|null} [name] DeleteDataTaxonomyRequest name + * @property {string|null} [etag] DeleteDataTaxonomyRequest etag + */ + + /** + * Constructs a new DeleteDataTaxonomyRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteDataTaxonomyRequest. + * @implements IDeleteDataTaxonomyRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest=} [properties] Properties to set + */ + function DeleteDataTaxonomyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataTaxonomyRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @instance + */ + DeleteDataTaxonomyRequest.prototype.name = ""; + + /** + * DeleteDataTaxonomyRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @instance + */ + DeleteDataTaxonomyRequest.prototype.etag = ""; + + /** + * Creates a new DeleteDataTaxonomyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest instance + */ + DeleteDataTaxonomyRequest.create = function create(properties) { + return new DeleteDataTaxonomyRequest(properties); + }; + + /** + * Encodes the specified DeleteDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTaxonomyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTaxonomyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataTaxonomyRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataTaxonomyRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest + */ + DeleteDataTaxonomyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteDataTaxonomyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataTaxonomyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteDataTaxonomyRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataTaxonomyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataTaxonomyRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"; + }; + + return DeleteDataTaxonomyRequest; + })(); + + v1.CreateDataAttributeRequest = (function() { + + /** + * Properties of a CreateDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateDataAttributeRequest + * @property {string|null} [parent] CreateDataAttributeRequest parent + * @property {string|null} [dataAttributeId] CreateDataAttributeRequest dataAttributeId + * @property {google.cloud.dataplex.v1.IDataAttribute|null} [dataAttribute] CreateDataAttributeRequest dataAttribute + * @property {boolean|null} [validateOnly] CreateDataAttributeRequest validateOnly + */ + + /** + * Constructs a new CreateDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateDataAttributeRequest. + * @implements ICreateDataAttributeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest=} [properties] Properties to set + */ + function CreateDataAttributeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataAttributeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @instance + */ + CreateDataAttributeRequest.prototype.parent = ""; + + /** + * CreateDataAttributeRequest dataAttributeId. + * @member {string} dataAttributeId + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @instance + */ + CreateDataAttributeRequest.prototype.dataAttributeId = ""; + + /** + * CreateDataAttributeRequest dataAttribute. + * @member {google.cloud.dataplex.v1.IDataAttribute|null|undefined} dataAttribute + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @instance + */ + CreateDataAttributeRequest.prototype.dataAttribute = null; + + /** + * CreateDataAttributeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @instance + */ + CreateDataAttributeRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateDataAttributeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest instance + */ + CreateDataAttributeRequest.create = function create(properties) { + return new CreateDataAttributeRequest(properties); + }; + + /** + * Encodes the specified CreateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} message CreateDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAttributeRequest.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.dataAttributeId != null && Object.hasOwnProperty.call(message, "dataAttributeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAttributeId); + if (message.dataAttribute != null && Object.hasOwnProperty.call(message, "dataAttribute")) + $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttribute, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} message CreateDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataAttributeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAttributeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataAttributeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataAttributeId = reader.string(); + break; + } + case 3: { + message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataAttributeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataAttributeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataAttributeRequest.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.dataAttributeId != null && message.hasOwnProperty("dataAttributeId")) + if (!$util.isString(message.dataAttributeId)) + return "dataAttributeId: string expected"; + if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) { + var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttribute); + if (error) + return "dataAttribute." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest + */ + CreateDataAttributeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateDataAttributeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateDataAttributeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataAttributeId != null) + message.dataAttributeId = String(object.dataAttributeId); + if (object.dataAttribute != null) { + if (typeof object.dataAttribute !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateDataAttributeRequest.dataAttribute: object expected"); + message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttribute); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDataAttributeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.CreateDataAttributeRequest} message CreateDataAttributeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataAttributeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataAttributeId = ""; + object.dataAttribute = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataAttributeId != null && message.hasOwnProperty("dataAttributeId")) + object.dataAttributeId = message.dataAttributeId; + if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) + object.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttribute, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDataAttributeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataAttributeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataAttributeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataAttributeRequest"; + }; + + return CreateDataAttributeRequest; + })(); + + v1.UpdateDataAttributeRequest = (function() { + + /** + * Properties of an UpdateDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateDataAttributeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAttributeRequest updateMask + * @property {google.cloud.dataplex.v1.IDataAttribute|null} [dataAttribute] UpdateDataAttributeRequest dataAttribute + * @property {boolean|null} [validateOnly] UpdateDataAttributeRequest validateOnly + */ + + /** + * Constructs a new UpdateDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateDataAttributeRequest. + * @implements IUpdateDataAttributeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest=} [properties] Properties to set + */ + function UpdateDataAttributeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataAttributeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @instance + */ + UpdateDataAttributeRequest.prototype.updateMask = null; + + /** + * UpdateDataAttributeRequest dataAttribute. + * @member {google.cloud.dataplex.v1.IDataAttribute|null|undefined} dataAttribute + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @instance + */ + UpdateDataAttributeRequest.prototype.dataAttribute = null; + + /** + * UpdateDataAttributeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @instance + */ + UpdateDataAttributeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDataAttributeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest instance + */ + UpdateDataAttributeRequest.create = function create(properties) { + return new UpdateDataAttributeRequest(properties); + }; + + /** + * Encodes the specified UpdateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} message UpdateDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAttributeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataAttribute != null && Object.hasOwnProperty.call(message, "dataAttribute")) + $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttribute, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} message UpdateDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAttributeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataAttributeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataAttributeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) { + var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttribute); + if (error) + return "dataAttribute." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest + */ + UpdateDataAttributeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataAttribute != null) { + if (typeof object.dataAttribute !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeRequest.dataAttribute: object expected"); + message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttribute); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateDataAttributeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateDataAttributeRequest} message UpdateDataAttributeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataAttributeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataAttribute = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) + object.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttribute, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateDataAttributeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataAttributeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataAttributeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataAttributeRequest"; + }; + + return UpdateDataAttributeRequest; + })(); + + v1.GetDataAttributeRequest = (function() { + + /** + * Properties of a GetDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataAttributeRequest + * @property {string|null} [name] GetDataAttributeRequest name + */ + + /** + * Constructs a new GetDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataAttributeRequest. + * @implements IGetDataAttributeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest=} [properties] Properties to set + */ + function GetDataAttributeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataAttributeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @instance + */ + GetDataAttributeRequest.prototype.name = ""; + + /** + * Creates a new GetDataAttributeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest instance + */ + GetDataAttributeRequest.create = function create(properties) { + return new GetDataAttributeRequest(properties); + }; + + /** + * Encodes the specified GetDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} message GetDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAttributeRequest.encode = function encode(message, writer) { + 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 GetDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} message GetDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataAttributeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAttributeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataAttributeRequest(); + 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 GetDataAttributeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataAttributeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataAttributeRequest.verify = function verify(message) { + if (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 GetDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest + */ + GetDataAttributeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataAttributeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataAttributeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataAttributeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataAttributeRequest} message GetDataAttributeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataAttributeRequest.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 GetDataAttributeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataAttributeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataAttributeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataAttributeRequest"; + }; + + return GetDataAttributeRequest; + })(); + + v1.ListDataAttributesRequest = (function() { + + /** + * Properties of a ListDataAttributesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataAttributesRequest + * @property {string|null} [parent] ListDataAttributesRequest parent + * @property {number|null} [pageSize] ListDataAttributesRequest pageSize + * @property {string|null} [pageToken] ListDataAttributesRequest pageToken + * @property {string|null} [filter] ListDataAttributesRequest filter + * @property {string|null} [orderBy] ListDataAttributesRequest orderBy + */ + + /** + * Constructs a new ListDataAttributesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataAttributesRequest. + * @implements IListDataAttributesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest=} [properties] Properties to set + */ + function ListDataAttributesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAttributesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + */ + ListDataAttributesRequest.prototype.parent = ""; + + /** + * ListDataAttributesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + */ + ListDataAttributesRequest.prototype.pageSize = 0; + + /** + * ListDataAttributesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + */ + ListDataAttributesRequest.prototype.pageToken = ""; + + /** + * ListDataAttributesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + */ + ListDataAttributesRequest.prototype.filter = ""; + + /** + * ListDataAttributesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + */ + ListDataAttributesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataAttributesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest instance + */ + ListDataAttributesRequest.create = function create(properties) { + return new ListDataAttributesRequest(properties); + }; + + /** + * Encodes the specified ListDataAttributesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} message ListDataAttributesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataAttributesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} message ListDataAttributesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAttributesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributesRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAttributesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAttributesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAttributesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataAttributesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest + */ + ListDataAttributesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataAttributesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataAttributesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataAttributesRequest} message ListDataAttributesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAttributesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataAttributesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataAttributesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAttributesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAttributesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributesRequest"; + }; + + return ListDataAttributesRequest; + })(); + + v1.ListDataAttributesResponse = (function() { + + /** + * Properties of a ListDataAttributesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataAttributesResponse + * @property {Array.|null} [dataAttributes] ListDataAttributesResponse dataAttributes + * @property {string|null} [nextPageToken] ListDataAttributesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListDataAttributesResponse unreachableLocations + */ + + /** + * Constructs a new ListDataAttributesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataAttributesResponse. + * @implements IListDataAttributesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataAttributesResponse=} [properties] Properties to set + */ + function ListDataAttributesResponse(properties) { + this.dataAttributes = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAttributesResponse dataAttributes. + * @member {Array.} dataAttributes + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @instance + */ + ListDataAttributesResponse.prototype.dataAttributes = $util.emptyArray; + + /** + * ListDataAttributesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @instance + */ + ListDataAttributesResponse.prototype.nextPageToken = ""; + + /** + * ListDataAttributesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @instance + */ + ListDataAttributesResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListDataAttributesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse instance + */ + ListDataAttributesResponse.create = function create(properties) { + return new ListDataAttributesResponse(properties); + }; + + /** + * Encodes the specified ListDataAttributesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesResponse} message ListDataAttributesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAttributes != null && message.dataAttributes.length) + for (var i = 0; i < message.dataAttributes.length; ++i) + $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttributes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListDataAttributesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributesResponse} message ListDataAttributesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAttributesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataAttributes && message.dataAttributes.length)) + message.dataAttributes = []; + message.dataAttributes.push($root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAttributesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAttributesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAttributesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAttributes != null && message.hasOwnProperty("dataAttributes")) { + if (!Array.isArray(message.dataAttributes)) + return "dataAttributes: array expected"; + for (var i = 0; i < message.dataAttributes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttributes[i]); + if (error) + return "dataAttributes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataAttributesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse + */ + ListDataAttributesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataAttributesResponse(); + if (object.dataAttributes) { + if (!Array.isArray(object.dataAttributes)) + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.dataAttributes: array expected"); + message.dataAttributes = []; + for (var i = 0; i < object.dataAttributes.length; ++i) { + if (typeof object.dataAttributes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.dataAttributes: object expected"); + message.dataAttributes[i] = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttributes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDataAttributesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataAttributesResponse} message ListDataAttributesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAttributesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAttributes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAttributes && message.dataAttributes.length) { + object.dataAttributes = []; + for (var j = 0; j < message.dataAttributes.length; ++j) + object.dataAttributes[j] = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttributes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListDataAttributesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataAttributesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAttributesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAttributesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributesResponse"; + }; + + return ListDataAttributesResponse; + })(); + + v1.DeleteDataAttributeRequest = (function() { + + /** + * Properties of a DeleteDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteDataAttributeRequest + * @property {string|null} [name] DeleteDataAttributeRequest name + * @property {string|null} [etag] DeleteDataAttributeRequest etag + */ + + /** + * Constructs a new DeleteDataAttributeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteDataAttributeRequest. + * @implements IDeleteDataAttributeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest=} [properties] Properties to set + */ + function DeleteDataAttributeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataAttributeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @instance + */ + DeleteDataAttributeRequest.prototype.name = ""; + + /** + * DeleteDataAttributeRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @instance + */ + DeleteDataAttributeRequest.prototype.etag = ""; + + /** + * Creates a new DeleteDataAttributeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest instance + */ + DeleteDataAttributeRequest.create = function create(properties) { + return new DeleteDataAttributeRequest(properties); + }; + + /** + * Encodes the specified DeleteDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} message DeleteDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAttributeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} message DeleteDataAttributeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAttributeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataAttributeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataAttributeRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteDataAttributeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest + */ + DeleteDataAttributeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteDataAttributeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteDataAttributeRequest} message DeleteDataAttributeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataAttributeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteDataAttributeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataAttributeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataAttributeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataAttributeRequest"; + }; + + return DeleteDataAttributeRequest; + })(); + + v1.CreateDataAttributeBindingRequest = (function() { + + /** + * Properties of a CreateDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateDataAttributeBindingRequest + * @property {string|null} [parent] CreateDataAttributeBindingRequest parent + * @property {string|null} [dataAttributeBindingId] CreateDataAttributeBindingRequest dataAttributeBindingId + * @property {google.cloud.dataplex.v1.IDataAttributeBinding|null} [dataAttributeBinding] CreateDataAttributeBindingRequest dataAttributeBinding + * @property {boolean|null} [validateOnly] CreateDataAttributeBindingRequest validateOnly + */ + + /** + * Constructs a new CreateDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateDataAttributeBindingRequest. + * @implements ICreateDataAttributeBindingRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest=} [properties] Properties to set + */ + function CreateDataAttributeBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataAttributeBindingRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @instance + */ + CreateDataAttributeBindingRequest.prototype.parent = ""; + + /** + * CreateDataAttributeBindingRequest dataAttributeBindingId. + * @member {string} dataAttributeBindingId + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @instance + */ + CreateDataAttributeBindingRequest.prototype.dataAttributeBindingId = ""; + + /** + * CreateDataAttributeBindingRequest dataAttributeBinding. + * @member {google.cloud.dataplex.v1.IDataAttributeBinding|null|undefined} dataAttributeBinding + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @instance + */ + CreateDataAttributeBindingRequest.prototype.dataAttributeBinding = null; + + /** + * CreateDataAttributeBindingRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @instance + */ + CreateDataAttributeBindingRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateDataAttributeBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest instance + */ + CreateDataAttributeBindingRequest.create = function create(properties) { + return new CreateDataAttributeBindingRequest(properties); + }; + + /** + * Encodes the specified CreateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAttributeBindingRequest.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.dataAttributeBindingId != null && Object.hasOwnProperty.call(message, "dataAttributeBindingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAttributeBindingId); + if (message.dataAttributeBinding != null && Object.hasOwnProperty.call(message, "dataAttributeBinding")) + $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAttributeBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataAttributeBindingId = reader.string(); + break; + } + case 3: { + message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataAttributeBindingRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataAttributeBindingRequest.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.dataAttributeBindingId != null && message.hasOwnProperty("dataAttributeBindingId")) + if (!$util.isString(message.dataAttributeBindingId)) + return "dataAttributeBindingId: string expected"; + if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) { + var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBinding); + if (error) + return "dataAttributeBinding." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest + */ + CreateDataAttributeBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataAttributeBindingId != null) + message.dataAttributeBindingId = String(object.dataAttributeBindingId); + if (object.dataAttributeBinding != null) { + if (typeof object.dataAttributeBinding !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.dataAttributeBinding: object expected"); + message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBinding); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDataAttributeBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataAttributeBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataAttributeBindingId = ""; + object.dataAttributeBinding = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataAttributeBindingId != null && message.hasOwnProperty("dataAttributeBindingId")) + object.dataAttributeBindingId = message.dataAttributeBindingId; + if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) + object.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBinding, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDataAttributeBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataAttributeBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataAttributeBindingRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"; + }; + + return CreateDataAttributeBindingRequest; + })(); + + v1.UpdateDataAttributeBindingRequest = (function() { + + /** + * Properties of an UpdateDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateDataAttributeBindingRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAttributeBindingRequest updateMask + * @property {google.cloud.dataplex.v1.IDataAttributeBinding|null} [dataAttributeBinding] UpdateDataAttributeBindingRequest dataAttributeBinding + * @property {boolean|null} [validateOnly] UpdateDataAttributeBindingRequest validateOnly + */ + + /** + * Constructs a new UpdateDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateDataAttributeBindingRequest. + * @implements IUpdateDataAttributeBindingRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest=} [properties] Properties to set + */ + function UpdateDataAttributeBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataAttributeBindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @instance + */ + UpdateDataAttributeBindingRequest.prototype.updateMask = null; + + /** + * UpdateDataAttributeBindingRequest dataAttributeBinding. + * @member {google.cloud.dataplex.v1.IDataAttributeBinding|null|undefined} dataAttributeBinding + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @instance + */ + UpdateDataAttributeBindingRequest.prototype.dataAttributeBinding = null; + + /** + * UpdateDataAttributeBindingRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @instance + */ + UpdateDataAttributeBindingRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDataAttributeBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest instance + */ + UpdateDataAttributeBindingRequest.create = function create(properties) { + return new UpdateDataAttributeBindingRequest(properties); + }; + + /** + * Encodes the specified UpdateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAttributeBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataAttributeBinding != null && Object.hasOwnProperty.call(message, "dataAttributeBinding")) + $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBinding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAttributeBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataAttributeBindingRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataAttributeBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) { + var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBinding); + if (error) + return "dataAttributeBinding." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest + */ + UpdateDataAttributeBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataAttributeBinding != null) { + if (typeof object.dataAttributeBinding !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.dataAttributeBinding: object expected"); + message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBinding); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateDataAttributeBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataAttributeBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataAttributeBinding = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) + object.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBinding, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateDataAttributeBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataAttributeBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataAttributeBindingRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"; + }; + + return UpdateDataAttributeBindingRequest; + })(); + + v1.GetDataAttributeBindingRequest = (function() { + + /** + * Properties of a GetDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataAttributeBindingRequest + * @property {string|null} [name] GetDataAttributeBindingRequest name + */ + + /** + * Constructs a new GetDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataAttributeBindingRequest. + * @implements IGetDataAttributeBindingRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest=} [properties] Properties to set + */ + function GetDataAttributeBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataAttributeBindingRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @instance + */ + GetDataAttributeBindingRequest.prototype.name = ""; + + /** + * Creates a new GetDataAttributeBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest instance + */ + GetDataAttributeBindingRequest.create = function create(properties) { + return new GetDataAttributeBindingRequest(properties); + }; + + /** + * Encodes the specified GetDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} message GetDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAttributeBindingRequest.encode = function encode(message, writer) { + 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 GetDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} message GetDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAttributeBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(); + 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 GetDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataAttributeBindingRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataAttributeBindingRequest.verify = function verify(message) { + if (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 GetDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest + */ + GetDataAttributeBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataAttributeBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} message GetDataAttributeBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataAttributeBindingRequest.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 GetDataAttributeBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataAttributeBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataAttributeBindingRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"; + }; + + return GetDataAttributeBindingRequest; + })(); + + v1.ListDataAttributeBindingsRequest = (function() { + + /** + * Properties of a ListDataAttributeBindingsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataAttributeBindingsRequest + * @property {string|null} [parent] ListDataAttributeBindingsRequest parent + * @property {number|null} [pageSize] ListDataAttributeBindingsRequest pageSize + * @property {string|null} [pageToken] ListDataAttributeBindingsRequest pageToken + * @property {string|null} [filter] ListDataAttributeBindingsRequest filter + * @property {string|null} [orderBy] ListDataAttributeBindingsRequest orderBy + */ + + /** + * Constructs a new ListDataAttributeBindingsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataAttributeBindingsRequest. + * @implements IListDataAttributeBindingsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest=} [properties] Properties to set + */ + function ListDataAttributeBindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAttributeBindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + */ + ListDataAttributeBindingsRequest.prototype.parent = ""; + + /** + * ListDataAttributeBindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + */ + ListDataAttributeBindingsRequest.prototype.pageSize = 0; + + /** + * ListDataAttributeBindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + */ + ListDataAttributeBindingsRequest.prototype.pageToken = ""; + + /** + * ListDataAttributeBindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + */ + ListDataAttributeBindingsRequest.prototype.filter = ""; + + /** + * ListDataAttributeBindingsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + */ + ListDataAttributeBindingsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataAttributeBindingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest instance + */ + ListDataAttributeBindingsRequest.create = function create(properties) { + return new ListDataAttributeBindingsRequest(properties); + }; + + /** + * Encodes the specified ListDataAttributeBindingsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributeBindingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataAttributeBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributeBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributeBindingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributeBindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAttributeBindingsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAttributeBindingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataAttributeBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest + */ + ListDataAttributeBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataAttributeBindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAttributeBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataAttributeBindingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataAttributeBindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAttributeBindingsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAttributeBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"; + }; + + return ListDataAttributeBindingsRequest; + })(); + + v1.ListDataAttributeBindingsResponse = (function() { + + /** + * Properties of a ListDataAttributeBindingsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataAttributeBindingsResponse + * @property {Array.|null} [dataAttributeBindings] ListDataAttributeBindingsResponse dataAttributeBindings + * @property {string|null} [nextPageToken] ListDataAttributeBindingsResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListDataAttributeBindingsResponse unreachableLocations + */ + + /** + * Constructs a new ListDataAttributeBindingsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataAttributeBindingsResponse. + * @implements IListDataAttributeBindingsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse=} [properties] Properties to set + */ + function ListDataAttributeBindingsResponse(properties) { + this.dataAttributeBindings = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataAttributeBindingsResponse dataAttributeBindings. + * @member {Array.} dataAttributeBindings + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @instance + */ + ListDataAttributeBindingsResponse.prototype.dataAttributeBindings = $util.emptyArray; + + /** + * ListDataAttributeBindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @instance + */ + ListDataAttributeBindingsResponse.prototype.nextPageToken = ""; + + /** + * ListDataAttributeBindingsResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @instance + */ + ListDataAttributeBindingsResponse.prototype.unreachableLocations = $util.emptyArray; + + /** + * Creates a new ListDataAttributeBindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse instance + */ + ListDataAttributeBindingsResponse.create = function create(properties) { + return new ListDataAttributeBindingsResponse(properties); + }; + + /** + * Encodes the specified ListDataAttributeBindingsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributeBindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataAttributeBindings != null && message.dataAttributeBindings.length) + for (var i = 0; i < message.dataAttributeBindings.length; ++i) + $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; + + /** + * Encodes the specified ListDataAttributeBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataAttributeBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributeBindingsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataAttributeBindings && message.dataAttributeBindings.length)) + message.dataAttributeBindings = []; + message.dataAttributeBindings.push($root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataAttributeBindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataAttributeBindingsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataAttributeBindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataAttributeBindings != null && message.hasOwnProperty("dataAttributeBindings")) { + if (!Array.isArray(message.dataAttributeBindings)) + return "dataAttributeBindings: array expected"; + for (var i = 0; i < message.dataAttributeBindings.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBindings[i]); + if (error) + return "dataAttributeBindings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataAttributeBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse + */ + ListDataAttributeBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(); + if (object.dataAttributeBindings) { + if (!Array.isArray(object.dataAttributeBindings)) + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.dataAttributeBindings: array expected"); + message.dataAttributeBindings = []; + for (var i = 0; i < object.dataAttributeBindings.length; ++i) { + if (typeof object.dataAttributeBindings[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.dataAttributeBindings: object expected"); + message.dataAttributeBindings[i] = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBindings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListDataAttributeBindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataAttributeBindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataAttributeBindings = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataAttributeBindings && message.dataAttributeBindings.length) { + object.dataAttributeBindings = []; + for (var j = 0; j < message.dataAttributeBindings.length; ++j) + object.dataAttributeBindings[j] = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBindings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; + + /** + * Converts this ListDataAttributeBindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataAttributeBindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataAttributeBindingsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataAttributeBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"; + }; + + return ListDataAttributeBindingsResponse; + })(); + + v1.DeleteDataAttributeBindingRequest = (function() { + + /** + * Properties of a DeleteDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteDataAttributeBindingRequest + * @property {string|null} [name] DeleteDataAttributeBindingRequest name + * @property {string|null} [etag] DeleteDataAttributeBindingRequest etag + */ + + /** + * Constructs a new DeleteDataAttributeBindingRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteDataAttributeBindingRequest. + * @implements IDeleteDataAttributeBindingRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest=} [properties] Properties to set + */ + function DeleteDataAttributeBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataAttributeBindingRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @instance + */ + DeleteDataAttributeBindingRequest.prototype.name = ""; + + /** + * DeleteDataAttributeBindingRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @instance + */ + DeleteDataAttributeBindingRequest.prototype.etag = ""; + + /** + * Creates a new DeleteDataAttributeBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest instance + */ + DeleteDataAttributeBindingRequest.create = function create(properties) { + return new DeleteDataAttributeBindingRequest(properties); + }; + + /** + * Encodes the specified DeleteDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAttributeBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAttributeBindingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataAttributeBindingRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataAttributeBindingRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest + */ + DeleteDataAttributeBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteDataAttributeBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataAttributeBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteDataAttributeBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataAttributeBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataAttributeBindingRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"; + }; + + return DeleteDataAttributeBindingRequest; + })(); + + v1.ResourceAccessSpec = (function() { + + /** + * Properties of a ResourceAccessSpec. + * @memberof google.cloud.dataplex.v1 + * @interface IResourceAccessSpec + * @property {Array.|null} [readers] ResourceAccessSpec readers + * @property {Array.|null} [writers] ResourceAccessSpec writers + * @property {Array.|null} [owners] ResourceAccessSpec owners + */ + + /** + * Constructs a new ResourceAccessSpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ResourceAccessSpec. + * @implements IResourceAccessSpec + * @constructor + * @param {google.cloud.dataplex.v1.IResourceAccessSpec=} [properties] Properties to set + */ + function ResourceAccessSpec(properties) { + this.readers = []; + this.writers = []; + this.owners = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceAccessSpec readers. + * @member {Array.} readers + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @instance + */ + ResourceAccessSpec.prototype.readers = $util.emptyArray; + + /** + * ResourceAccessSpec writers. + * @member {Array.} writers + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @instance + */ + ResourceAccessSpec.prototype.writers = $util.emptyArray; + + /** + * ResourceAccessSpec owners. + * @member {Array.} owners + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @instance + */ + ResourceAccessSpec.prototype.owners = $util.emptyArray; + + /** + * Creates a new ResourceAccessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IResourceAccessSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec instance + */ + ResourceAccessSpec.create = function create(properties) { + return new ResourceAccessSpec(properties); + }; + + /** + * Encodes the specified ResourceAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IResourceAccessSpec} message ResourceAccessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceAccessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readers != null && message.readers.length) + for (var i = 0; i < message.readers.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.readers[i]); + if (message.writers != null && message.writers.length) + for (var i = 0; i < message.writers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.writers[i]); + if (message.owners != null && message.owners.length) + for (var i = 0; i < message.owners.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.owners[i]); + return writer; + }; + + /** + * Encodes the specified ResourceAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IResourceAccessSpec} message ResourceAccessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceAccessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceAccessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceAccessSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ResourceAccessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.readers && message.readers.length)) + message.readers = []; + message.readers.push(reader.string()); + break; + } + case 2: { + if (!(message.writers && message.writers.length)) + message.writers = []; + message.writers.push(reader.string()); + break; + } + case 3: { + if (!(message.owners && message.owners.length)) + message.owners = []; + message.owners.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceAccessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceAccessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceAccessSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceAccessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readers != null && message.hasOwnProperty("readers")) { + if (!Array.isArray(message.readers)) + return "readers: array expected"; + for (var i = 0; i < message.readers.length; ++i) + if (!$util.isString(message.readers[i])) + return "readers: string[] expected"; + } + if (message.writers != null && message.hasOwnProperty("writers")) { + if (!Array.isArray(message.writers)) + return "writers: array expected"; + for (var i = 0; i < message.writers.length; ++i) + if (!$util.isString(message.writers[i])) + return "writers: string[] expected"; + } + if (message.owners != null && message.hasOwnProperty("owners")) { + if (!Array.isArray(message.owners)) + return "owners: array expected"; + for (var i = 0; i < message.owners.length; ++i) + if (!$util.isString(message.owners[i])) + return "owners: string[] expected"; + } + return null; + }; + + /** + * Creates a ResourceAccessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec + */ + ResourceAccessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ResourceAccessSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.ResourceAccessSpec(); + if (object.readers) { + if (!Array.isArray(object.readers)) + throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.readers: array expected"); + message.readers = []; + for (var i = 0; i < object.readers.length; ++i) + message.readers[i] = String(object.readers[i]); + } + if (object.writers) { + if (!Array.isArray(object.writers)) + throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.writers: array expected"); + message.writers = []; + for (var i = 0; i < object.writers.length; ++i) + message.writers[i] = String(object.writers[i]); + } + if (object.owners) { + if (!Array.isArray(object.owners)) + throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.owners: array expected"); + message.owners = []; + for (var i = 0; i < object.owners.length; ++i) + message.owners[i] = String(object.owners[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResourceAccessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {google.cloud.dataplex.v1.ResourceAccessSpec} message ResourceAccessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceAccessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.readers = []; + object.writers = []; + object.owners = []; + } + if (message.readers && message.readers.length) { + object.readers = []; + for (var j = 0; j < message.readers.length; ++j) + object.readers[j] = message.readers[j]; + } + if (message.writers && message.writers.length) { + object.writers = []; + for (var j = 0; j < message.writers.length; ++j) + object.writers[j] = message.writers[j]; + } + if (message.owners && message.owners.length) { + object.owners = []; + for (var j = 0; j < message.owners.length; ++j) + object.owners[j] = message.owners[j]; + } + return object; + }; + + /** + * Converts this ResourceAccessSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @instance + * @returns {Object.} JSON object + */ + ResourceAccessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceAccessSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ResourceAccessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceAccessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ResourceAccessSpec"; + }; + + return ResourceAccessSpec; + })(); + + v1.DataAccessSpec = (function() { + + /** + * Properties of a DataAccessSpec. + * @memberof google.cloud.dataplex.v1 + * @interface IDataAccessSpec + * @property {Array.|null} [readers] DataAccessSpec readers + */ + + /** + * Constructs a new DataAccessSpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataAccessSpec. + * @implements IDataAccessSpec + * @constructor + * @param {google.cloud.dataplex.v1.IDataAccessSpec=} [properties] Properties to set + */ + function DataAccessSpec(properties) { + this.readers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataAccessSpec readers. + * @member {Array.} readers + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @instance + */ + DataAccessSpec.prototype.readers = $util.emptyArray; + + /** + * Creates a new DataAccessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IDataAccessSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec instance + */ + DataAccessSpec.create = function create(properties) { + return new DataAccessSpec(properties); + }; + + /** + * Encodes the specified DataAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IDataAccessSpec} message DataAccessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAccessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readers != null && message.readers.length) + for (var i = 0; i < message.readers.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.readers[i]); + return writer; + }; + + /** + * Encodes the specified DataAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {google.cloud.dataplex.v1.IDataAccessSpec} message DataAccessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataAccessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataAccessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAccessSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAccessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.readers && message.readers.length)) + message.readers = []; + message.readers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataAccessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataAccessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataAccessSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataAccessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readers != null && message.hasOwnProperty("readers")) { + if (!Array.isArray(message.readers)) + return "readers: array expected"; + for (var i = 0; i < message.readers.length; ++i) + if (!$util.isString(message.readers[i])) + return "readers: string[] expected"; + } + return null; + }; + + /** + * Creates a DataAccessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec + */ + DataAccessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataAccessSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataAccessSpec(); + if (object.readers) { + if (!Array.isArray(object.readers)) + throw TypeError(".google.cloud.dataplex.v1.DataAccessSpec.readers: array expected"); + message.readers = []; + for (var i = 0; i < object.readers.length; ++i) + message.readers[i] = String(object.readers[i]); + } + return message; + }; + + /** + * Creates a plain object from a DataAccessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {google.cloud.dataplex.v1.DataAccessSpec} message DataAccessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataAccessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.readers = []; + if (message.readers && message.readers.length) { + object.readers = []; + for (var j = 0; j < message.readers.length; ++j) + object.readers[j] = message.readers[j]; + } + return object; + }; + + /** + * Converts this DataAccessSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @instance + * @returns {Object.} JSON object + */ + DataAccessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataAccessSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataAccessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataAccessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAccessSpec"; + }; + + return DataAccessSpec; + })(); + + v1.DataScanService = (function() { + + /** + * Constructs a new DataScanService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScanService + * @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 DataScanService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataScanService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataScanService; + + /** + * Creates new DataScanService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanService + * @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 {DataScanService} RPC service. Useful where requests and/or responses are streamed. + */ + DataScanService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef CreateDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataScan. + * @function createDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.createDataScan = function createDataScan(request, callback) { + return this.rpcCall(createDataScan, $root.google.cloud.dataplex.v1.CreateDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataScan" }); + + /** + * Calls CreateDataScan. + * @function createDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef UpdateDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataScan. + * @function updateDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.updateDataScan = function updateDataScan(request, callback) { + return this.rpcCall(updateDataScan, $root.google.cloud.dataplex.v1.UpdateDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataScan" }); + + /** + * Calls UpdateDataScan. + * @function updateDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef DeleteDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataScan. + * @function deleteDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.deleteDataScan = function deleteDataScan(request, callback) { + return this.rpcCall(deleteDataScan, $root.google.cloud.dataplex.v1.DeleteDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataScan" }); + + /** + * Calls DeleteDataScan. + * @function deleteDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef GetDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataScan} [response] DataScan + */ + + /** + * Calls GetDataScan. + * @function getDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanCallback} callback Node-style callback called with the error, if any, and DataScan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.getDataScan = function getDataScan(request, callback) { + return this.rpcCall(getDataScan, $root.google.cloud.dataplex.v1.GetDataScanRequest, $root.google.cloud.dataplex.v1.DataScan, request, callback); + }, "name", { value: "GetDataScan" }); + + /** + * Calls GetDataScan. + * @function getDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef ListDataScansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataScansResponse} [response] ListDataScansResponse + */ + + /** + * Calls ListDataScans. + * @function listDataScans + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.ListDataScansCallback} callback Node-style callback called with the error, if any, and ListDataScansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.listDataScans = function listDataScans(request, callback) { + return this.rpcCall(listDataScans, $root.google.cloud.dataplex.v1.ListDataScansRequest, $root.google.cloud.dataplex.v1.ListDataScansResponse, request, callback); + }, "name", { value: "ListDataScans" }); + + /** + * Calls ListDataScans. + * @function listDataScans + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef RunDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.RunDataScanResponse} [response] RunDataScanResponse + */ + + /** + * Calls RunDataScan. + * @function runDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.RunDataScanCallback} callback Node-style callback called with the error, if any, and RunDataScanResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.runDataScan = function runDataScan(request, callback) { + return this.rpcCall(runDataScan, $root.google.cloud.dataplex.v1.RunDataScanRequest, $root.google.cloud.dataplex.v1.RunDataScanResponse, request, callback); + }, "name", { value: "RunDataScan" }); + + /** + * Calls RunDataScan. + * @function runDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef GetDataScanJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataScanJob} [response] DataScanJob + */ + + /** + * Calls GetDataScanJob. + * @function getDataScanJob + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback} callback Node-style callback called with the error, if any, and DataScanJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.getDataScanJob = function getDataScanJob(request, callback) { + return this.rpcCall(getDataScanJob, $root.google.cloud.dataplex.v1.GetDataScanJobRequest, $root.google.cloud.dataplex.v1.DataScanJob, request, callback); + }, "name", { value: "GetDataScanJob" }); + + /** + * Calls GetDataScanJob. + * @function getDataScanJob + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef ListDataScanJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} [response] ListDataScanJobsResponse + */ + + /** + * Calls ListDataScanJobs. + * @function listDataScanJobs + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback} callback Node-style callback called with the error, if any, and ListDataScanJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.listDataScanJobs = function listDataScanJobs(request, callback) { + return this.rpcCall(listDataScanJobs, $root.google.cloud.dataplex.v1.ListDataScanJobsRequest, $root.google.cloud.dataplex.v1.ListDataScanJobsResponse, request, callback); + }, "name", { value: "ListDataScanJobs" }); + + /** + * Calls ListDataScanJobs. + * @function listDataScanJobs + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|generateDataQualityRules}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef GenerateDataQualityRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} [response] GenerateDataQualityRulesResponse + */ + + /** + * Calls GenerateDataQualityRules. + * @function generateDataQualityRules + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} request GenerateDataQualityRulesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRulesCallback} callback Node-style callback called with the error, if any, and GenerateDataQualityRulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.generateDataQualityRules = function generateDataQualityRules(request, callback) { + return this.rpcCall(generateDataQualityRules, $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest, $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse, request, callback); + }, "name", { value: "GenerateDataQualityRules" }); + + /** + * Calls GenerateDataQualityRules. + * @function generateDataQualityRules + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} request GenerateDataQualityRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataScanService; + })(); + + v1.CreateDataScanRequest = (function() { + + /** + * Properties of a CreateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateDataScanRequest + * @property {string|null} [parent] CreateDataScanRequest parent + * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] CreateDataScanRequest dataScan + * @property {string|null} [dataScanId] CreateDataScanRequest dataScanId + * @property {boolean|null} [validateOnly] CreateDataScanRequest validateOnly + */ + + /** + * Constructs a new CreateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateDataScanRequest. + * @implements ICreateDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set + */ + function CreateDataScanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataScanRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.parent = ""; + + /** + * CreateDataScanRequest dataScan. + * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.dataScan = null; + + /** + * CreateDataScanRequest dataScanId. + * @member {string} dataScanId + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.dataScanId = ""; + + /** + * CreateDataScanRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest instance + */ + CreateDataScanRequest.create = function create(properties) { + return new CreateDataScanRequest(properties); + }; + + /** + * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataScanRequest.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.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataScanId != null && Object.hasOwnProperty.call(message, "dataScanId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataScanId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataScanId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataScanRequest.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.dataScan != null && message.hasOwnProperty("dataScan")) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); + if (error) + return "dataScan." + error; + } + if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) + if (!$util.isString(message.dataScanId)) + return "dataScanId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + */ + CreateDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataScan != null) { + if (typeof object.dataScan !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateDataScanRequest.dataScan: object expected"); + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); + } + if (object.dataScanId != null) + message.dataScanId = String(object.dataScanId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.CreateDataScanRequest} message CreateDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataScan = null; + object.dataScanId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataScan != null && message.hasOwnProperty("dataScan")) + object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); + if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) + object.dataScanId = message.dataScanId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataScanRequest"; + }; + + return CreateDataScanRequest; + })(); + + v1.UpdateDataScanRequest = (function() { + + /** + * Properties of an UpdateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateDataScanRequest + * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] UpdateDataScanRequest dataScan + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataScanRequest updateMask + * @property {boolean|null} [validateOnly] UpdateDataScanRequest validateOnly + */ + + /** + * Constructs a new UpdateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateDataScanRequest. + * @implements IUpdateDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set + */ + function UpdateDataScanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataScanRequest dataScan. + * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.dataScan = null; + + /** + * UpdateDataScanRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.updateMask = null; + + /** + * UpdateDataScanRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest instance + */ + UpdateDataScanRequest.create = function create(properties) { + return new UpdateDataScanRequest(properties); + }; + + /** + * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, 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(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataScanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScan != null && message.hasOwnProperty("dataScan")) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); + if (error) + return "dataScan." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + */ + UpdateDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); + if (object.dataScan != null) { + if (typeof object.dataScan !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.dataScan: object expected"); + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateDataScanRequest} message UpdateDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataScan = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.dataScan != null && message.hasOwnProperty("dataScan")) + object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataScanRequest"; + }; + + return UpdateDataScanRequest; + })(); + + v1.DeleteDataScanRequest = (function() { + + /** + * Properties of a DeleteDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteDataScanRequest + * @property {string|null} [name] DeleteDataScanRequest name + */ + + /** + * Constructs a new DeleteDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteDataScanRequest. + * @implements IDeleteDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set + */ + function DeleteDataScanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @instance + */ + DeleteDataScanRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest instance + */ + DeleteDataScanRequest.create = function create(properties) { + return new DeleteDataScanRequest(properties); + }; + + /** + * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataScanRequest.encode = function encode(message, writer) { + 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 DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); + 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 DeleteDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataScanRequest.verify = function verify(message) { + if (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 DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + */ + DeleteDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteDataScanRequest} message DeleteDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataScanRequest.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 DeleteDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataScanRequest"; + }; + + return DeleteDataScanRequest; + })(); + + v1.GetDataScanRequest = (function() { + + /** + * Properties of a GetDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataScanRequest + * @property {string|null} [name] GetDataScanRequest name + * @property {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null} [view] GetDataScanRequest view + */ + + /** + * Constructs a new GetDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataScanRequest. + * @implements IGetDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set + */ + function GetDataScanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + */ + GetDataScanRequest.prototype.name = ""; + + /** + * GetDataScanRequest view. + * @member {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} view + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + */ + GetDataScanRequest.prototype.view = 0; + + /** + * Creates a new GetDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest instance + */ + GetDataScanRequest.create = function create(properties) { + return new GetDataScanRequest(properties); + }; + + /** + * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataScanRequest.verify = function verify(message) { + if (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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 10: + break; + } + return null; + }; + + /** + * Creates a GetDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + */ + GetDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "DATA_SCAN_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 10: + message.view = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataScanRequest} message GetDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "DATA_SCAN_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanRequest"; + }; + + /** + * DataScanView enum. + * @name google.cloud.dataplex.v1.GetDataScanRequest.DataScanView + * @enum {number} + * @property {number} DATA_SCAN_VIEW_UNSPECIFIED=0 DATA_SCAN_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=10 FULL value + */ + GetDataScanRequest.DataScanView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[10] = "FULL"] = 10; + return values; + })(); + + return GetDataScanRequest; + })(); + + v1.ListDataScansRequest = (function() { + + /** + * Properties of a ListDataScansRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScansRequest + * @property {string|null} [parent] ListDataScansRequest parent + * @property {number|null} [pageSize] ListDataScansRequest pageSize + * @property {string|null} [pageToken] ListDataScansRequest pageToken + * @property {string|null} [filter] ListDataScansRequest filter + * @property {string|null} [orderBy] ListDataScansRequest orderBy + */ + + /** + * Constructs a new ListDataScansRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScansRequest. + * @implements IListDataScansRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set + */ + function ListDataScansRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataScansRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.parent = ""; + + /** + * ListDataScansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.pageSize = 0; + + /** + * ListDataScansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.pageToken = ""; + + /** + * ListDataScansRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.filter = ""; + + /** + * ListDataScansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataScansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest instance + */ + ListDataScansRequest.create = function create(properties) { + return new ListDataScansRequest(properties); + }; + + /** + * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScansRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScansRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataScansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + */ + ListDataScansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataScansRequest} message ListDataScansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScansRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataScansRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataScansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScansRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansRequest"; + }; + + return ListDataScansRequest; + })(); + + v1.ListDataScansResponse = (function() { + + /** + * Properties of a ListDataScansResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScansResponse + * @property {Array.|null} [dataScans] ListDataScansResponse dataScans + * @property {string|null} [nextPageToken] ListDataScansResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataScansResponse unreachable + */ + + /** + * Constructs a new ListDataScansResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScansResponse. + * @implements IListDataScansResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set + */ + function ListDataScansResponse(properties) { + this.dataScans = []; + 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]]; + } + + /** + * ListDataScansResponse dataScans. + * @member {Array.} dataScans + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.dataScans = $util.emptyArray; + + /** + * ListDataScansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.nextPageToken = ""; + + /** + * ListDataScansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataScansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse instance + */ + ListDataScansResponse.create = function create(properties) { + return new ListDataScansResponse(properties); + }; + + /** + * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScans != null && message.dataScans.length) + for (var i = 0; i < message.dataScans.length; ++i) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScans[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataScans && message.dataScans.length)) + message.dataScans = []; + message.dataScans.push($root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScansResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScans != null && message.hasOwnProperty("dataScans")) { + if (!Array.isArray(message.dataScans)) + return "dataScans: array expected"; + for (var i = 0; i < message.dataScans.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScans[i]); + if (error) + return "dataScans." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListDataScansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + */ + ListDataScansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); + if (object.dataScans) { + if (!Array.isArray(object.dataScans)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: array expected"); + message.dataScans = []; + for (var i = 0; i < object.dataScans.length; ++i) { + if (typeof object.dataScans[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: object expected"); + message.dataScans[i] = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.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 ListDataScansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataScansResponse} message ListDataScansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataScans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataScans && message.dataScans.length) { + object.dataScans = []; + for (var j = 0; j < message.dataScans.length; ++j) + object.dataScans[j] = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScans[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListDataScansResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataScansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScansResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansResponse"; + }; + + return ListDataScansResponse; + })(); + + v1.RunDataScanRequest = (function() { + + /** + * Properties of a RunDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IRunDataScanRequest + * @property {string|null} [name] RunDataScanRequest name + */ + + /** + * Constructs a new RunDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunDataScanRequest. + * @implements IRunDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set + */ + function RunDataScanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @instance + */ + RunDataScanRequest.prototype.name = ""; + + /** + * Creates a new RunDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest instance + */ + RunDataScanRequest.create = function create(properties) { + return new RunDataScanRequest(properties); + }; + + /** + * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanRequest.encode = function encode(message, writer) { + 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 RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); + 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 RunDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunDataScanRequest.verify = function verify(message) { + if (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 RunDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + */ + RunDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.RunDataScanRequest} message RunDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunDataScanRequest.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 RunDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + RunDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanRequest"; + }; + + return RunDataScanRequest; + })(); + + v1.RunDataScanResponse = (function() { + + /** + * Properties of a RunDataScanResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IRunDataScanResponse + * @property {google.cloud.dataplex.v1.IDataScanJob|null} [job] RunDataScanResponse job + */ + + /** + * Constructs a new RunDataScanResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunDataScanResponse. + * @implements IRunDataScanResponse + * @constructor + * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set + */ + function RunDataScanResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunDataScanResponse job. + * @member {google.cloud.dataplex.v1.IDataScanJob|null|undefined} job + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @instance + */ + RunDataScanResponse.prototype.job = null; + + /** + * Creates a new RunDataScanResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse instance + */ + RunDataScanResponse.create = function create(properties) { + return new RunDataScanResponse(properties); + }; + + /** + * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.dataplex.v1.DataScanJob.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.job = $root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunDataScanResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunDataScanResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; + + /** + * Creates a RunDataScanResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + */ + RunDataScanResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunDataScanResponse.job: object expected"); + message.job = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.job); + } + return message; + }; + + /** + * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.RunDataScanResponse} message RunDataScanResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunDataScanResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.job = null; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.job, options); + return object; + }; + + /** + * Converts this RunDataScanResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @instance + * @returns {Object.} JSON object + */ + RunDataScanResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunDataScanResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunDataScanResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanResponse"; + }; + + return RunDataScanResponse; + })(); + + v1.GetDataScanJobRequest = (function() { + + /** + * Properties of a GetDataScanJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataScanJobRequest + * @property {string|null} [name] GetDataScanJobRequest name + * @property {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null} [view] GetDataScanJobRequest view + */ + + /** + * Constructs a new GetDataScanJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataScanJobRequest. + * @implements IGetDataScanJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set + */ + function GetDataScanJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataScanJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + */ + GetDataScanJobRequest.prototype.name = ""; + + /** + * GetDataScanJobRequest view. + * @member {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} view + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + */ + GetDataScanJobRequest.prototype.view = 0; + + /** + * Creates a new GetDataScanJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest instance + */ + GetDataScanJobRequest.create = function create(properties) { + return new GetDataScanJobRequest(properties); + }; + + /** + * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataScanJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataScanJobRequest.verify = function verify(message) { + if (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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 10: + break; + } + return null; + }; + + /** + * Creates a GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + */ + GetDataScanJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "DATA_SCAN_JOB_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 10: + message.view = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataScanJobRequest} message GetDataScanJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataScanJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "DATA_SCAN_JOB_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetDataScanJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataScanJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataScanJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataScanJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanJobRequest"; + }; + + /** + * DataScanJobView enum. + * @name google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView + * @enum {number} + * @property {number} DATA_SCAN_JOB_VIEW_UNSPECIFIED=0 DATA_SCAN_JOB_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=10 FULL value + */ + GetDataScanJobRequest.DataScanJobView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_JOB_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[10] = "FULL"] = 10; + return values; + })(); + + return GetDataScanJobRequest; + })(); + + v1.ListDataScanJobsRequest = (function() { + + /** + * Properties of a ListDataScanJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScanJobsRequest + * @property {string|null} [parent] ListDataScanJobsRequest parent + * @property {number|null} [pageSize] ListDataScanJobsRequest pageSize + * @property {string|null} [pageToken] ListDataScanJobsRequest pageToken + * @property {string|null} [filter] ListDataScanJobsRequest filter + */ + + /** + * Constructs a new ListDataScanJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScanJobsRequest. + * @implements IListDataScanJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set + */ + function ListDataScanJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataScanJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.parent = ""; + + /** + * ListDataScanJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.pageSize = 0; + + /** + * ListDataScanJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.pageToken = ""; + + /** + * ListDataScanJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.filter = ""; + + /** + * Creates a new ListDataScanJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest instance + */ + ListDataScanJobsRequest.create = function create(properties) { + return new ListDataScanJobsRequest(properties); + }; + + /** + * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsRequest.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 ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); + 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 ListDataScanJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScanJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScanJobsRequest.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 ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + */ + ListDataScanJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); + 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 ListDataScanJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataScanJobsRequest} message ListDataScanJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScanJobsRequest.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 ListDataScanJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataScanJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScanJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScanJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsRequest"; + }; + + return ListDataScanJobsRequest; + })(); + + v1.ListDataScanJobsResponse = (function() { + + /** + * Properties of a ListDataScanJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScanJobsResponse + * @property {Array.|null} [dataScanJobs] ListDataScanJobsResponse dataScanJobs + * @property {string|null} [nextPageToken] ListDataScanJobsResponse nextPageToken + */ + + /** + * Constructs a new ListDataScanJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScanJobsResponse. + * @implements IListDataScanJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set + */ + function ListDataScanJobsResponse(properties) { + this.dataScanJobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataScanJobsResponse dataScanJobs. + * @member {Array.} dataScanJobs + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + */ + ListDataScanJobsResponse.prototype.dataScanJobs = $util.emptyArray; + + /** + * ListDataScanJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + */ + ListDataScanJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataScanJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse instance + */ + ListDataScanJobsResponse.create = function create(properties) { + return new ListDataScanJobsResponse(properties); + }; + + /** + * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScanJobs != null && message.dataScanJobs.length) + for (var i = 0; i < message.dataScanJobs.length; ++i) + $root.google.cloud.dataplex.v1.DataScanJob.encode(message.dataScanJobs[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 ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataScanJobs && message.dataScanJobs.length)) + message.dataScanJobs = []; + message.dataScanJobs.push($root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScanJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScanJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScanJobs != null && message.hasOwnProperty("dataScanJobs")) { + if (!Array.isArray(message.dataScanJobs)) + return "dataScanJobs: array expected"; + for (var i = 0; i < message.dataScanJobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.dataScanJobs[i]); + if (error) + return "dataScanJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + */ + ListDataScanJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); + if (object.dataScanJobs) { + if (!Array.isArray(object.dataScanJobs)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: array expected"); + message.dataScanJobs = []; + for (var i = 0; i < object.dataScanJobs.length; ++i) { + if (typeof object.dataScanJobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: object expected"); + message.dataScanJobs[i] = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.dataScanJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} message ListDataScanJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScanJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataScanJobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataScanJobs && message.dataScanJobs.length) { + object.dataScanJobs = []; + for (var j = 0; j < message.dataScanJobs.length; ++j) + object.dataScanJobs[j] = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.dataScanJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataScanJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataScanJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScanJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScanJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsResponse"; + }; + + return ListDataScanJobsResponse; + })(); + + v1.GenerateDataQualityRulesRequest = (function() { + + /** + * Properties of a GenerateDataQualityRulesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGenerateDataQualityRulesRequest + * @property {string|null} [name] GenerateDataQualityRulesRequest name + */ + + /** + * Constructs a new GenerateDataQualityRulesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GenerateDataQualityRulesRequest. + * @implements IGenerateDataQualityRulesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest=} [properties] Properties to set + */ + function GenerateDataQualityRulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateDataQualityRulesRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @instance + */ + GenerateDataQualityRulesRequest.prototype.name = ""; + + /** + * Creates a new GenerateDataQualityRulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest instance + */ + GenerateDataQualityRulesRequest.create = function create(properties) { + return new GenerateDataQualityRulesRequest(properties); + }; + + /** + * Encodes the specified GenerateDataQualityRulesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateDataQualityRulesRequest.encode = function encode(message, writer) { + 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 GenerateDataQualityRulesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateDataQualityRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateDataQualityRulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest(); + 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 GenerateDataQualityRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateDataQualityRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateDataQualityRulesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateDataQualityRulesRequest.verify = function verify(message) { + if (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 GenerateDataQualityRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest + */ + GenerateDataQualityRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GenerateDataQualityRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateDataQualityRulesRequest.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 GenerateDataQualityRulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateDataQualityRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateDataQualityRulesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateDataQualityRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"; + }; + + return GenerateDataQualityRulesRequest; + })(); + + v1.GenerateDataQualityRulesResponse = (function() { + + /** + * Properties of a GenerateDataQualityRulesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IGenerateDataQualityRulesResponse + * @property {Array.|null} [rule] GenerateDataQualityRulesResponse rule + */ + + /** + * Constructs a new GenerateDataQualityRulesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GenerateDataQualityRulesResponse. + * @implements IGenerateDataQualityRulesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse=} [properties] Properties to set + */ + function GenerateDataQualityRulesResponse(properties) { + this.rule = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateDataQualityRulesResponse rule. + * @member {Array.} rule + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @instance + */ + GenerateDataQualityRulesResponse.prototype.rule = $util.emptyArray; + + /** + * Creates a new GenerateDataQualityRulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse instance + */ + GenerateDataQualityRulesResponse.create = function create(properties) { + return new GenerateDataQualityRulesResponse(properties); + }; + + /** + * Encodes the specified GenerateDataQualityRulesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateDataQualityRulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rule != null && message.rule.length) + for (var i = 0; i < message.rule.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rule[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateDataQualityRulesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateDataQualityRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateDataQualityRulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rule && message.rule.length)) + message.rule = []; + message.rule.push($root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateDataQualityRulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateDataQualityRulesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateDataQualityRulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rule != null && message.hasOwnProperty("rule")) { + if (!Array.isArray(message.rule)) + return "rule: array expected"; + for (var i = 0; i < message.rule.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rule[i]); + if (error) + return "rule." + error; + } + } + return null; + }; + + /** + * Creates a GenerateDataQualityRulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse + */ + GenerateDataQualityRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse(); + if (object.rule) { + if (!Array.isArray(object.rule)) + throw TypeError(".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.rule: array expected"); + message.rule = []; + for (var i = 0; i < object.rule.length; ++i) { + if (typeof object.rule[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.rule: object expected"); + message.rule[i] = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rule[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenerateDataQualityRulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateDataQualityRulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rule = []; + if (message.rule && message.rule.length) { + object.rule = []; + for (var j = 0; j < message.rule.length; ++j) + object.rule[j] = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rule[j], options); + } + return object; + }; + + /** + * Converts this GenerateDataQualityRulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateDataQualityRulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateDataQualityRulesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateDataQualityRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"; + }; + + return GenerateDataQualityRulesResponse; + })(); + + v1.DataScan = (function() { + + /** + * Properties of a DataScan. + * @memberof google.cloud.dataplex.v1 + * @interface IDataScan + * @property {string|null} [name] DataScan name + * @property {string|null} [uid] DataScan uid + * @property {string|null} [description] DataScan description + * @property {string|null} [displayName] DataScan displayName + * @property {Object.|null} [labels] DataScan labels + * @property {google.cloud.dataplex.v1.State|null} [state] DataScan state + * @property {google.protobuf.ITimestamp|null} [createTime] DataScan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataScan updateTime + * @property {google.cloud.dataplex.v1.IDataSource|null} [data] DataScan data + * @property {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null} [executionSpec] DataScan executionSpec + * @property {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null} [executionStatus] DataScan executionStatus + * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScan type + * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScan dataQualitySpec + * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScan dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScan dataDiscoverySpec + * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScan dataQualityResult + * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScan dataProfileResult + * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScan dataDiscoveryResult + */ + + /** + * Constructs a new DataScan. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScan. + * @implements IDataScan + * @constructor + * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set + */ + function DataScan(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]]; + } + + /** + * DataScan name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.name = ""; + + /** + * DataScan uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.uid = ""; + + /** + * DataScan description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.description = ""; + + /** + * DataScan displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.displayName = ""; + + /** + * DataScan labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.labels = $util.emptyObject; + + /** + * DataScan state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.state = 0; + + /** + * DataScan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.createTime = null; + + /** + * DataScan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.updateTime = null; + + /** + * DataScan data. + * @member {google.cloud.dataplex.v1.IDataSource|null|undefined} data + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.data = null; + + /** + * DataScan executionSpec. + * @member {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.executionSpec = null; + + /** + * DataScan executionStatus. + * @member {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.executionStatus = null; + + /** + * DataScan type. + * @member {google.cloud.dataplex.v1.DataScanType} type + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.type = 0; + + /** + * DataScan dataQualitySpec. + * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataQualitySpec = null; + + /** + * DataScan dataProfileSpec. + * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataProfileSpec = null; + + /** + * DataScan dataDiscoverySpec. + * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataDiscoverySpec = null; + + /** + * DataScan dataQualityResult. + * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataQualityResult = null; + + /** + * DataScan dataProfileResult. + * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataProfileResult = null; + + /** + * DataScan dataDiscoveryResult. + * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataDiscoveryResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScan spec. + * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + Object.defineProperty(DataScan.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataScan result. + * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + Object.defineProperty(DataScan.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScan instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan} DataScan instance + */ + DataScan.create = function create(properties) { + return new DataScan(properties); + }; + + /** + * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.cloud.dataplex.v1.DataSource.encode(message.data, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.type); + if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) + $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) + $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataScan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.data = $root.google.cloud.dataplex.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 10: { + message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 11: { + message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.decode(reader, reader.uint32()); + break; + } + case 12: { + message.type = reader.int32(); + break; + } + case 100: { + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); + break; + } + case 102: { + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); + break; + } + case 201: { + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); + break; + } + case 202: { + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataScan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataScan message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataScan.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.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.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.data != null && message.hasOwnProperty("data")) { + var error = $root.google.cloud.dataplex.v1.DataSource.verify(message.data); + if (error) + return "data." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); + if (error) + return "dataQualitySpec." + error; + } + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); + if (error) + return "dataProfileSpec." + error; + } + } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); + if (error) + return "dataDiscoverySpec." + error; + } + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); + if (error) + return "dataQualityResult." + error; + } + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); + if (error) + return "dataProfileResult." + error; + } + } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); + if (error) + return "dataDiscoveryResult." + error; + } + } + return null; + }; + + /** + * Creates a DataScan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + */ + DataScan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.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.dataplex.v1.DataScan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.data: object expected"); + message.data = $root.google.cloud.dataplex.v1.DataSource.fromObject(object.data); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.fromObject(object.executionStatus); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_QUALITY": + case 1: + message.type = 1; + break; + case "DATA_PROFILE": + case 2: + message.type = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.type = 3; + break; + } + if (object.dataQualitySpec != null) { + if (typeof object.dataQualitySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualitySpec: object expected"); + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); + } + if (object.dataProfileSpec != null) { + if (typeof object.dataProfileSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileSpec: object expected"); + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); + } + if (object.dataDiscoverySpec != null) { + if (typeof object.dataDiscoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoverySpec: object expected"); + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); + } + if (object.dataQualityResult != null) { + if (typeof object.dataQualityResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualityResult: object expected"); + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); + } + if (object.dataProfileResult != null) { + if (typeof object.dataProfileResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileResult: object expected"); + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); + } + if (object.dataDiscoveryResult != null) { + if (typeof object.dataDiscoveryResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoveryResult: object expected"); + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); + } + return message; + }; + + /** + * Creates a plain object from a DataScan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.DataScan} message DataScan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataScan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.data = null; + object.executionSpec = null; + object.executionStatus = null; + object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.google.cloud.dataplex.v1.DataSource.toObject(message.data, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.toObject(message.executionStatus, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); + if (options.oneofs) + object.spec = "dataQualitySpec"; + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); + if (options.oneofs) + object.spec = "dataProfileSpec"; + } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); + if (options.oneofs) + object.spec = "dataDiscoverySpec"; + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); + if (options.oneofs) + object.result = "dataQualityResult"; + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); + if (options.oneofs) + object.result = "dataProfileResult"; + } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); + if (options.oneofs) + object.result = "dataDiscoveryResult"; + } + return object; + }; + + /** + * Converts this DataScan to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + * @returns {Object.} JSON object + */ + DataScan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataScan + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataScan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan"; + }; + + DataScan.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.DataScan + * @interface IExecutionSpec + * @property {google.cloud.dataplex.v1.ITrigger|null} [trigger] ExecutionSpec trigger + * @property {string|null} [field] ExecutionSpec field + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.DataScan + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionSpec trigger. + * @member {google.cloud.dataplex.v1.ITrigger|null|undefined} trigger + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.trigger = null; + + /** + * ExecutionSpec field. + * @member {string|null|undefined} field + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.field = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionSpec incremental. + * @member {"field"|undefined} incremental + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + Object.defineProperty(ExecutionSpec.prototype, "incremental", { + get: $util.oneOfGetter($oneOfFields = ["field"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.cloud.dataplex.v1.Trigger.encode(message.trigger, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.field); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trigger = $root.google.cloud.dataplex.v1.Trigger.decode(reader, reader.uint32()); + break; + } + case 100: { + message.field = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.cloud.dataplex.v1.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + if (message.field != null && message.hasOwnProperty("field")) { + properties.incremental = 1; + if (!$util.isString(message.field)) + return "field: string expected"; + } + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionSpec.trigger: object expected"); + message.trigger = $root.google.cloud.dataplex.v1.Trigger.fromObject(object.trigger); + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.trigger = null; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.cloud.dataplex.v1.Trigger.toObject(message.trigger, options); + if (message.field != null && message.hasOwnProperty("field")) { + object.field = message.field; + if (options.oneofs) + object.incremental = "field"; + } + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionSpec"; + }; + + return ExecutionSpec; + })(); + + DataScan.ExecutionStatus = (function() { + + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.DataScan + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [latestJobStartTime] ExecutionStatus latestJobStartTime + * @property {google.protobuf.ITimestamp|null} [latestJobEndTime] ExecutionStatus latestJobEndTime + * @property {google.protobuf.ITimestamp|null} [latestJobCreateTime] ExecutionStatus latestJobCreateTime + */ + + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.DataScan + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionStatus latestJobStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobStartTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobStartTime = null; + + /** + * ExecutionStatus latestJobEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobEndTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobEndTime = null; + + /** + * ExecutionStatus latestJobCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobCreateTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobCreateTime = null; + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latestJobStartTime != null && Object.hasOwnProperty.call(message, "latestJobStartTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.latestJobEndTime != null && Object.hasOwnProperty.call(message, "latestJobEndTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobEndTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.latestJobCreateTime != null && Object.hasOwnProperty.call(message, "latestJobCreateTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.latestJobStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.latestJobEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.latestJobCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobStartTime); + if (error) + return "latestJobStartTime." + error; + } + if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobEndTime); + if (error) + return "latestJobEndTime." + error; + } + if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobCreateTime); + if (error) + return "latestJobCreateTime." + error; + } + return null; + }; + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); + if (object.latestJobStartTime != null) { + if (typeof object.latestJobStartTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobStartTime: object expected"); + message.latestJobStartTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobStartTime); + } + if (object.latestJobEndTime != null) { + if (typeof object.latestJobEndTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobEndTime: object expected"); + message.latestJobEndTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobEndTime); + } + if (object.latestJobCreateTime != null) { + if (typeof object.latestJobCreateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobCreateTime: object expected"); + message.latestJobCreateTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobCreateTime); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.latestJobStartTime = null; + object.latestJobEndTime = null; + object.latestJobCreateTime = null; + } + if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) + object.latestJobStartTime = $root.google.protobuf.Timestamp.toObject(message.latestJobStartTime, options); + if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) + object.latestJobEndTime = $root.google.protobuf.Timestamp.toObject(message.latestJobEndTime, options); + if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) + object.latestJobCreateTime = $root.google.protobuf.Timestamp.toObject(message.latestJobCreateTime, options); + return object; + }; + + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionStatus"; + }; + + return ExecutionStatus; + })(); + + return DataScan; + })(); + + v1.DataScanJob = (function() { + + /** + * Properties of a DataScanJob. + * @memberof google.cloud.dataplex.v1 + * @interface IDataScanJob + * @property {string|null} [name] DataScanJob name + * @property {string|null} [uid] DataScanJob uid + * @property {google.protobuf.ITimestamp|null} [createTime] DataScanJob createTime + * @property {google.protobuf.ITimestamp|null} [startTime] DataScanJob startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DataScanJob endTime + * @property {google.cloud.dataplex.v1.DataScanJob.State|null} [state] DataScanJob state + * @property {string|null} [message] DataScanJob message + * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScanJob type + * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScanJob dataQualitySpec + * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScanJob dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScanJob dataDiscoverySpec + * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScanJob dataQualityResult + * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScanJob dataProfileResult + * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScanJob dataDiscoveryResult + */ + + /** + * Constructs a new DataScanJob. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScanJob. + * @implements IDataScanJob + * @constructor + * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set + */ + function DataScanJob(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataScanJob name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.name = ""; + + /** + * DataScanJob uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.uid = ""; + + /** + * DataScanJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.createTime = null; + + /** + * DataScanJob startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.startTime = null; + + /** + * DataScanJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.endTime = null; + + /** + * DataScanJob state. + * @member {google.cloud.dataplex.v1.DataScanJob.State} state + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.state = 0; + + /** + * DataScanJob message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.message = ""; + + /** + * DataScanJob type. + * @member {google.cloud.dataplex.v1.DataScanType} type + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.type = 0; + + /** + * DataScanJob dataQualitySpec. + * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataQualitySpec = null; + + /** + * DataScanJob dataProfileSpec. + * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataProfileSpec = null; + + /** + * DataScanJob dataDiscoverySpec. + * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataDiscoverySpec = null; + + /** + * DataScanJob dataQualityResult. + * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataQualityResult = null; + + /** + * DataScanJob dataProfileResult. + * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataProfileResult = null; + + /** + * DataScanJob dataDiscoveryResult. + * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataDiscoveryResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScanJob spec. + * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + Object.defineProperty(DataScanJob.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataScanJob result. + * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + Object.defineProperty(DataScanJob.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScanJob instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob instance + */ + DataScanJob.create = function create(properties) { + return new DataScanJob(properties); + }; + + /** + * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) + $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) + $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataScanJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.message = reader.string(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 100: { + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); + break; + } + case 102: { + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); + break; + } + case 201: { + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); + break; + } + case 202: { + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataScanJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataScanJob message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataScanJob.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); + if (error) + return "dataQualitySpec." + error; + } + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); + if (error) + return "dataProfileSpec." + error; + } + } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); + if (error) + return "dataDiscoverySpec." + error; + } + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); + if (error) + return "dataQualityResult." + error; + } + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); + if (error) + return "dataProfileResult." + error; + } + } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); + if (error) + return "dataDiscoveryResult." + error; + } + } + return null; + }; + + /** + * Creates a DataScanJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + */ + DataScanJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanJob) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanJob(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "PENDING": + case 7: + message.state = 7; + break; + } + if (object.message != null) + message.message = String(object.message); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_QUALITY": + case 1: + message.type = 1; + break; + case "DATA_PROFILE": + case 2: + message.type = 2; + break; + case "DATA_DISCOVERY": + case 3: + message.type = 3; + break; + } + if (object.dataQualitySpec != null) { + if (typeof object.dataQualitySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualitySpec: object expected"); + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); + } + if (object.dataProfileSpec != null) { + if (typeof object.dataProfileSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileSpec: object expected"); + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); + } + if (object.dataDiscoverySpec != null) { + if (typeof object.dataDiscoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoverySpec: object expected"); + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); + } + if (object.dataQualityResult != null) { + if (typeof object.dataQualityResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualityResult: object expected"); + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); + } + if (object.dataProfileResult != null) { + if (typeof object.dataProfileResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileResult: object expected"); + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); + } + if (object.dataDiscoveryResult != null) { + if (typeof object.dataDiscoveryResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoveryResult: object expected"); + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); + } + return message; + }; + + /** + * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.DataScanJob} message DataScanJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataScanJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); + if (options.oneofs) + object.spec = "dataQualitySpec"; + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); + if (options.oneofs) + object.spec = "dataProfileSpec"; + } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); + if (options.oneofs) + object.spec = "dataDiscoverySpec"; + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); + if (options.oneofs) + object.result = "dataQualityResult"; + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); + if (options.oneofs) + object.result = "dataProfileResult"; + } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); + if (options.oneofs) + object.result = "dataDiscoveryResult"; + } + return object; + }; + + /** + * Converts this DataScanJob to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + * @returns {Object.} JSON object + */ + DataScanJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataScanJob + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataScanJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanJob"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataScanJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELING=2 CANCELING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} PENDING=7 PENDING value + */ + DataScanJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[7] = "PENDING"] = 7; + return values; + })(); + + return DataScanJob; + })(); + + /** + * DataScanType enum. + * @name google.cloud.dataplex.v1.DataScanType + * @enum {number} + * @property {number} DATA_SCAN_TYPE_UNSPECIFIED=0 DATA_SCAN_TYPE_UNSPECIFIED value + * @property {number} DATA_QUALITY=1 DATA_QUALITY value + * @property {number} DATA_PROFILE=2 DATA_PROFILE value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value + */ + v1.DataScanType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_QUALITY"] = 1; + values[valuesById[2] = "DATA_PROFILE"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; + return values; + })(); + + v1.DiscoveryEvent = (function() { + + /** + * Properties of a DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {string|null} [datascanId] DiscoveryEvent datascanId + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + * @property {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null} [table] DiscoveryEvent table + */ + + /** + * Constructs a new DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + */ + function DiscoveryEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.message = ""; + + /** + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; + + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; + + /** + * DiscoveryEvent assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.assetId = ""; + + /** + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.dataLocation = ""; + + /** + * DiscoveryEvent datascanId. + * @member {string} datascanId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.datascanId = ""; + + /** + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.type = 0; + + /** + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; + + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; + + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; + + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; + + /** + * DiscoveryEvent table. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null|undefined} table + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.table = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|"table"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action", "table"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + */ + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); + }; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.datascanId != null && Object.hasOwnProperty.call(message, "datascanId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.datascanId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.encode(message.table, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.lakeId = reader.string(); + break; + } + case 3: { + message.zoneId = reader.string(); + break; + } + case 4: { + message.assetId = reader.string(); + break; + } + case 5: { + message.dataLocation = reader.string(); + break; + } + case 6: { + message.datascanId = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 20: { + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + } + case 21: { + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + } + case 22: { + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + } + case 23: { + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + } + case 24: { + message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.datascanId != null && message.hasOwnProperty("datascanId")) + if (!$util.isString(message.datascanId)) + return "datascanId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } + } + if (message.table != null && message.hasOwnProperty("table")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify(message.table); + if (error) + return "table." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + */ + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + if (object.datascanId != null) + message.datascanId = String(object.datascanId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + case "TABLE_PUBLISHED": + case 10: + message.type = 10; + break; + case "TABLE_UPDATED": + case 11: + message.type = 11; + break; + case "TABLE_IGNORED": + case 12: + message.type = 12; + break; + case "TABLE_DELETED": + case 13: + message.type = 13; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + } + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.table: object expected"); + message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.fromObject(object.table); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; + object.assetId = ""; + object.dataLocation = ""; + object.datascanId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.datascanId != null && message.hasOwnProperty("datascanId")) + object.datascanId = message.datascanId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.toObject(message.table, options); + if (options.oneofs) + object.details = "table"; + } + return object; + }; + + /** + * Converts this DiscoveryEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + * @returns {Object.} JSON object + */ + DiscoveryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + * @property {number} TABLE_PUBLISHED=10 TABLE_PUBLISHED value + * @property {number} TABLE_UPDATED=11 TABLE_UPDATED value + * @property {number} TABLE_IGNORED=12 TABLE_IGNORED value + * @property {number} TABLE_DELETED=13 TABLE_DELETED value + */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + values[valuesById[10] = "TABLE_PUBLISHED"] = 10; + values[valuesById[11] = "TABLE_UPDATED"] = 11; + values[valuesById[12] = "TABLE_IGNORED"] = 12; + values[valuesById[13] = "TABLE_DELETED"] = 13; + return values; + })(); + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + /** + * TableType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.TableType + * @enum {number} + * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value + * @property {number} EXTERNAL_TABLE=1 EXTERNAL_TABLE value + * @property {number} BIGLAKE_TABLE=2 BIGLAKE_TABLE value + * @property {number} OBJECT_TABLE=3 OBJECT_TABLE value + */ + DiscoveryEvent.TableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTERNAL_TABLE"] = 1; + values[valuesById[2] = "BIGLAKE_TABLE"] = 2; + values[valuesById[3] = "OBJECT_TABLE"] = 3; + return values; + })(); + + DiscoveryEvent.ConfigDetails = (function() { + + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ + + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + 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.parameters[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfigDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; + }; + + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; + + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; + + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: 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 an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; + }; + + return EntityDetails; + })(); + + DiscoveryEvent.TableDetails = (function() { + + /** + * Properties of a TableDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface ITableDetails + * @property {string|null} [table] TableDetails table + * @property {google.cloud.dataplex.v1.DiscoveryEvent.TableType|null} [type] TableDetails type + */ + + /** + * Constructs a new TableDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a TableDetails. + * @implements ITableDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set + */ + function TableDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDetails table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + */ + TableDetails.prototype.table = ""; + + /** + * TableDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.TableType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + */ + TableDetails.prototype.type = 0; + + /** + * Creates a new TableDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails instance + */ + TableDetails.create = function create(properties) { + return new TableDetails(properties); + }; + + /** + * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.table = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + */ + TableDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); + if (object.table != null) + message.table = String(object.table); + 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 "EXTERNAL_TABLE": + case 1: + message.type = 1; + break; + case "BIGLAKE_TABLE": + case 2: + message.type = 2; + break; + case "OBJECT_TABLE": + case 3: + message.type = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a TableDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} message TableDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = ""; + object.type = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] : message.type; + return object; + }; + + /** + * Converts this TableDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + * @returns {Object.} JSON object + */ + TableDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"; + }; + + return TableDetails; + })(); + + DiscoveryEvent.PartitionDetails = (function() { + + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations + */ + + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + this.sampledDataLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; + + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; + + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; + + /** + * PartitionDetails sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + return writer; + }; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = reader.string(); + break; + } + case 2: { + message.entity = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: 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; + } + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + return object; + }; + + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartitionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; + }; + + return PartitionDetails; + })(); + + DiscoveryEvent.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + * @property {string|null} [issue] ActionDetails issue + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; + + /** + * ActionDetails issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.issue = ""; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.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.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.issue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.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.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + if (object.issue != null) + message.issue = String(object.issue); + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.issue = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; + }; + + return ActionDetails; + })(); + + return DiscoveryEvent; + })(); + + v1.JobEvent = (function() { + + /** + * Properties of a JobEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob + * @property {google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|null} [executionTrigger] JobEvent executionTrigger + */ + + /** + * Constructs a new JobEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a JobEvent. + * @implements IJobEvent + * @constructor + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + */ + function JobEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.message = ""; + + /** + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.jobId = ""; + + /** + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.startTime = null; + + /** + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.endTime = null; + + /** + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.state = 0; + + /** + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.retries = 0; + + /** + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.type = 0; + + /** + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.service = 0; + + /** + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.serviceJob = ""; + + /** + * JobEvent executionTrigger. + * @member {google.cloud.dataplex.v1.JobEvent.ExecutionTrigger} executionTrigger + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.executionTrigger = 0; + + /** + * Creates a new JobEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + */ + JobEvent.create = function create(properties) { + return new JobEvent(properties); + }; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + if (message.executionTrigger != null && Object.hasOwnProperty.call(message, "executionTrigger")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.executionTrigger); + return writer; + }; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retries = reader.int32(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.service = reader.int32(); + break; + } + case 9: { + message.serviceJob = reader.string(); + break; + } + case 11: { + message.executionTrigger = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.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.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer 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.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.executionTrigger != null && message.hasOwnProperty("executionTrigger")) + switch (message.executionTrigger) { + default: + return "executionTrigger: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + */ + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + 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 "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + switch (object.executionTrigger) { + default: + if (typeof object.executionTrigger === "number") { + message.executionTrigger = object.executionTrigger; + break; + } + break; + case "EXECUTION_TRIGGER_UNSPECIFIED": + case 0: + message.executionTrigger = 0; + break; + case "TASK_CONFIG": + case 1: + message.executionTrigger = 1; + break; + case "RUN_REQUEST": + case 2: + message.executionTrigger = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.executionTrigger = options.enums === String ? "EXECUTION_TRIGGER_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.executionTrigger != null && message.hasOwnProperty("executionTrigger")) + object.executionTrigger = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger[message.executionTrigger] === undefined ? message.executionTrigger : $root.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger[message.executionTrigger] : message.executionTrigger; + return object; + }; + + /** + * Converts this JobEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + * @returns {Object.} JSON object + */ + JobEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * ExecutionTrigger enum. + * @name google.cloud.dataplex.v1.JobEvent.ExecutionTrigger + * @enum {number} + * @property {number} EXECUTION_TRIGGER_UNSPECIFIED=0 EXECUTION_TRIGGER_UNSPECIFIED value + * @property {number} TASK_CONFIG=1 TASK_CONFIG value + * @property {number} RUN_REQUEST=2 RUN_REQUEST value + */ + JobEvent.ExecutionTrigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TASK_CONFIG"] = 1; + values[valuesById[2] = "RUN_REQUEST"] = 2; + return values; + })(); + + return JobEvent; + })(); + + v1.SessionEvent = (function() { + + /** + * Properties of a SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded + * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled + * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration + */ + + /** + * Constructs a new SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent + * @constructor + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + */ + function SessionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.message = ""; + + /** + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.userId = ""; + + /** + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.sessionId = ""; + + /** + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.type = 0; + + /** + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.query = null; + + /** + * SessionEvent eventSucceeded. + * @member {boolean} eventSucceeded + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.eventSucceeded = false; + + /** + * SessionEvent fastStartupEnabled. + * @member {boolean} fastStartupEnabled + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.fastStartupEnabled = false; + + /** + * SessionEvent unassignedDuration. + * @member {google.protobuf.IDuration|null|undefined} unassignedDuration + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.unassignedDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + */ + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); + }; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); + if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); + if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) + $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.userId = reader.string(); + break; + } + case 3: { + message.sessionId = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + case 5: { + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + } + case 6: { + message.eventSucceeded = reader.bool(); + break; + } + case 7: { + message.fastStartupEnabled = reader.bool(); + break; + } + case 8: { + message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + if (typeof message.eventSucceeded !== "boolean") + return "eventSucceeded: boolean expected"; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + if (typeof message.fastStartupEnabled !== "boolean") + return "fastStartupEnabled: boolean expected"; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { + var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); + if (error) + return "unassignedDuration." + error; + } + return null; + }; + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + */ + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + case "CREATE": + case 4: + message.type = 4; + break; + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + if (object.eventSucceeded != null) + message.eventSucceeded = Boolean(object.eventSucceeded); + if (object.fastStartupEnabled != null) + message.fastStartupEnabled = Boolean(object.fastStartupEnabled); + if (object.unassignedDuration != null) { + if (typeof object.unassignedDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); + message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); + } + return message; + }; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.eventSucceeded = false; + object.fastStartupEnabled = false; + object.unassignedDuration = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + object.eventSucceeded = message.eventSucceeded; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + object.fastStartupEnabled = message.fastStartupEnabled; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) + object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); + return object; + }; + + /** + * Converts this SessionEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + * @returns {Object.} JSON object + */ + SessionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + * @property {number} CREATE=4 CREATE value + */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + values[valuesById[4] = "CREATE"] = 4; + return values; + })(); + + SessionEvent.QueryDetail = (function() { + + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ + + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; + + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; + + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; + + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; + + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.queryText = reader.string(); + break; + } + case 3: { + message.engine = reader.int32(); + break; + } + case 4: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resultSizeBytes = reader.int64(); + break; + } + case 6: { + message.dataProcessedBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + return object; + }; + + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDetail + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; + }; + + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return QueryDetail; + })(); + + return SessionEvent; + })(); + + v1.GovernanceEvent = (function() { + + /** + * Properties of a GovernanceEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IGovernanceEvent + * @property {string|null} [message] GovernanceEvent message + * @property {google.cloud.dataplex.v1.GovernanceEvent.EventType|null} [eventType] GovernanceEvent eventType + * @property {google.cloud.dataplex.v1.GovernanceEvent.IEntity|null} [entity] GovernanceEvent entity + */ + + /** + * Constructs a new GovernanceEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GovernanceEvent. + * @implements IGovernanceEvent + * @constructor + * @param {google.cloud.dataplex.v1.IGovernanceEvent=} [properties] Properties to set + */ + function GovernanceEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @instance + */ + GovernanceEvent.prototype.message = ""; + + /** + * GovernanceEvent eventType. + * @member {google.cloud.dataplex.v1.GovernanceEvent.EventType} eventType + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @instance + */ + GovernanceEvent.prototype.eventType = 0; + + /** + * GovernanceEvent entity. + * @member {google.cloud.dataplex.v1.GovernanceEvent.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @instance + */ + GovernanceEvent.prototype.entity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceEvent _entity. + * @member {"entity"|undefined} _entity + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @instance + */ + Object.defineProperty(GovernanceEvent.prototype, "_entity", { + get: $util.oneOfGetter($oneOfFields = ["entity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {google.cloud.dataplex.v1.IGovernanceEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent instance + */ + GovernanceEvent.create = function create(properties) { + return new GovernanceEvent(properties); + }; + + /** + * Encodes the specified GovernanceEvent message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {google.cloud.dataplex.v1.IGovernanceEvent} message GovernanceEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventType); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {google.cloud.dataplex.v1.IGovernanceEvent} message GovernanceEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GovernanceEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.eventType = reader.int32(); + break; + } + case 3: { + message.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.eventType != null && message.hasOwnProperty("eventType")) + switch (message.eventType) { + default: + return "eventType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + properties._entity = 1; + { + var error = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent + */ + GovernanceEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GovernanceEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.GovernanceEvent(); + if (object.message != null) + message.message = String(object.message); + switch (object.eventType) { + default: + if (typeof object.eventType === "number") { + message.eventType = object.eventType; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.eventType = 0; + break; + case "RESOURCE_IAM_POLICY_UPDATE": + case 1: + message.eventType = 1; + break; + case "BIGQUERY_TABLE_CREATE": + case 2: + message.eventType = 2; + break; + case "BIGQUERY_TABLE_UPDATE": + case 3: + message.eventType = 3; + break; + case "BIGQUERY_TABLE_DELETE": + case 4: + message.eventType = 4; + break; + case "BIGQUERY_CONNECTION_CREATE": + case 5: + message.eventType = 5; + break; + case "BIGQUERY_CONNECTION_UPDATE": + case 6: + message.eventType = 6; + break; + case "BIGQUERY_CONNECTION_DELETE": + case 7: + message.eventType = 7; + break; + case "BIGQUERY_TAXONOMY_CREATE": + case 10: + message.eventType = 10; + break; + case "BIGQUERY_POLICY_TAG_CREATE": + case 11: + message.eventType = 11; + break; + case "BIGQUERY_POLICY_TAG_DELETE": + case 12: + message.eventType = 12; + break; + case "BIGQUERY_POLICY_TAG_SET_IAM_POLICY": + case 13: + message.eventType = 13; + break; + case "ACCESS_POLICY_UPDATE": + case 14: + message.eventType = 14; + break; + case "GOVERNANCE_RULE_MATCHED_RESOURCES": + case 15: + message.eventType = 15; + break; + case "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS": + case 16: + message.eventType = 16; + break; + case "GOVERNANCE_RULE_ERRORS": + case 17: + message.eventType = 17; + break; + case "GOVERNANCE_RULE_PROCESSING": + case 18: + message.eventType = 18; + break; + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.GovernanceEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.fromObject(object.entity); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {google.cloud.dataplex.v1.GovernanceEvent} message GovernanceEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.eventType = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.eventType != null && message.hasOwnProperty("eventType")) + object.eventType = options.enums === String ? $root.google.cloud.dataplex.v1.GovernanceEvent.EventType[message.eventType] === undefined ? message.eventType : $root.google.cloud.dataplex.v1.GovernanceEvent.EventType[message.eventType] : message.eventType; + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.toObject(message.entity, options); + if (options.oneofs) + object._entity = "entity"; + } + return object; + }; + + /** + * Converts this GovernanceEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @instance + * @returns {Object.} JSON object + */ + GovernanceEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GovernanceEvent"; + }; + + GovernanceEvent.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @interface IEntity + * @property {string|null} [entity] Entity entity + * @property {google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|null} [entityType] Entity entityType + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.dataplex.v1.GovernanceEvent + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @instance + */ + Entity.prototype.entity = ""; + + /** + * Entity entityType. + * @member {google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType} entityType + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @instance + */ + Entity.prototype.entityType = 0; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.entityType); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GovernanceEvent.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + message.entityType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + switch (message.entityType) { + default: + return "entityType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GovernanceEvent.Entity) + return object; + var message = new $root.google.cloud.dataplex.v1.GovernanceEvent.Entity(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.entityType) { + default: + if (typeof object.entityType === "number") { + message.entityType = object.entityType; + break; + } + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.entityType = 0; + break; + case "TABLE": + case 1: + message.entityType = 1; + break; + case "FILESET": + case 2: + message.entityType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {google.cloud.dataplex.v1.GovernanceEvent.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.entityType = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = options.enums === String ? $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType[message.entityType] === undefined ? message.entityType : $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType[message.entityType] : message.entityType; + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GovernanceEvent.Entity"; + }; + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + return Entity; + })(); + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.GovernanceEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} RESOURCE_IAM_POLICY_UPDATE=1 RESOURCE_IAM_POLICY_UPDATE value + * @property {number} BIGQUERY_TABLE_CREATE=2 BIGQUERY_TABLE_CREATE value + * @property {number} BIGQUERY_TABLE_UPDATE=3 BIGQUERY_TABLE_UPDATE value + * @property {number} BIGQUERY_TABLE_DELETE=4 BIGQUERY_TABLE_DELETE value + * @property {number} BIGQUERY_CONNECTION_CREATE=5 BIGQUERY_CONNECTION_CREATE value + * @property {number} BIGQUERY_CONNECTION_UPDATE=6 BIGQUERY_CONNECTION_UPDATE value + * @property {number} BIGQUERY_CONNECTION_DELETE=7 BIGQUERY_CONNECTION_DELETE value + * @property {number} BIGQUERY_TAXONOMY_CREATE=10 BIGQUERY_TAXONOMY_CREATE value + * @property {number} BIGQUERY_POLICY_TAG_CREATE=11 BIGQUERY_POLICY_TAG_CREATE value + * @property {number} BIGQUERY_POLICY_TAG_DELETE=12 BIGQUERY_POLICY_TAG_DELETE value + * @property {number} BIGQUERY_POLICY_TAG_SET_IAM_POLICY=13 BIGQUERY_POLICY_TAG_SET_IAM_POLICY value + * @property {number} ACCESS_POLICY_UPDATE=14 ACCESS_POLICY_UPDATE value + * @property {number} GOVERNANCE_RULE_MATCHED_RESOURCES=15 GOVERNANCE_RULE_MATCHED_RESOURCES value + * @property {number} GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS=16 GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS value + * @property {number} GOVERNANCE_RULE_ERRORS=17 GOVERNANCE_RULE_ERRORS value + * @property {number} GOVERNANCE_RULE_PROCESSING=18 GOVERNANCE_RULE_PROCESSING value + */ + GovernanceEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RESOURCE_IAM_POLICY_UPDATE"] = 1; + values[valuesById[2] = "BIGQUERY_TABLE_CREATE"] = 2; + values[valuesById[3] = "BIGQUERY_TABLE_UPDATE"] = 3; + values[valuesById[4] = "BIGQUERY_TABLE_DELETE"] = 4; + values[valuesById[5] = "BIGQUERY_CONNECTION_CREATE"] = 5; + values[valuesById[6] = "BIGQUERY_CONNECTION_UPDATE"] = 6; + values[valuesById[7] = "BIGQUERY_CONNECTION_DELETE"] = 7; + values[valuesById[10] = "BIGQUERY_TAXONOMY_CREATE"] = 10; + values[valuesById[11] = "BIGQUERY_POLICY_TAG_CREATE"] = 11; + values[valuesById[12] = "BIGQUERY_POLICY_TAG_DELETE"] = 12; + values[valuesById[13] = "BIGQUERY_POLICY_TAG_SET_IAM_POLICY"] = 13; + values[valuesById[14] = "ACCESS_POLICY_UPDATE"] = 14; + values[valuesById[15] = "GOVERNANCE_RULE_MATCHED_RESOURCES"] = 15; + values[valuesById[16] = "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS"] = 16; + values[valuesById[17] = "GOVERNANCE_RULE_ERRORS"] = 17; + values[valuesById[18] = "GOVERNANCE_RULE_PROCESSING"] = 18; + return values; + })(); + + return GovernanceEvent; + })(); + + v1.DataScanEvent = (function() { + + /** + * Properties of a DataScanEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDataScanEvent + * @property {string|null} [dataSource] DataScanEvent dataSource + * @property {string|null} [jobId] DataScanEvent jobId + * @property {google.protobuf.ITimestamp|null} [createTime] DataScanEvent createTime + * @property {google.protobuf.ITimestamp|null} [startTime] DataScanEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DataScanEvent endTime + * @property {google.cloud.dataplex.v1.DataScanEvent.ScanType|null} [type] DataScanEvent type + * @property {google.cloud.dataplex.v1.DataScanEvent.State|null} [state] DataScanEvent state + * @property {string|null} [message] DataScanEvent message + * @property {string|null} [specVersion] DataScanEvent specVersion + * @property {google.cloud.dataplex.v1.DataScanEvent.Trigger|null} [trigger] DataScanEvent trigger + * @property {google.cloud.dataplex.v1.DataScanEvent.Scope|null} [scope] DataScanEvent scope + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null} [dataProfile] DataScanEvent dataProfile + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null} [dataQuality] DataScanEvent dataQuality + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null} [dataProfileConfigs] DataScanEvent dataProfileConfigs + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null} [dataQualityConfigs] DataScanEvent dataQualityConfigs + * @property {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null} [postScanActionsResult] DataScanEvent postScanActionsResult + */ + + /** + * Constructs a new DataScanEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScanEvent. + * @implements IDataScanEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set + */ + function DataScanEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataScanEvent dataSource. + * @member {string} dataSource + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataSource = ""; + + /** + * DataScanEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.jobId = ""; + + /** + * DataScanEvent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.createTime = null; + + /** + * DataScanEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.startTime = null; + + /** + * DataScanEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.endTime = null; + + /** + * DataScanEvent type. + * @member {google.cloud.dataplex.v1.DataScanEvent.ScanType} type + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.type = 0; + + /** + * DataScanEvent state. + * @member {google.cloud.dataplex.v1.DataScanEvent.State} state + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.state = 0; + + /** + * DataScanEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.message = ""; + + /** + * DataScanEvent specVersion. + * @member {string} specVersion + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.specVersion = ""; + + /** + * DataScanEvent trigger. + * @member {google.cloud.dataplex.v1.DataScanEvent.Trigger} trigger + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.trigger = 0; + + /** + * DataScanEvent scope. + * @member {google.cloud.dataplex.v1.DataScanEvent.Scope} scope + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.scope = 0; + + /** + * DataScanEvent dataProfile. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null|undefined} dataProfile + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataProfile = null; + + /** + * DataScanEvent dataQuality. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null|undefined} dataQuality + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataQuality = null; + + /** + * DataScanEvent dataProfileConfigs. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null|undefined} dataProfileConfigs + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataProfileConfigs = null; + + /** + * DataScanEvent dataQualityConfigs. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null|undefined} dataQualityConfigs + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataQualityConfigs = null; + + /** + * DataScanEvent postScanActionsResult. + * @member {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null|undefined} postScanActionsResult + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.postScanActionsResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScanEvent result. + * @member {"dataProfile"|"dataQuality"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + Object.defineProperty(DataScanEvent.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataProfile", "dataQuality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataScanEvent appliedConfigs. + * @member {"dataProfileConfigs"|"dataQualityConfigs"|undefined} appliedConfigs + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + Object.defineProperty(DataScanEvent.prototype, "appliedConfigs", { + get: $util.oneOfGetter($oneOfFields = ["dataProfileConfigs", "dataQualityConfigs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScanEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent instance + */ + DataScanEvent.create = function create(properties) { + return new DataScanEvent(properties); + }; + + /** + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); + if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.specVersion); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.trigger); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.scope); + if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) + $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.encode(message.dataProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataQuality != null && Object.hasOwnProperty.call(message, "dataQuality")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.encode(message.dataQuality, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.dataProfileConfigs != null && Object.hasOwnProperty.call(message, "dataProfileConfigs")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.encode(message.dataProfileConfigs, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.dataQualityConfigs != null && Object.hasOwnProperty.call(message, "dataQualityConfigs")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.encode(message.dataQualityConfigs, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataScanEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 12: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.message = reader.string(); + break; + } + case 8: { + message.specVersion = reader.string(); + break; + } + case 9: { + message.trigger = reader.int32(); + break; + } + case 10: { + message.scope = reader.int32(); + break; + } + case 101: { + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.decode(reader, reader.uint32()); + break; + } + case 102: { + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.decode(reader, reader.uint32()); + break; + } + case 201: { + message.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.decode(reader, reader.uint32()); + break; + } + case 202: { + message.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.decode(reader, reader.uint32()); + break; + } + case 11: { + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataScanEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataScanEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + if (!$util.isString(message.specVersion)) + return "specVersion: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify(message.dataProfile); + if (error) + return "dataProfile." + error; + } + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify(message.dataQuality); + if (error) + return "dataQuality." + error; + } + } + if (message.dataProfileConfigs != null && message.hasOwnProperty("dataProfileConfigs")) { + properties.appliedConfigs = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify(message.dataProfileConfigs); + if (error) + return "dataProfileConfigs." + error; + } + } + if (message.dataQualityConfigs != null && message.hasOwnProperty("dataQualityConfigs")) { + if (properties.appliedConfigs === 1) + return "appliedConfigs: multiple values"; + properties.appliedConfigs = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify(message.dataQualityConfigs); + if (error) + return "dataQualityConfigs." + error; + } + } + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify(message.postScanActionsResult); + if (error) + return "postScanActionsResult." + error; + } + return null; + }; + + /** + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + */ + DataScanEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_PROFILE": + case 1: + message.type = 1; + break; + case "DATA_QUALITY": + case 2: + message.type = 2; + break; + case "DATA_DISCOVERY": + case 4: + message.type = 4; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + case "CREATED": + case 5: + message.state = 5; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.specVersion != null) + message.specVersion = String(object.specVersion); + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "TRIGGER_UNSPECIFIED": + case 0: + message.trigger = 0; + break; + case "ON_DEMAND": + case 1: + message.trigger = 1; + break; + case "SCHEDULE": + case 2: + message.trigger = 2; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "FULL": + case 1: + message.scope = 1; + break; + case "INCREMENTAL": + case 2: + message.scope = 2; + break; + } + if (object.dataProfile != null) { + if (typeof object.dataProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfile: object expected"); + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.fromObject(object.dataProfile); + } + if (object.dataQuality != null) { + if (typeof object.dataQuality !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQuality: object expected"); + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.fromObject(object.dataQuality); + } + if (object.dataProfileConfigs != null) { + if (typeof object.dataProfileConfigs !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfileConfigs: object expected"); + message.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.fromObject(object.dataProfileConfigs); + } + if (object.dataQualityConfigs != null) { + if (typeof object.dataQualityConfigs !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQualityConfigs: object expected"); + message.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.fromObject(object.dataQualityConfigs); + } + if (object.postScanActionsResult != null) { + if (typeof object.postScanActionsResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.postScanActionsResult: object expected"); + message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.fromObject(object.postScanActionsResult); + } + return message; + }; + + /** + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent} message DataScanEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataScanEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.type = options.enums === String ? "SCAN_TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.specVersion = ""; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + object.postScanActionsResult = null; + object.createTime = null; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + object.specVersion = message.specVersion; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] : message.trigger; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] : message.scope; + if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) + object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.toObject(message.postScanActionsResult, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + object.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.toObject(message.dataProfile, options); + if (options.oneofs) + object.result = "dataProfile"; + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + object.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.toObject(message.dataQuality, options); + if (options.oneofs) + object.result = "dataQuality"; + } + if (message.dataProfileConfigs != null && message.hasOwnProperty("dataProfileConfigs")) { + object.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.toObject(message.dataProfileConfigs, options); + if (options.oneofs) + object.appliedConfigs = "dataProfileConfigs"; + } + if (message.dataQualityConfigs != null && message.hasOwnProperty("dataQualityConfigs")) { + object.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.toObject(message.dataQualityConfigs, options); + if (options.oneofs) + object.appliedConfigs = "dataQualityConfigs"; + } + return object; + }; + + /** + * Converts this DataScanEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + * @returns {Object.} JSON object + */ + DataScanEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataScanEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataScanEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent"; + }; + + /** + * ScanType enum. + * @name google.cloud.dataplex.v1.DataScanEvent.ScanType + * @enum {number} + * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value + * @property {number} DATA_PROFILE=1 DATA_PROFILE value + * @property {number} DATA_QUALITY=2 DATA_QUALITY value + * @property {number} DATA_DISCOVERY=4 DATA_DISCOVERY value + */ + DataScanEvent.ScanType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_PROFILE"] = 1; + values[valuesById[2] = "DATA_QUALITY"] = 2; + values[valuesById[4] = "DATA_DISCOVERY"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataScanEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + * @property {number} CREATED=5 CREATED value + */ + DataScanEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + values[valuesById[5] = "CREATED"] = 5; + return values; + })(); + + /** + * Trigger enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} SCHEDULE=2 SCHEDULE value + */ + DataScanEvent.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "SCHEDULE"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} INCREMENTAL=2 INCREMENTAL value + */ + DataScanEvent.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "INCREMENTAL"] = 2; + return values; + })(); + + DataScanEvent.DataProfileResult = (function() { + + /** + * Properties of a DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataProfileResult + * @property {number|Long|null} [rowCount] DataProfileResult rowCount + */ + + /** + * Constructs a new DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataProfileResult. + * @implements IDataProfileResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + */ + function DataProfileResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @instance + */ + DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult instance + */ + DataProfileResult.create = function create(properties) { + return new DataProfileResult(properties); + }; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + return writer; + }; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + return null; + }; + + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + */ + DataProfileResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} message DataProfileResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileResult.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.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + return object; + }; + + /** + * Converts this DataProfileResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @instance + * @returns {Object.} JSON object + */ + DataProfileResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"; + }; + + return DataProfileResult; + })(); + + DataScanEvent.DataQualityResult = (function() { + + /** + * Properties of a DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataQualityResult + * @property {number|Long|null} [rowCount] DataQualityResult rowCount + * @property {boolean|null} [passed] DataQualityResult passed + * @property {Object.|null} [dimensionPassed] DataQualityResult dimensionPassed + * @property {number|null} [score] DataQualityResult score + * @property {Object.|null} [dimensionScore] DataQualityResult dimensionScore + * @property {Object.|null} [columnScore] DataQualityResult columnScore + */ + + /** + * Constructs a new DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataQualityResult. + * @implements IDataQualityResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + */ + function DataQualityResult(properties) { + this.dimensionPassed = {}; + this.dimensionScore = {}; + this.columnScore = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.passed = false; + + /** + * DataQualityResult dimensionPassed. + * @member {Object.} dimensionPassed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.dimensionPassed = $util.emptyObject; + + /** + * DataQualityResult score. + * @member {number} score + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.score = 0; + + /** + * DataQualityResult dimensionScore. + * @member {Object.} dimensionScore + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.dimensionScore = $util.emptyObject; + + /** + * DataQualityResult columnScore. + * @member {Object.} columnScore + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.columnScore = $util.emptyObject; + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult instance + */ + DataQualityResult.create = function create(properties) { + return new DataQualityResult(properties); + }; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passed); + if (message.dimensionPassed != null && Object.hasOwnProperty.call(message, "dimensionPassed")) + for (var keys = Object.keys(message.dimensionPassed), 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 0 =*/16).bool(message.dimensionPassed[keys[i]]).ldelim(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); + if (message.dimensionScore != null && Object.hasOwnProperty.call(message, "dimensionScore")) + for (var keys = Object.keys(message.dimensionScore), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 5 =*/21).float(message.dimensionScore[keys[i]]).ldelim(); + if (message.columnScore != null && Object.hasOwnProperty.call(message, "columnScore")) + for (var keys = Object.keys(message.columnScore), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 5 =*/21).float(message.columnScore[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowCount = reader.int64(); + break; + } + case 2: { + message.passed = reader.bool(); + break; + } + case 3: { + if (message.dimensionPassed === $util.emptyObject) + message.dimensionPassed = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = false; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.bool(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dimensionPassed[key] = value; + break; + } + case 4: { + message.score = reader.float(); + break; + } + case 5: { + if (message.dimensionScore === $util.emptyObject) + message.dimensionScore = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.float(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dimensionScore[key] = value; + break; + } + case 6: { + if (message.columnScore === $util.emptyObject) + message.columnScore = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.float(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.columnScore[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.dimensionPassed != null && message.hasOwnProperty("dimensionPassed")) { + if (!$util.isObject(message.dimensionPassed)) + return "dimensionPassed: object expected"; + var key = Object.keys(message.dimensionPassed); + for (var i = 0; i < key.length; ++i) + if (typeof message.dimensionPassed[key[i]] !== "boolean") + return "dimensionPassed: boolean{k:string} expected"; + } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.dimensionScore != null && message.hasOwnProperty("dimensionScore")) { + if (!$util.isObject(message.dimensionScore)) + return "dimensionScore: object expected"; + var key = Object.keys(message.dimensionScore); + for (var i = 0; i < key.length; ++i) + if (typeof message.dimensionScore[key[i]] !== "number") + return "dimensionScore: number{k:string} expected"; + } + if (message.columnScore != null && message.hasOwnProperty("columnScore")) { + if (!$util.isObject(message.columnScore)) + return "columnScore: object expected"; + var key = Object.keys(message.columnScore); + for (var i = 0; i < key.length; ++i) + if (typeof message.columnScore[key[i]] !== "number") + return "columnScore: number{k:string} expected"; + } + return null; + }; + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + */ + DataQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.dimensionPassed) { + if (typeof object.dimensionPassed !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionPassed: object expected"); + message.dimensionPassed = {}; + for (var keys = Object.keys(object.dimensionPassed), i = 0; i < keys.length; ++i) + message.dimensionPassed[keys[i]] = Boolean(object.dimensionPassed[keys[i]]); + } + if (object.score != null) + message.score = Number(object.score); + if (object.dimensionScore) { + if (typeof object.dimensionScore !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionScore: object expected"); + message.dimensionScore = {}; + for (var keys = Object.keys(object.dimensionScore), i = 0; i < keys.length; ++i) + message.dimensionScore[keys[i]] = Number(object.dimensionScore[keys[i]]); + } + if (object.columnScore) { + if (typeof object.columnScore !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.columnScore: object expected"); + message.columnScore = {}; + for (var keys = Object.keys(object.columnScore), i = 0; i < keys.length; ++i) + message.columnScore[keys[i]] = Number(object.columnScore[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} message DataQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.dimensionPassed = {}; + object.dimensionScore = {}; + object.columnScore = {}; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.passed = false; + object.score = 0; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + var keys2; + if (message.dimensionPassed && (keys2 = Object.keys(message.dimensionPassed)).length) { + object.dimensionPassed = {}; + for (var j = 0; j < keys2.length; ++j) + object.dimensionPassed[keys2[j]] = message.dimensionPassed[keys2[j]]; + } + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.dimensionScore && (keys2 = Object.keys(message.dimensionScore)).length) { + object.dimensionScore = {}; + for (var j = 0; j < keys2.length; ++j) + object.dimensionScore[keys2[j]] = options.json && !isFinite(message.dimensionScore[keys2[j]]) ? String(message.dimensionScore[keys2[j]]) : message.dimensionScore[keys2[j]]; + } + if (message.columnScore && (keys2 = Object.keys(message.columnScore)).length) { + object.columnScore = {}; + for (var j = 0; j < keys2.length; ++j) + object.columnScore[keys2[j]] = options.json && !isFinite(message.columnScore[keys2[j]]) ? String(message.columnScore[keys2[j]]) : message.columnScore[keys2[j]]; + } + return object; + }; + + /** + * Converts this DataQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"; + }; + + return DataQualityResult; + })(); + + DataScanEvent.DataProfileAppliedConfigs = (function() { + + /** + * Properties of a DataProfileAppliedConfigs. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataProfileAppliedConfigs + * @property {number|null} [samplingPercent] DataProfileAppliedConfigs samplingPercent + * @property {boolean|null} [rowFilterApplied] DataProfileAppliedConfigs rowFilterApplied + * @property {boolean|null} [columnFilterApplied] DataProfileAppliedConfigs columnFilterApplied + */ + + /** + * Constructs a new DataProfileAppliedConfigs. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataProfileAppliedConfigs. + * @implements IDataProfileAppliedConfigs + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs=} [properties] Properties to set + */ + function DataProfileAppliedConfigs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileAppliedConfigs samplingPercent. + * @member {number} samplingPercent + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @instance + */ + DataProfileAppliedConfigs.prototype.samplingPercent = 0; + + /** + * DataProfileAppliedConfigs rowFilterApplied. + * @member {boolean} rowFilterApplied + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @instance + */ + DataProfileAppliedConfigs.prototype.rowFilterApplied = false; + + /** + * DataProfileAppliedConfigs columnFilterApplied. + * @member {boolean} columnFilterApplied + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @instance + */ + DataProfileAppliedConfigs.prototype.columnFilterApplied = false; + + /** + * Creates a new DataProfileAppliedConfigs instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs instance + */ + DataProfileAppliedConfigs.create = function create(properties) { + return new DataProfileAppliedConfigs(properties); + }; + + /** + * Encodes the specified DataProfileAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs} message DataProfileAppliedConfigs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileAppliedConfigs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.samplingPercent); + if (message.rowFilterApplied != null && Object.hasOwnProperty.call(message, "rowFilterApplied")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.rowFilterApplied); + if (message.columnFilterApplied != null && Object.hasOwnProperty.call(message, "columnFilterApplied")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.columnFilterApplied); + return writer; + }; + + /** + * Encodes the specified DataProfileAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs} message DataProfileAppliedConfigs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileAppliedConfigs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileAppliedConfigs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.samplingPercent = reader.float(); + break; + } + case 2: { + message.rowFilterApplied = reader.bool(); + break; + } + case 3: { + message.columnFilterApplied = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileAppliedConfigs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileAppliedConfigs message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileAppliedConfigs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + if (typeof message.samplingPercent !== "number") + return "samplingPercent: number expected"; + if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) + if (typeof message.rowFilterApplied !== "boolean") + return "rowFilterApplied: boolean expected"; + if (message.columnFilterApplied != null && message.hasOwnProperty("columnFilterApplied")) + if (typeof message.columnFilterApplied !== "boolean") + return "columnFilterApplied: boolean expected"; + return null; + }; + + /** + * Creates a DataProfileAppliedConfigs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs + */ + DataProfileAppliedConfigs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(); + if (object.samplingPercent != null) + message.samplingPercent = Number(object.samplingPercent); + if (object.rowFilterApplied != null) + message.rowFilterApplied = Boolean(object.rowFilterApplied); + if (object.columnFilterApplied != null) + message.columnFilterApplied = Boolean(object.columnFilterApplied); + return message; + }; + + /** + * Creates a plain object from a DataProfileAppliedConfigs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} message DataProfileAppliedConfigs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileAppliedConfigs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.samplingPercent = 0; + object.rowFilterApplied = false; + object.columnFilterApplied = false; + } + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; + if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) + object.rowFilterApplied = message.rowFilterApplied; + if (message.columnFilterApplied != null && message.hasOwnProperty("columnFilterApplied")) + object.columnFilterApplied = message.columnFilterApplied; + return object; + }; + + /** + * Converts this DataProfileAppliedConfigs to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @instance + * @returns {Object.} JSON object + */ + DataProfileAppliedConfigs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileAppliedConfigs + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileAppliedConfigs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"; + }; + + return DataProfileAppliedConfigs; + })(); + + DataScanEvent.DataQualityAppliedConfigs = (function() { + + /** + * Properties of a DataQualityAppliedConfigs. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataQualityAppliedConfigs + * @property {number|null} [samplingPercent] DataQualityAppliedConfigs samplingPercent + * @property {boolean|null} [rowFilterApplied] DataQualityAppliedConfigs rowFilterApplied + */ + + /** + * Constructs a new DataQualityAppliedConfigs. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataQualityAppliedConfigs. + * @implements IDataQualityAppliedConfigs + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs=} [properties] Properties to set + */ + function DataQualityAppliedConfigs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityAppliedConfigs samplingPercent. + * @member {number} samplingPercent + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @instance + */ + DataQualityAppliedConfigs.prototype.samplingPercent = 0; + + /** + * DataQualityAppliedConfigs rowFilterApplied. + * @member {boolean} rowFilterApplied + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @instance + */ + DataQualityAppliedConfigs.prototype.rowFilterApplied = false; + + /** + * Creates a new DataQualityAppliedConfigs instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs instance + */ + DataQualityAppliedConfigs.create = function create(properties) { + return new DataQualityAppliedConfigs(properties); + }; + + /** + * Encodes the specified DataQualityAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs} message DataQualityAppliedConfigs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityAppliedConfigs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.samplingPercent); + if (message.rowFilterApplied != null && Object.hasOwnProperty.call(message, "rowFilterApplied")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.rowFilterApplied); + return writer; + }; + + /** + * Encodes the specified DataQualityAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs} message DataQualityAppliedConfigs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityAppliedConfigs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityAppliedConfigs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.samplingPercent = reader.float(); + break; + } + case 2: { + message.rowFilterApplied = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityAppliedConfigs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityAppliedConfigs message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityAppliedConfigs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + if (typeof message.samplingPercent !== "number") + return "samplingPercent: number expected"; + if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) + if (typeof message.rowFilterApplied !== "boolean") + return "rowFilterApplied: boolean expected"; + return null; + }; + + /** + * Creates a DataQualityAppliedConfigs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs + */ + DataQualityAppliedConfigs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(); + if (object.samplingPercent != null) + message.samplingPercent = Number(object.samplingPercent); + if (object.rowFilterApplied != null) + message.rowFilterApplied = Boolean(object.rowFilterApplied); + return message; + }; + + /** + * Creates a plain object from a DataQualityAppliedConfigs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} message DataQualityAppliedConfigs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityAppliedConfigs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.samplingPercent = 0; + object.rowFilterApplied = false; + } + if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) + object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; + if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) + object.rowFilterApplied = message.rowFilterApplied; + return object; + }; + + /** + * Converts this DataQualityAppliedConfigs to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @instance + * @returns {Object.} JSON object + */ + DataQualityAppliedConfigs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityAppliedConfigs + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityAppliedConfigs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"; + }; + + return DataQualityAppliedConfigs; + })(); + + DataScanEvent.PostScanActionsResult = (function() { + + /** + * Properties of a PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IPostScanActionsResult + * @property {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult + */ + + /** + * Constructs a new PostScanActionsResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a PostScanActionsResult. + * @implements IPostScanActionsResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult=} [properties] Properties to set + */ + function PostScanActionsResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostScanActionsResult bigqueryExportResult. + * @member {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @instance + */ + PostScanActionsResult.prototype.bigqueryExportResult = null; + + /** + * Creates a new PostScanActionsResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult instance + */ + PostScanActionsResult.create = function create(properties) { + return new PostScanActionsResult(properties); + }; + + /** + * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) + $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostScanActionsResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostScanActionsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); + if (error) + return "bigqueryExportResult." + error; + } + return null; + }; + + /** + * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult + */ + PostScanActionsResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(); + if (object.bigqueryExportResult != null) { + if (typeof object.bigqueryExportResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.bigqueryExportResult: object expected"); + message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); + } + return message; + }; + + /** + * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} message PostScanActionsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostScanActionsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bigqueryExportResult = null; + if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) + object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); + return object; + }; + + /** + * Converts this PostScanActionsResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @instance + * @returns {Object.} JSON object + */ + PostScanActionsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostScanActionsResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"; + }; + + PostScanActionsResult.BigQueryExportResult = (function() { + + /** + * Properties of a BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @interface IBigQueryExportResult + * @property {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state + * @property {string|null} [message] BigQueryExportResult message + */ + + /** + * Constructs a new BigQueryExportResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + * @classdesc Represents a BigQueryExportResult. + * @implements IBigQueryExportResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + */ + function BigQueryExportResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryExportResult state. + * @member {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State} state + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.state = 0; + + /** + * BigQueryExportResult message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @instance + */ + BigQueryExportResult.prototype.message = ""; + + /** + * Creates a new BigQueryExportResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance + */ + BigQueryExportResult.create = function create(properties) { + return new BigQueryExportResult(properties); + }; + + /** + * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryExportResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult + */ + BigQueryExportResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "SKIPPED": + case 3: + message.state = 3; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryExportResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this BigQueryExportResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @instance + * @returns {Object.} JSON object + */ + BigQueryExportResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryExportResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} SKIPPED=3 SKIPPED value + */ + BigQueryExportResult.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "SKIPPED"] = 3; + return values; + })(); + + return BigQueryExportResult; + })(); + + return PostScanActionsResult; + })(); + + return DataScanEvent; + })(); + + v1.DataQualityScanRuleResult = (function() { + + /** + * Properties of a DataQualityScanRuleResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityScanRuleResult + * @property {string|null} [jobId] DataQualityScanRuleResult jobId + * @property {string|null} [dataSource] DataQualityScanRuleResult dataSource + * @property {string|null} [column] DataQualityScanRuleResult column + * @property {string|null} [ruleName] DataQualityScanRuleResult ruleName + * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|null} [ruleType] DataQualityScanRuleResult ruleType + * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|null} [evalutionType] DataQualityScanRuleResult evalutionType + * @property {string|null} [ruleDimension] DataQualityScanRuleResult ruleDimension + * @property {number|null} [thresholdPercent] DataQualityScanRuleResult thresholdPercent + * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|null} [result] DataQualityScanRuleResult result + * @property {number|Long|null} [evaluatedRowCount] DataQualityScanRuleResult evaluatedRowCount + * @property {number|Long|null} [passedRowCount] DataQualityScanRuleResult passedRowCount + * @property {number|Long|null} [nullRowCount] DataQualityScanRuleResult nullRowCount + * @property {number|Long|null} [assertionRowCount] DataQualityScanRuleResult assertionRowCount + */ + + /** + * Constructs a new DataQualityScanRuleResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityScanRuleResult. + * @implements IDataQualityScanRuleResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult=} [properties] Properties to set + */ + function DataQualityScanRuleResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityScanRuleResult jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.jobId = ""; + + /** + * DataQualityScanRuleResult dataSource. + * @member {string} dataSource + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.dataSource = ""; + + /** + * DataQualityScanRuleResult column. + * @member {string} column + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.column = ""; + + /** + * DataQualityScanRuleResult ruleName. + * @member {string} ruleName + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.ruleName = ""; + + /** + * DataQualityScanRuleResult ruleType. + * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType} ruleType + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.ruleType = 0; + + /** + * DataQualityScanRuleResult evalutionType. + * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType} evalutionType + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.evalutionType = 0; + + /** + * DataQualityScanRuleResult ruleDimension. + * @member {string} ruleDimension + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.ruleDimension = ""; + + /** + * DataQualityScanRuleResult thresholdPercent. + * @member {number} thresholdPercent + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.thresholdPercent = 0; + + /** + * DataQualityScanRuleResult result. + * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.Result} result + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.result = 0; + + /** + * DataQualityScanRuleResult evaluatedRowCount. + * @member {number|Long} evaluatedRowCount + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.evaluatedRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityScanRuleResult passedRowCount. + * @member {number|Long} passedRowCount + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.passedRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityScanRuleResult nullRowCount. + * @member {number|Long} nullRowCount + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.nullRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityScanRuleResult assertionRowCount. + * @member {number|Long} assertionRowCount + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + */ + DataQualityScanRuleResult.prototype.assertionRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataQualityScanRuleResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult instance + */ + DataQualityScanRuleResult.create = function create(properties) { + return new DataQualityScanRuleResult(properties); + }; + + /** + * Encodes the specified DataQualityScanRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult} message DataQualityScanRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityScanRuleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.jobId); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSource); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.column); + if (message.ruleName != null && Object.hasOwnProperty.call(message, "ruleName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ruleName); + if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ruleType); + if (message.evalutionType != null && Object.hasOwnProperty.call(message, "evalutionType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.evalutionType); + if (message.ruleDimension != null && Object.hasOwnProperty.call(message, "ruleDimension")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.ruleDimension); + if (message.thresholdPercent != null && Object.hasOwnProperty.call(message, "thresholdPercent")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.thresholdPercent); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.result); + if (message.evaluatedRowCount != null && Object.hasOwnProperty.call(message, "evaluatedRowCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.evaluatedRowCount); + if (message.passedRowCount != null && Object.hasOwnProperty.call(message, "passedRowCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.passedRowCount); + if (message.nullRowCount != null && Object.hasOwnProperty.call(message, "nullRowCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.nullRowCount); + if (message.assertionRowCount != null && Object.hasOwnProperty.call(message, "assertionRowCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.assertionRowCount); + return writer; + }; + + /** + * Encodes the specified DataQualityScanRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult} message DataQualityScanRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityScanRuleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityScanRuleResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityScanRuleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityScanRuleResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.jobId = reader.string(); + break; + } + case 2: { + message.dataSource = reader.string(); + break; + } + case 3: { + message.column = reader.string(); + break; + } + case 4: { + message.ruleName = reader.string(); + break; + } + case 5: { + message.ruleType = reader.int32(); + break; + } + case 6: { + message.evalutionType = reader.int32(); + break; + } + case 7: { + message.ruleDimension = reader.string(); + break; + } + case 8: { + message.thresholdPercent = reader.double(); + break; + } + case 9: { + message.result = reader.int32(); + break; + } + case 10: { + message.evaluatedRowCount = reader.int64(); + break; + } + case 11: { + message.passedRowCount = reader.int64(); + break; + } + case 12: { + message.nullRowCount = reader.int64(); + break; + } + case 13: { + message.assertionRowCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityScanRuleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityScanRuleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityScanRuleResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityScanRuleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.ruleName != null && message.hasOwnProperty("ruleName")) + if (!$util.isString(message.ruleName)) + return "ruleName: string expected"; + if (message.ruleType != null && message.hasOwnProperty("ruleType")) + switch (message.ruleType) { + default: + return "ruleType: 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.evalutionType != null && message.hasOwnProperty("evalutionType")) + switch (message.evalutionType) { + default: + return "evalutionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ruleDimension != null && message.hasOwnProperty("ruleDimension")) + if (!$util.isString(message.ruleDimension)) + return "ruleDimension: string expected"; + if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) + if (typeof message.thresholdPercent !== "number") + return "thresholdPercent: number expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.evaluatedRowCount != null && message.hasOwnProperty("evaluatedRowCount")) + if (!$util.isInteger(message.evaluatedRowCount) && !(message.evaluatedRowCount && $util.isInteger(message.evaluatedRowCount.low) && $util.isInteger(message.evaluatedRowCount.high))) + return "evaluatedRowCount: integer|Long expected"; + if (message.passedRowCount != null && message.hasOwnProperty("passedRowCount")) + if (!$util.isInteger(message.passedRowCount) && !(message.passedRowCount && $util.isInteger(message.passedRowCount.low) && $util.isInteger(message.passedRowCount.high))) + return "passedRowCount: integer|Long expected"; + if (message.nullRowCount != null && message.hasOwnProperty("nullRowCount")) + if (!$util.isInteger(message.nullRowCount) && !(message.nullRowCount && $util.isInteger(message.nullRowCount.low) && $util.isInteger(message.nullRowCount.high))) + return "nullRowCount: integer|Long expected"; + if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) + if (!$util.isInteger(message.assertionRowCount) && !(message.assertionRowCount && $util.isInteger(message.assertionRowCount.low) && $util.isInteger(message.assertionRowCount.high))) + return "assertionRowCount: integer|Long expected"; + return null; + }; + + /** + * Creates a DataQualityScanRuleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult + */ + DataQualityScanRuleResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityScanRuleResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityScanRuleResult(); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.column != null) + message.column = String(object.column); + if (object.ruleName != null) + message.ruleName = String(object.ruleName); + switch (object.ruleType) { + default: + if (typeof object.ruleType === "number") { + message.ruleType = object.ruleType; + break; + } + break; + case "RULE_TYPE_UNSPECIFIED": + case 0: + message.ruleType = 0; + break; + case "NON_NULL_EXPECTATION": + case 1: + message.ruleType = 1; + break; + case "RANGE_EXPECTATION": + case 2: + message.ruleType = 2; + break; + case "REGEX_EXPECTATION": + case 3: + message.ruleType = 3; + break; + case "ROW_CONDITION_EXPECTATION": + case 4: + message.ruleType = 4; + break; + case "SET_EXPECTATION": + case 5: + message.ruleType = 5; + break; + case "STATISTIC_RANGE_EXPECTATION": + case 6: + message.ruleType = 6; + break; + case "TABLE_CONDITION_EXPECTATION": + case 7: + message.ruleType = 7; + break; + case "UNIQUENESS_EXPECTATION": + case 8: + message.ruleType = 8; + break; + case "SQL_ASSERTION": + case 9: + message.ruleType = 9; + break; + } + switch (object.evalutionType) { + default: + if (typeof object.evalutionType === "number") { + message.evalutionType = object.evalutionType; + break; + } + break; + case "EVALUATION_TYPE_UNSPECIFIED": + case 0: + message.evalutionType = 0; + break; + case "PER_ROW": + case 1: + message.evalutionType = 1; + break; + case "AGGREGATE": + case 2: + message.evalutionType = 2; + break; + } + if (object.ruleDimension != null) + message.ruleDimension = String(object.ruleDimension); + if (object.thresholdPercent != null) + message.thresholdPercent = Number(object.thresholdPercent); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "PASSED": + case 1: + message.result = 1; + break; + case "FAILED": + case 2: + message.result = 2; + break; + } + if (object.evaluatedRowCount != null) + if ($util.Long) + (message.evaluatedRowCount = $util.Long.fromValue(object.evaluatedRowCount)).unsigned = false; + else if (typeof object.evaluatedRowCount === "string") + message.evaluatedRowCount = parseInt(object.evaluatedRowCount, 10); + else if (typeof object.evaluatedRowCount === "number") + message.evaluatedRowCount = object.evaluatedRowCount; + else if (typeof object.evaluatedRowCount === "object") + message.evaluatedRowCount = new $util.LongBits(object.evaluatedRowCount.low >>> 0, object.evaluatedRowCount.high >>> 0).toNumber(); + if (object.passedRowCount != null) + if ($util.Long) + (message.passedRowCount = $util.Long.fromValue(object.passedRowCount)).unsigned = false; + else if (typeof object.passedRowCount === "string") + message.passedRowCount = parseInt(object.passedRowCount, 10); + else if (typeof object.passedRowCount === "number") + message.passedRowCount = object.passedRowCount; + else if (typeof object.passedRowCount === "object") + message.passedRowCount = new $util.LongBits(object.passedRowCount.low >>> 0, object.passedRowCount.high >>> 0).toNumber(); + if (object.nullRowCount != null) + if ($util.Long) + (message.nullRowCount = $util.Long.fromValue(object.nullRowCount)).unsigned = false; + else if (typeof object.nullRowCount === "string") + message.nullRowCount = parseInt(object.nullRowCount, 10); + else if (typeof object.nullRowCount === "number") + message.nullRowCount = object.nullRowCount; + else if (typeof object.nullRowCount === "object") + message.nullRowCount = new $util.LongBits(object.nullRowCount.low >>> 0, object.nullRowCount.high >>> 0).toNumber(); + if (object.assertionRowCount != null) + if ($util.Long) + (message.assertionRowCount = $util.Long.fromValue(object.assertionRowCount)).unsigned = false; + else if (typeof object.assertionRowCount === "string") + message.assertionRowCount = parseInt(object.assertionRowCount, 10); + else if (typeof object.assertionRowCount === "number") + message.assertionRowCount = object.assertionRowCount; + else if (typeof object.assertionRowCount === "object") + message.assertionRowCount = new $util.LongBits(object.assertionRowCount.low >>> 0, object.assertionRowCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataQualityScanRuleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityScanRuleResult} message DataQualityScanRuleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityScanRuleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.jobId = ""; + object.dataSource = ""; + object.column = ""; + object.ruleName = ""; + object.ruleType = options.enums === String ? "RULE_TYPE_UNSPECIFIED" : 0; + object.evalutionType = options.enums === String ? "EVALUATION_TYPE_UNSPECIFIED" : 0; + object.ruleDimension = ""; + object.thresholdPercent = 0; + object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.evaluatedRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.evaluatedRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.passedRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.passedRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nullRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nullRowCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.assertionRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.assertionRowCount = options.longs === String ? "0" : 0; + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.ruleName != null && message.hasOwnProperty("ruleName")) + object.ruleName = message.ruleName; + if (message.ruleType != null && message.hasOwnProperty("ruleType")) + object.ruleType = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType[message.ruleType] === undefined ? message.ruleType : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType[message.ruleType] : message.ruleType; + if (message.evalutionType != null && message.hasOwnProperty("evalutionType")) + object.evalutionType = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType[message.evalutionType] === undefined ? message.evalutionType : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType[message.evalutionType] : message.evalutionType; + if (message.ruleDimension != null && message.hasOwnProperty("ruleDimension")) + object.ruleDimension = message.ruleDimension; + if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) + object.thresholdPercent = options.json && !isFinite(message.thresholdPercent) ? String(message.thresholdPercent) : message.thresholdPercent; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result[message.result] === undefined ? message.result : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result[message.result] : message.result; + if (message.evaluatedRowCount != null && message.hasOwnProperty("evaluatedRowCount")) + if (typeof message.evaluatedRowCount === "number") + object.evaluatedRowCount = options.longs === String ? String(message.evaluatedRowCount) : message.evaluatedRowCount; + else + object.evaluatedRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.evaluatedRowCount) : options.longs === Number ? new $util.LongBits(message.evaluatedRowCount.low >>> 0, message.evaluatedRowCount.high >>> 0).toNumber() : message.evaluatedRowCount; + if (message.passedRowCount != null && message.hasOwnProperty("passedRowCount")) + if (typeof message.passedRowCount === "number") + object.passedRowCount = options.longs === String ? String(message.passedRowCount) : message.passedRowCount; + else + object.passedRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedRowCount) : options.longs === Number ? new $util.LongBits(message.passedRowCount.low >>> 0, message.passedRowCount.high >>> 0).toNumber() : message.passedRowCount; + if (message.nullRowCount != null && message.hasOwnProperty("nullRowCount")) + if (typeof message.nullRowCount === "number") + object.nullRowCount = options.longs === String ? String(message.nullRowCount) : message.nullRowCount; + else + object.nullRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullRowCount) : options.longs === Number ? new $util.LongBits(message.nullRowCount.low >>> 0, message.nullRowCount.high >>> 0).toNumber() : message.nullRowCount; + if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) + if (typeof message.assertionRowCount === "number") + object.assertionRowCount = options.longs === String ? String(message.assertionRowCount) : message.assertionRowCount; + else + object.assertionRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.assertionRowCount) : options.longs === Number ? new $util.LongBits(message.assertionRowCount.low >>> 0, message.assertionRowCount.high >>> 0).toNumber() : message.assertionRowCount; + return object; + }; + + /** + * Converts this DataQualityScanRuleResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityScanRuleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityScanRuleResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityScanRuleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityScanRuleResult"; + }; + + /** + * RuleType enum. + * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType + * @enum {number} + * @property {number} RULE_TYPE_UNSPECIFIED=0 RULE_TYPE_UNSPECIFIED value + * @property {number} NON_NULL_EXPECTATION=1 NON_NULL_EXPECTATION value + * @property {number} RANGE_EXPECTATION=2 RANGE_EXPECTATION value + * @property {number} REGEX_EXPECTATION=3 REGEX_EXPECTATION value + * @property {number} ROW_CONDITION_EXPECTATION=4 ROW_CONDITION_EXPECTATION value + * @property {number} SET_EXPECTATION=5 SET_EXPECTATION value + * @property {number} STATISTIC_RANGE_EXPECTATION=6 STATISTIC_RANGE_EXPECTATION value + * @property {number} TABLE_CONDITION_EXPECTATION=7 TABLE_CONDITION_EXPECTATION value + * @property {number} UNIQUENESS_EXPECTATION=8 UNIQUENESS_EXPECTATION value + * @property {number} SQL_ASSERTION=9 SQL_ASSERTION value + */ + DataQualityScanRuleResult.RuleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NON_NULL_EXPECTATION"] = 1; + values[valuesById[2] = "RANGE_EXPECTATION"] = 2; + values[valuesById[3] = "REGEX_EXPECTATION"] = 3; + values[valuesById[4] = "ROW_CONDITION_EXPECTATION"] = 4; + values[valuesById[5] = "SET_EXPECTATION"] = 5; + values[valuesById[6] = "STATISTIC_RANGE_EXPECTATION"] = 6; + values[valuesById[7] = "TABLE_CONDITION_EXPECTATION"] = 7; + values[valuesById[8] = "UNIQUENESS_EXPECTATION"] = 8; + values[valuesById[9] = "SQL_ASSERTION"] = 9; + return values; + })(); + + /** + * EvaluationType enum. + * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType + * @enum {number} + * @property {number} EVALUATION_TYPE_UNSPECIFIED=0 EVALUATION_TYPE_UNSPECIFIED value + * @property {number} PER_ROW=1 PER_ROW value + * @property {number} AGGREGATE=2 AGGREGATE value + */ + DataQualityScanRuleResult.EvaluationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PER_ROW"] = 1; + values[valuesById[2] = "AGGREGATE"] = 2; + return values; + })(); + + /** + * Result enum. + * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.Result + * @enum {number} + * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value + * @property {number} PASSED=1 PASSED value + * @property {number} FAILED=2 FAILED value + */ + DataQualityScanRuleResult.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PASSED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + return values; + })(); + + return DataQualityScanRuleResult; + })(); + + v1.MetadataService = (function() { + + /** + * Constructs a new MetadataService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataService + * @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 MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + + /** + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataService + * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createEntity = function createEntity(request, callback) { + return this.rpcCall(createEntity, $root.google.cloud.dataplex.v1.CreateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "CreateEntity" }); + + /** + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef UpdateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.updateEntity = function updateEntity(request, callback) { + return this.rpcCall(updateEntity, $root.google.cloud.dataplex.v1.UpdateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "UpdateEntity" }); + + /** + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeleteEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deleteEntity = function deleteEntity(request, callback) { + return this.rpcCall(deleteEntity, $root.google.cloud.dataplex.v1.DeleteEntityRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntity" }); + + /** + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity + */ + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { + return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "GetEntity" }); + + /** + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse + */ + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { + return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); + }, "name", { value: "ListEntities" }); + + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreatePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.createPartition = function createPartition(request, callback) { + return this.rpcCall(createPartition, $root.google.cloud.dataplex.v1.CreatePartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "CreatePartition" }); + + /** + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeletePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.deletePartition = function deletePartition(request, callback) { + return this.rpcCall(deletePartition, $root.google.cloud.dataplex.v1.DeletePartitionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePartition" }); + + /** + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetPartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition + */ + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { + return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "GetPartition" }); + + /** + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse + */ + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { + return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); + }, "name", { value: "ListPartitions" }); + + /** + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetadataService; + })(); + + v1.CreateEntityRequest = (function() { + + /** + * Properties of a CreateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEntityRequest + * @property {string|null} [parent] CreateEntityRequest parent + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] CreateEntityRequest entity + * @property {boolean|null} [validateOnly] CreateEntityRequest validateOnly + */ + + /** + * Constructs a new CreateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEntityRequest. + * @implements ICreateEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set + */ + function CreateEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEntityRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.parent = ""; + + /** + * CreateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.entity = null; + + /** + * CreateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + */ + CreateEntityRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest instance + */ + CreateEntityRequest.create = function create(properties) { + return new CreateEntityRequest(properties); + }; + + /** + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntityRequest.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.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEntityRequest.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.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + */ + CreateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEntityRequest} message CreateEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.entity = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntityRequest"; + }; + + return CreateEntityRequest; + })(); + + v1.UpdateEntityRequest = (function() { + + /** + * Properties of an UpdateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEntityRequest + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] UpdateEntityRequest entity + * @property {boolean|null} [validateOnly] UpdateEntityRequest validateOnly + */ + + /** + * Constructs a new UpdateEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEntityRequest. + * @implements IUpdateEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + */ + function UpdateEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + */ + UpdateEntityRequest.prototype.entity = null; + + /** + * UpdateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + */ + UpdateEntityRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest instance + */ + UpdateEntityRequest.create = function create(properties) { + return new UpdateEntityRequest(properties); + }; + + /** + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEntityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + */ + UpdateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEntityRequest} message UpdateEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = null; + object.validateOnly = false; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntityRequest"; + }; + + return UpdateEntityRequest; + })(); + + v1.DeleteEntityRequest = (function() { + + /** + * Properties of a DeleteEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEntityRequest + * @property {string|null} [name] DeleteEntityRequest name + * @property {string|null} [etag] DeleteEntityRequest etag + */ + + /** + * Constructs a new DeleteEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEntityRequest. + * @implements IDeleteEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + */ + function DeleteEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + */ + DeleteEntityRequest.prototype.name = ""; + + /** + * DeleteEntityRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + */ + DeleteEntityRequest.prototype.etag = ""; + + /** + * Creates a new DeleteEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest instance + */ + DeleteEntityRequest.create = function create(properties) { + return new DeleteEntityRequest(properties); + }; + + /** + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEntityRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + */ + DeleteEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEntityRequest} message DeleteEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntityRequest"; + }; + + return DeleteEntityRequest; + })(); + + v1.ListEntitiesRequest = (function() { + + /** + * Properties of a ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesRequest + * @property {string|null} [parent] ListEntitiesRequest parent + * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view + * @property {number|null} [pageSize] ListEntitiesRequest pageSize + * @property {string|null} [pageToken] ListEntitiesRequest pageToken + * @property {string|null} [filter] ListEntitiesRequest filter + */ + + /** + * Constructs a new ListEntitiesRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesRequest. + * @implements IListEntitiesRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + */ + function ListEntitiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.parent = ""; + + /** + * ListEntitiesRequest view. + * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.view = 0; + + /** + * ListEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageSize = 0; + + /** + * ListEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.pageToken = ""; + + /** + * ListEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance + */ + ListEntitiesRequest.create = function create(properties) { + return new ListEntitiesRequest(properties); + }; + + /** + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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 ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + */ + ListEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "TABLES": + case 1: + message.view = 1; + break; + case "FILESETS": + case 2: + message.view = 2; + break; + } + 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 ListEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; + 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 ListEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntitiesRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesRequest"; + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} TABLES=1 TABLES value + * @property {number} FILESETS=2 FILESETS value + */ + ListEntitiesRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "FILESETS"] = 2; + return values; + })(); + + return ListEntitiesRequest; + })(); + + v1.ListEntitiesResponse = (function() { + + /** + * Properties of a ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEntitiesResponse + * @property {Array.|null} [entities] ListEntitiesResponse entities + * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken + */ + + /** + * Constructs a new ListEntitiesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEntitiesResponse. + * @implements IListEntitiesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + */ + function ListEntitiesResponse(properties) { + this.entities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.entities = $util.emptyArray; + + /** + * ListEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + */ + ListEntitiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance + */ + ListEntitiesResponse.create = function create(properties) { + return new ListEntitiesResponse(properties); + }; + + /** + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dataplex.v1.Entity.encode(message.entities[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 ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEntitiesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + */ + ListEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEntitiesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesResponse"; + }; + + return ListEntitiesResponse; + })(); + + v1.GetEntityRequest = (function() { + + /** + * Properties of a GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEntityRequest + * @property {string|null} [name] GetEntityRequest name + * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + */ + + /** + * Constructs a new GetEntityRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEntityRequest. + * @implements IGetEntityRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + */ + function GetEntityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEntityRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.name = ""; + + /** + * GetEntityRequest view. + * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.view = 0; + + /** + * Creates a new GetEntityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + */ + GetEntityRequest.create = function create(properties) { + return new GetEntityRequest(properties); + }; + + /** + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEntityRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEntityRequest.verify = function verify(message) { + if (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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + */ + GetEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "SCHEMA": + case 2: + message.view = 2; + break; + case "FULL": + case 4: + message.view = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetEntityRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEntityRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntityRequest"; + }; + + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} FULL=4 FULL value + */ + GetEntityRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + return GetEntityRequest; + })(); + + v1.ListPartitionsRequest = (function() { + + /** + * Properties of a ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsRequest + * @property {string|null} [parent] ListPartitionsRequest parent + * @property {number|null} [pageSize] ListPartitionsRequest pageSize + * @property {string|null} [pageToken] ListPartitionsRequest pageToken + * @property {string|null} [filter] ListPartitionsRequest filter + */ + + /** + * Constructs a new ListPartitionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsRequest. + * @implements IListPartitionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + */ + function ListPartitionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.parent = ""; + + /** + * ListPartitionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageSize = 0; + + /** + * ListPartitionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.pageToken = ""; + + /** + * ListPartitionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + */ + ListPartitionsRequest.prototype.filter = ""; + + /** + * Creates a new ListPartitionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance + */ + ListPartitionsRequest.create = function create(properties) { + return new ListPartitionsRequest(properties); + }; + + /** + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.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 ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + 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 ListPartitionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsRequest.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 ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + */ + ListPartitionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + 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 ListPartitionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsRequest.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 ListPartitionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPartitionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsRequest"; + }; + + return ListPartitionsRequest; + })(); + + v1.CreatePartitionRequest = (function() { + + /** + * Properties of a CreatePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreatePartitionRequest + * @property {string|null} [parent] CreatePartitionRequest parent + * @property {google.cloud.dataplex.v1.IPartition|null} [partition] CreatePartitionRequest partition + * @property {boolean|null} [validateOnly] CreatePartitionRequest validateOnly + */ + + /** + * Constructs a new CreatePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreatePartitionRequest. + * @implements ICreatePartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + */ + function CreatePartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePartitionRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.parent = ""; + + /** + * CreatePartitionRequest partition. + * @member {google.cloud.dataplex.v1.IPartition|null|undefined} partition + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.partition = null; + + /** + * CreatePartitionRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.validateOnly = false; + + /** + * Creates a new CreatePartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest instance + */ + CreatePartitionRequest.create = function create(properties) { + return new CreatePartitionRequest(properties); + }; + + /** + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartitionRequest.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.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.Partition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePartitionRequest.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.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partition); + if (error) + return "partition." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + */ + CreatePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreatePartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreatePartitionRequest.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partition); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.CreatePartitionRequest} message CreatePartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.partition = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.cloud.dataplex.v1.Partition.toObject(message.partition, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreatePartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreatePartitionRequest"; + }; + + return CreatePartitionRequest; + })(); + + v1.DeletePartitionRequest = (function() { + + /** + * Properties of a DeletePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeletePartitionRequest + * @property {string|null} [name] DeletePartitionRequest name + * @property {string|null} [etag] DeletePartitionRequest etag + */ + + /** + * Constructs a new DeletePartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeletePartitionRequest. + * @implements IDeletePartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + */ + function DeletePartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + */ + DeletePartitionRequest.prototype.name = ""; + + /** + * DeletePartitionRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + */ + DeletePartitionRequest.prototype.etag = ""; + + /** + * Creates a new DeletePartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest instance + */ + DeletePartitionRequest.create = function create(properties) { + return new DeletePartitionRequest(properties); + }; + + /** + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartitionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePartitionRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + */ + DeletePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeletePartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {google.cloud.dataplex.v1.DeletePartitionRequest} message DeletePartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePartitionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeletePartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeletePartitionRequest"; + }; + + return DeletePartitionRequest; + })(); + + v1.ListPartitionsResponse = (function() { + + /** + * Properties of a ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListPartitionsResponse + * @property {Array.|null} [partitions] ListPartitionsResponse partitions + * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken + */ + + /** + * Constructs a new ListPartitionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListPartitionsResponse. + * @implements IListPartitionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + */ + function ListPartitionsResponse(properties) { + this.partitions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPartitionsResponse partitions. + * @member {Array.} partitions + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.partitions = $util.emptyArray; + + /** + * ListPartitionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + */ + ListPartitionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPartitionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance + */ + ListPartitionsResponse.create = function create(properties) { + return new ListPartitionsResponse(properties); + }; + + /** + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitions != null && message.partitions.length) + for (var i = 0; i < message.partitions.length; ++i) + $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[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 ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPartitionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPartitionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; + for (var i = 0; i < message.partitions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); + if (error) + return "partitions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + */ + ListPartitionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + if (object.partitions) { + if (!Array.isArray(object.partitions)) + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); + message.partitions = []; + for (var i = 0; i < object.partitions.length; ++i) { + if (typeof object.partitions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); + message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPartitionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partitions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partitions && message.partitions.length) { + object.partitions = []; + for (var j = 0; j < message.partitions.length; ++j) + object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPartitionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListPartitionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPartitionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsResponse"; + }; + + return ListPartitionsResponse; + })(); + + v1.GetPartitionRequest = (function() { + + /** + * Properties of a GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetPartitionRequest + * @property {string|null} [name] GetPartitionRequest name + */ + + /** + * Constructs a new GetPartitionRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetPartitionRequest. + * @implements IGetPartitionRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + */ + function GetPartitionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + */ + GetPartitionRequest.prototype.name = ""; + + /** + * Creates a new GetPartitionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance + */ + GetPartitionRequest.create = function create(properties) { + return new GetPartitionRequest(properties); + }; + + /** + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encode = function encode(message, writer) { + 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 GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPartitionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + 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 GetPartitionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPartitionRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPartitionRequest.verify = function verify(message) { + if (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 GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + */ + GetPartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPartitionRequest.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 GetPartitionRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @instance + * @returns {Object.} JSON object + */ + GetPartitionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPartitionRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetPartitionRequest"; + }; + + return GetPartitionRequest; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.dataplex.v1 + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {string|null} [displayName] Entity displayName + * @property {string|null} [description] Entity description + * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime + * @property {string|null} [id] Entity id + * @property {string|null} [etag] Entity etag + * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type + * @property {string|null} [asset] Entity asset + * @property {string|null} [dataPath] Entity dataPath + * @property {string|null} [dataPathPattern] Entity dataPathPattern + * @property {string|null} [catalogEntry] Entity catalogEntry + * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system + * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format + * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility + * @property {google.cloud.dataplex.v1.IStorageAccess|null} [access] Entity access + * @property {string|null} [uid] Entity uid + * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.name = ""; + + /** + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.displayName = ""; + + /** + * Entity description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.description = ""; + + /** + * Entity createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.createTime = null; + + /** + * Entity updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.updateTime = null; + + /** + * Entity id. + * @member {string} id + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.id = ""; + + /** + * Entity etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.etag = ""; + + /** + * Entity type. + * @member {google.cloud.dataplex.v1.Entity.Type} type + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.asset = ""; + + /** + * Entity dataPath. + * @member {string} dataPath + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPath = ""; + + /** + * Entity dataPathPattern. + * @member {string} dataPathPattern + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.dataPathPattern = ""; + + /** + * Entity catalogEntry. + * @member {string} catalogEntry + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.catalogEntry = ""; + + /** + * Entity system. + * @member {google.cloud.dataplex.v1.StorageSystem} system + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.system = 0; + + /** + * Entity format. + * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.format = null; + + /** + * Entity compatibility. + * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.compatibility = null; + + /** + * Entity access. + * @member {google.cloud.dataplex.v1.IStorageAccess|null|undefined} access + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.access = null; + + /** + * Entity uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.uid = ""; + + /** + * Entity schema. + * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.schema = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encode = function encode(message, writer) { + if (!writer) + 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); + if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); + if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); + if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + $root.google.cloud.dataplex.v1.StorageAccess.encode(message.access, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.uid); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); + 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 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.id = reader.string(); + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 11: { + message.asset = reader.string(); + break; + } + case 12: { + message.dataPath = reader.string(); + break; + } + case 13: { + message.dataPathPattern = reader.string(); + break; + } + case 14: { + message.catalogEntry = reader.string(); + break; + } + case 15: { + message.system = reader.int32(); + break; + } + case 16: { + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + } + case 19: { + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + } + case 21: { + message.access = $root.google.cloud.dataplex.v1.StorageAccess.decode(reader, reader.uint32()); + break; + } + case 22: { + message.uid = reader.string(); + break; + } + case 50: { + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (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.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.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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; + } + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + if (!$util.isString(message.dataPath)) + return "dataPath: string expected"; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + if (!$util.isString(message.dataPathPattern)) + return "dataPathPattern: string expected"; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + if (!$util.isString(message.catalogEntry)) + return "catalogEntry: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + switch (message.system) { + default: + return "system: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.format != null && message.hasOwnProperty("format")) { + var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); + if (error) + return "format." + error; + } + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); + if (error) + return "compatibility." + error; + } + if (message.access != null && message.hasOwnProperty("access")) { + var error = $root.google.cloud.dataplex.v1.StorageAccess.verify(message.access); + if (error) + return "access." + error; + } + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity(); + 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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.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.dataplex.v1.Entity.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.id != null) + message.id = String(object.id); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataPath != null) + message.dataPath = String(object.dataPath); + if (object.dataPathPattern != null) + message.dataPathPattern = String(object.dataPathPattern); + if (object.catalogEntry != null) + message.catalogEntry = String(object.catalogEntry); + switch (object.system) { + default: + if (typeof object.system === "number") { + message.system = object.system; + break; + } + break; + case "STORAGE_SYSTEM_UNSPECIFIED": + case 0: + message.system = 0; + break; + case "CLOUD_STORAGE": + case 1: + message.system = 1; + break; + case "BIGQUERY": + case 2: + message.system = 2; + break; + } + if (object.format != null) { + if (typeof object.format !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); + message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); + } + if (object.compatibility != null) { + if (typeof object.compatibility !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); + } + if (object.access != null) { + if (typeof object.access !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.access: object expected"); + message.access = $root.google.cloud.dataplex.v1.StorageAccess.fromObject(object.access); + } + if (object.uid != null) + message.uid = String(object.uid); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); + message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {google.cloud.dataplex.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.id = ""; + object.etag = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.asset = ""; + object.dataPath = ""; + object.dataPathPattern = ""; + object.catalogEntry = ""; + object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; + object.format = null; + object.compatibility = null; + object.access = null; + object.uid = ""; + object.schema = 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.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.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + object.dataPath = message.dataPath; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + object.dataPathPattern = message.dataPathPattern; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + object.catalogEntry = message.catalogEntry; + if (message.system != null && message.hasOwnProperty("system")) + object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] === undefined ? message.system : $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; + if (message.format != null && message.hasOwnProperty("format")) + object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) + object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); + if (message.access != null && message.hasOwnProperty("access")) + object.access = $root.google.cloud.dataplex.v1.StorageAccess.toObject(message.access, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + Entity.CompatibilityStatus = (function() { + + /** + * Properties of a CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @interface ICompatibilityStatus + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery + */ + + /** + * Constructs a new CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @classdesc Represents a CompatibilityStatus. + * @implements ICompatibilityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + */ + function CompatibilityStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompatibilityStatus hiveMetastore. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.hiveMetastore = null; + + /** + * CompatibilityStatus bigquery. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + */ + CompatibilityStatus.prototype.bigquery = null; + + /** + * Creates a new CompatibilityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance + */ + CompatibilityStatus.create = function create(properties) { + return new CompatibilityStatus(properties); + }; + + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompatibilityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompatibilityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); + if (error) + return "hiveMetastore." + error; + } + if (message.bigquery != null && message.hasOwnProperty("bigquery")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); + if (error) + return "bigquery." + error; + } + return null; + }; + + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + */ + CompatibilityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + if (object.hiveMetastore != null) { + if (typeof object.hiveMetastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); + } + if (object.bigquery != null) { + if (typeof object.bigquery !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); + } + return message; + }; + + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompatibilityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hiveMetastore = null; + object.bigquery = null; + } + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) + object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); + if (message.bigquery != null && message.hasOwnProperty("bigquery")) + object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + return object; + }; + + /** + * Converts this CompatibilityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + * @returns {Object.} JSON object + */ + CompatibilityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompatibilityStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompatibilityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus"; + }; + + CompatibilityStatus.Compatibility = (function() { + + /** + * Properties of a Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @interface ICompatibility + * @property {boolean|null} [compatible] Compatibility compatible + * @property {string|null} [reason] Compatibility reason + */ + + /** + * Constructs a new Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @classdesc Represents a Compatibility. + * @implements ICompatibility + * @constructor + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + */ + function Compatibility(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Compatibility compatible. + * @member {boolean} compatible + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.compatible = false; + + /** + * Compatibility reason. + * @member {string} reason + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + */ + Compatibility.prototype.reason = ""; + + /** + * Creates a new Compatibility instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance + */ + Compatibility.create = function create(properties) { + return new Compatibility(properties); + }; + + /** + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + return writer; + }; + + /** + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Compatibility.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.compatible = reader.bool(); + break; + } + case 2: { + message.reason = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Compatibility message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Compatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compatible != null && message.hasOwnProperty("compatible")) + if (typeof message.compatible !== "boolean") + return "compatible: boolean expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + */ + Compatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + if (object.compatible != null) + message.compatible = Boolean(object.compatible); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Compatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.compatible = false; + object.reason = ""; + } + if (message.compatible != null && message.hasOwnProperty("compatible")) + object.compatible = message.compatible; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this Compatibility to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + * @returns {Object.} JSON object + */ + Compatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Compatibility + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Compatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"; + }; + + return Compatibility; + })(); + + return CompatibilityStatus; + })(); + + return Entity; + })(); + + v1.Partition = (function() { + + /** + * Properties of a Partition. + * @memberof google.cloud.dataplex.v1 + * @interface IPartition + * @property {string|null} [name] Partition name + * @property {Array.|null} [values] Partition values + * @property {string|null} [location] Partition location + * @property {string|null} [etag] Partition etag + */ + + /** + * Constructs a new Partition. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Partition. + * @implements IPartition + * @constructor + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + */ + function Partition(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Partition name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.name = ""; + + /** + * Partition values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.values = $util.emptyArray; + + /** + * Partition location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.location = ""; + + /** + * Partition etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.etag = ""; + + /** + * Creates a new Partition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Partition} Partition instance + */ + Partition.create = function create(properties) { + return new Partition(properties); + }; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Partition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Partition.verify = function verify(message) { + if (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.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Partition} Partition + */ + Partition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Partition) + return object; + var message = new $root.google.cloud.dataplex.v1.Partition(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.location != null) + message.location = String(object.location); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Partition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Partition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Partition + * @instance + * @returns {Object.} JSON object + */ + Partition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Partition + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Partition"; + }; + + return Partition; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.dataplex.v1 + * @interface ISchema + * @property {boolean|null} [userManaged] Schema userManaged + * @property {Array.|null} [fields] Schema fields + * @property {Array.|null} [partitionFields] Schema partitionFields + * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.partitionFields = []; + if (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 userManaged. + * @member {boolean} userManaged + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.userManaged = false; + + /** + * Schema fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema partitionFields. + * @member {Array.} partitionFields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionFields = $util.emptyArray; + + /** + * Schema partitionStyle. + * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionStyle = 0; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.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.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionFields != null && message.partitionFields.length) + for (var i = 0; i < message.partitionFields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userManaged = reader.bool(); + break; + } + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; + } + case 4: { + message.partitionStyle = reader.int32(); + 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.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.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.dataplex.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.userManaged != null && message.hasOwnProperty("userManaged")) + if (typeof message.userManaged !== "boolean") + return "userManaged: boolean expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { + if (!Array.isArray(message.partitionFields)) + return "partitionFields: array expected"; + for (var i = 0; i < message.partitionFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); + if (error) + return "partitionFields." + error; + } + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + switch (message.partitionStyle) { + default: + return "partitionStyle: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema(); + if (object.userManaged != null) + message.userManaged = Boolean(object.userManaged); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + if (object.partitionFields) { + if (!Array.isArray(object.partitionFields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); + message.partitionFields = []; + for (var i = 0; i < object.partitionFields.length; ++i) { + if (typeof object.partitionFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); + message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); + } + } + switch (object.partitionStyle) { + default: + if (typeof object.partitionStyle === "number") { + message.partitionStyle = object.partitionStyle; + break; + } + break; + case "PARTITION_STYLE_UNSPECIFIED": + case 0: + message.partitionStyle = 0; + break; + case "HIVE_COMPATIBLE": + case 1: + message.partitionStyle = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.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.fields = []; + object.partitionFields = []; + } + if (options.defaults) { + object.userManaged = false; + object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; + } + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + object.userManaged = message.userManaged; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + if (message.partitionFields && message.partitionFields.length) { + object.partitionFields = []; + for (var j = 0; j < message.partitionFields.length; ++j) + object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] === undefined ? message.partitionStyle : $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.Schema"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Schema.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} BOOLEAN=1 BOOLEAN value + * @property {number} BYTE=2 BYTE value + * @property {number} INT16=3 INT16 value + * @property {number} INT32=4 INT32 value + * @property {number} INT64=5 INT64 value + * @property {number} FLOAT=6 FLOAT value + * @property {number} DOUBLE=7 DOUBLE value + * @property {number} DECIMAL=8 DECIMAL value + * @property {number} STRING=9 STRING value + * @property {number} BINARY=10 BINARY value + * @property {number} TIMESTAMP=11 TIMESTAMP value + * @property {number} DATE=12 DATE value + * @property {number} TIME=13 TIME value + * @property {number} RECORD=14 RECORD value + * @property {number} NULL=100 NULL value + */ + Schema.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOLEAN"] = 1; + values[valuesById[2] = "BYTE"] = 2; + values[valuesById[3] = "INT16"] = 3; + values[valuesById[4] = "INT32"] = 4; + values[valuesById[5] = "INT64"] = 5; + values[valuesById[6] = "FLOAT"] = 6; + values[valuesById[7] = "DOUBLE"] = 7; + values[valuesById[8] = "DECIMAL"] = 8; + values[valuesById[9] = "STRING"] = 9; + values[valuesById[10] = "BINARY"] = 10; + values[valuesById[11] = "TIMESTAMP"] = 11; + values[valuesById[12] = "DATE"] = 12; + values[valuesById[13] = "TIME"] = 13; + values[valuesById[14] = "RECORD"] = 14; + values[valuesById[100] = "NULL"] = 100; + return values; + })(); + + /** + * Mode enum. + * @name google.cloud.dataplex.v1.Schema.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} REQUIRED=1 REQUIRED value + * @property {number} NULLABLE=2 NULLABLE value + * @property {number} REPEATED=3 REPEATED value + */ + Schema.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUIRED"] = 1; + values[valuesById[2] = "NULLABLE"] = 2; + values[valuesById[3] = "REPEATED"] = 3; + return values; + })(); + + Schema.SchemaField = (function() { + + /** + * Properties of a SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface ISchemaField + * @property {string|null} [name] SchemaField name + * @property {string|null} [description] SchemaField description + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type + * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode + * @property {Array.|null} [fields] SchemaField fields + */ + + /** + * Constructs a new SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a SchemaField. + * @implements ISchemaField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + */ + function SchemaField(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]]; + } + + /** + * SchemaField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.name = ""; + + /** + * SchemaField description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.description = ""; + + /** + * SchemaField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.type = 0; + + /** + * SchemaField mode. + * @member {google.cloud.dataplex.v1.Schema.Mode} mode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.mode = 0; + + /** + * SchemaField fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + */ + SchemaField.prototype.fields = $util.emptyArray; + + /** + * Creates a new SchemaField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance + */ + SchemaField.create = function create(properties) { + return new SchemaField(properties); + }; + + /** + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + message.mode = reader.int32(); + break; + } + case 10: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaField.verify = function verify(message) { + if (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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + 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.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField + */ + SchemaField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "REQUIRED": + case 1: + message.mode = 1; + break; + case "NULLABLE": + case 2: + message.mode = 2; + break; + case "REPEATED": + case 3: + message.mode = 3; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + return object; + }; + + /** + * Converts this SchemaField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @instance + * @returns {Object.} JSON object + */ + SchemaField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema.SchemaField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.SchemaField"; + }; + + return SchemaField; + })(); + + Schema.PartitionField = (function() { + + /** + * Properties of a PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface IPartitionField + * @property {string|null} [name] PartitionField name + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type + */ + + /** + * Constructs a new PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a PartitionField. + * @implements IPartitionField + * @constructor + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + */ + function PartitionField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.name = ""; + + /** + * PartitionField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + */ + PartitionField.prototype.type = 0; + + /** + * Creates a new PartitionField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance + */ + PartitionField.create = function create(properties) { + return new PartitionField(properties); + }; + + /** + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encode = function encode(message, writer) { + if (!writer) + 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); + return writer; + }; + + /** + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionField message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + return null; + }; + + /** + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField + */ + PartitionField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; + } + return message; + }; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + 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.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + * @returns {Object.} JSON object + */ + PartitionField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartitionField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.PartitionField"; + }; + + return PartitionField; + })(); + + /** + * PartitionStyle enum. + * @name google.cloud.dataplex.v1.Schema.PartitionStyle + * @enum {number} + * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value + * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value + */ + Schema.PartitionStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; + return values; + })(); + + return Schema; + })(); + + v1.StorageFormat = (function() { + + /** + * Properties of a StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageFormat + * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format + * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat + * @property {string|null} [mimeType] StorageFormat mimeType + * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv + * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json + * @property {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null} [iceberg] StorageFormat iceberg + */ + + /** + * Constructs a new StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageFormat. + * @implements IStorageFormat + * @constructor + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + */ + function StorageFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageFormat format. + * @member {google.cloud.dataplex.v1.StorageFormat.Format} format + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.format = 0; + + /** + * StorageFormat compressionFormat. + * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.compressionFormat = 0; + + /** + * StorageFormat mimeType. + * @member {string} mimeType + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.mimeType = ""; + + /** + * StorageFormat csv. + * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.csv = null; + + /** + * StorageFormat json. + * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.json = null; + + /** + * StorageFormat iceberg. + * @member {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null|undefined} iceberg + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.iceberg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StorageFormat options. + * @member {"csv"|"json"|"iceberg"|undefined} options + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + Object.defineProperty(StorageFormat.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["csv", "json", "iceberg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance + */ + StorageFormat.create = function create(properties) { + return new StorageFormat(properties); + }; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.iceberg != null && Object.hasOwnProperty.call(message, "iceberg")) + $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.encode(message.iceberg, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.compressionFormat = reader.int32(); + break; + } + case 3: { + message.mimeType = reader.string(); + break; + } + case 10: { + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 11: { + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 12: { + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 100: + case 101: + case 200: + case 201: + case 202: + case 203: + case 204: + case 1000: + case 1001: + break; + } + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + switch (message.compressionFormat) { + default: + return "compressionFormat: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); + if (error) + return "csv." + error; + } + } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); + if (error) + return "json." + error; + } + } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify(message.iceberg); + if (error) + return "iceberg." + error; + } + } + return null; + }; + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + */ + StorageFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "PARQUET": + case 1: + message.format = 1; + break; + case "AVRO": + case 2: + message.format = 2; + break; + case "ORC": + case 3: + message.format = 3; + break; + case "CSV": + case 100: + message.format = 100; + break; + case "JSON": + case 101: + message.format = 101; + break; + case "IMAGE": + case 200: + message.format = 200; + break; + case "AUDIO": + case 201: + message.format = 201; + break; + case "VIDEO": + case 202: + message.format = 202; + break; + case "TEXT": + case 203: + message.format = 203; + break; + case "TFRECORD": + case 204: + message.format = 204; + break; + case "OTHER": + case 1000: + message.format = 1000; + break; + case "UNKNOWN": + case 1001: + message.format = 1001; + break; + } + switch (object.compressionFormat) { + default: + if (typeof object.compressionFormat === "number") { + message.compressionFormat = object.compressionFormat; + break; + } + break; + case "COMPRESSION_FORMAT_UNSPECIFIED": + case 0: + message.compressionFormat = 0; + break; + case "GZIP": + case 2: + message.compressionFormat = 2; + break; + case "BZIP2": + case 3: + message.compressionFormat = 3; + break; + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); + } + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); + } + if (object.iceberg != null) { + if (typeof object.iceberg !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.iceberg: object expected"); + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.fromObject(object.iceberg); + } + return message; + }; + + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; + object.mimeType = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] === undefined ? message.format : $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] === undefined ? message.compressionFormat : $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); + if (options.oneofs) + object.options = "csv"; + } + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); + if (options.oneofs) + object.options = "json"; + } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + object.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.toObject(message.iceberg, options); + if (options.oneofs) + object.options = "iceberg"; + } + return object; + }; + + /** + * Converts this StorageFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + * @returns {Object.} JSON object + */ + StorageFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageFormat + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat"; + }; + + StorageFormat.CsvOptions = (function() { + + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface ICsvOptions + * @property {string|null} [encoding] CsvOptions encoding + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [quote] CsvOptions quote + */ + + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; + + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; + + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; + + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); + return writer; + }; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.headerRows = reader.int32(); + break; + } + case 3: { + message.delimiter = reader.string(); + break; + } + case 4: { + message.quote = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.headerRows = 0; + object.delimiter = ""; + object.quote = ""; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; + + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.CsvOptions"; + }; + + return CsvOptions; + })(); + + StorageFormat.JsonOptions = (function() { + + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + */ + + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; + + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; + + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + return writer; + }; + + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + return null; + }; + + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = ""; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + return object; + }; + + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.JsonOptions"; + }; + + return JsonOptions; + })(); + + StorageFormat.IcebergOptions = (function() { + + /** + * Properties of an IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IIcebergOptions + * @property {string|null} [metadataLocation] IcebergOptions metadataLocation + */ + + /** + * Constructs a new IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents an IcebergOptions. + * @implements IIcebergOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set + */ + function IcebergOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IcebergOptions metadataLocation. + * @member {string} metadataLocation + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @instance + */ + IcebergOptions.prototype.metadataLocation = ""; + + /** + * Creates a new IcebergOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions instance + */ + IcebergOptions.create = function create(properties) { + return new IcebergOptions(properties); + }; + + /** + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IcebergOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataLocation); + return writer; + }; + + /** + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IcebergOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IcebergOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadataLocation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IcebergOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IcebergOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IcebergOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + if (!$util.isString(message.metadataLocation)) + return "metadataLocation: string expected"; + return null; + }; + + /** + * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + */ + IcebergOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); + if (object.metadataLocation != null) + message.metadataLocation = String(object.metadataLocation); + return message; + }; + + /** + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} message IcebergOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IcebergOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadataLocation = ""; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + object.metadataLocation = message.metadataLocation; + return object; + }; + + /** + * Converts this IcebergOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @instance + * @returns {Object.} JSON object + */ + IcebergOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IcebergOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IcebergOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"; + }; + + return IcebergOptions; + })(); + + /** + * Format enum. + * @name google.cloud.dataplex.v1.StorageFormat.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} PARQUET=1 PARQUET value + * @property {number} AVRO=2 AVRO value + * @property {number} ORC=3 ORC value + * @property {number} CSV=100 CSV value + * @property {number} JSON=101 JSON value + * @property {number} IMAGE=200 IMAGE value + * @property {number} AUDIO=201 AUDIO value + * @property {number} VIDEO=202 VIDEO value + * @property {number} TEXT=203 TEXT value + * @property {number} TFRECORD=204 TFRECORD value + * @property {number} OTHER=1000 OTHER value + * @property {number} UNKNOWN=1001 UNKNOWN value + */ + StorageFormat.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARQUET"] = 1; + values[valuesById[2] = "AVRO"] = 2; + values[valuesById[3] = "ORC"] = 3; + values[valuesById[100] = "CSV"] = 100; + values[valuesById[101] = "JSON"] = 101; + values[valuesById[200] = "IMAGE"] = 200; + values[valuesById[201] = "AUDIO"] = 201; + values[valuesById[202] = "VIDEO"] = 202; + values[valuesById[203] = "TEXT"] = 203; + values[valuesById[204] = "TFRECORD"] = 204; + values[valuesById[1000] = "OTHER"] = 1000; + values[valuesById[1001] = "UNKNOWN"] = 1001; + return values; + })(); + + /** + * CompressionFormat enum. + * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat + * @enum {number} + * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value + * @property {number} GZIP=2 GZIP value + * @property {number} BZIP2=3 BZIP2 value + */ + StorageFormat.CompressionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GZIP"] = 2; + values[valuesById[3] = "BZIP2"] = 3; + return values; + })(); + + return StorageFormat; + })(); + + v1.StorageAccess = (function() { + + /** + * Properties of a StorageAccess. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageAccess + * @property {google.cloud.dataplex.v1.StorageAccess.AccessMode|null} [read] StorageAccess read + */ + + /** + * Constructs a new StorageAccess. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageAccess. + * @implements IStorageAccess + * @constructor + * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set + */ + function StorageAccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageAccess read. + * @member {google.cloud.dataplex.v1.StorageAccess.AccessMode} read + * @memberof google.cloud.dataplex.v1.StorageAccess + * @instance + */ + StorageAccess.prototype.read = 0; + + /** + * Creates a new StorageAccess instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess instance + */ + StorageAccess.create = function create(properties) { + return new StorageAccess(properties); + }; + + /** + * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageAccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.read != null && Object.hasOwnProperty.call(message, "read")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.read); + return writer; + }; + + /** + * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageAccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageAccess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageAccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageAccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 21: { + message.read = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageAccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageAccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageAccess message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageAccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.read != null && message.hasOwnProperty("read")) + switch (message.read) { + default: + return "read: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess + */ + StorageAccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageAccess) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageAccess(); + switch (object.read) { + default: + if (typeof object.read === "number") { + message.read = object.read; + break; + } + break; + case "ACCESS_MODE_UNSPECIFIED": + case 0: + message.read = 0; + break; + case "DIRECT": + case 1: + message.read = 1; + break; + case "MANAGED": + case 2: + message.read = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {google.cloud.dataplex.v1.StorageAccess} message StorageAccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageAccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.read = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; + if (message.read != null && message.hasOwnProperty("read")) + object.read = options.enums === String ? $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] === undefined ? message.read : $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] : message.read; + return object; + }; + + /** + * Converts this StorageAccess to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageAccess + * @instance + * @returns {Object.} JSON object + */ + StorageAccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageAccess + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageAccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageAccess"; + }; + + /** + * AccessMode enum. + * @name google.cloud.dataplex.v1.StorageAccess.AccessMode + * @enum {number} + * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value + * @property {number} DIRECT=1 DIRECT value + * @property {number} MANAGED=2 MANAGED value + */ + StorageAccess.AccessMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIRECT"] = 1; + values[valuesById[2] = "MANAGED"] = 2; + return values; + })(); + + return StorageAccess; + })(); + + /** + * StorageSystem enum. + * @name google.cloud.dataplex.v1.StorageSystem + * @enum {number} + * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value + * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + v1.StorageSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_STORAGE"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return v1; + })(); + + return dataplex; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + 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; + })(); + + 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.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + 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 + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + 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; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.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-dataplex/v1/protos/protos.json b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json new file mode 100644 index 00000000000..23c4f05537a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json @@ -0,0 +1,13622 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "dataplex": { + "nested": { + "v1": { + "options": { + "go_package": "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb", + "java_multiple_files": true, + "java_outer_classname": "MetadataProto", + "java_package": "com.google.cloud.dataplex.v1", + "csharp_namespace": "Google.Cloud.Dataplex.V1", + "php_namespace": "Google\\Cloud\\Dataplex\\V1", + "ruby_package": "Google::Cloud::Dataplex::V1", + "(google.api.resource_definition).type": "bigquery.googleapis.com/Table", + "(google.api.resource_definition).pattern": "projects/{project}/datasets/{dataset}/tables/{table}" + }, + "nested": { + "Environment": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sessionSpec": { + "type": "SessionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sessionStatus": { + "type": "SessionStatus", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endpoints": { + "type": "Endpoints", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "compute" + ] + }, + "runtime": { + "oneof": [ + "osImage" + ] + } + }, + "fields": { + "compute": { + "type": "ComputeResources", + "id": 50, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "osImage": { + "type": "OsImageRuntime", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "ComputeResources": { + "fields": { + "diskSizeGb": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodeCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxNodeCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OsImageRuntime": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "javaLibraries": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SessionSpec": { + "fields": { + "maxIdleDuration": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableFastStartup": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SessionStatus": { + "fields": { + "active": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Endpoints": { + "fields": { + "notebooks": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sql": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "Content": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Content", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" + }, + "oneofs": { + "data": { + "oneof": [ + "dataText" + ] + }, + "content": { + "oneof": [ + "sqlScript", + "notebook" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataText": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sqlScript": { + "type": "SqlScript", + "id": 100 + }, + "notebook": { + "type": "Notebook", + "id": 101 + } + }, + "nested": { + "SqlScript": { + "fields": { + "engine": { + "type": "QueryEngine", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "QueryEngine": { + "values": { + "QUERY_ENGINE_UNSPECIFIED": 0, + "SPARK": 2 + } + } + } + }, + "Notebook": { + "fields": { + "kernelType": { + "type": "KernelType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "KernelType": { + "values": { + "KERNEL_TYPE_UNSPECIFIED": 0, + "PYTHON3": 1 + } + } + } + } + } + }, + "Session": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Session", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Session" + } + }, + "userId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Lake": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Lake", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastore": { + "type": "Metastore", + "id": 102, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metastoreStatus": { + "type": "MetastoreStatus", + "id": 104, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metastore": { + "fields": { + "service": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MetastoreStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endpoint": { + "type": "string", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "NONE": 1, + "READY": 2, + "UPDATING": 3, + "ERROR": 4 + } + } + } + } + } + }, + "AssetStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "activeAssets": { + "type": "int32", + "id": 2 + }, + "securityPolicyApplyingAssets": { + "type": "int32", + "id": 3 + } + } + }, + "Zone": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Zone", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 104, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "assetStatus": { + "type": "AssetStatus", + "id": 105, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "RAW": 1, + "CURATED": 2 + } + }, + "ResourceSpec": { + "fields": { + "locationType": { + "type": "LocationType", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "LocationType": { + "values": { + "LOCATION_TYPE_UNSPECIFIED": 0, + "SINGLE_REGION": 1, + "MULTI_REGION": 2 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "Action": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Action", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" + }, + "oneofs": { + "details": { + "oneof": [ + "invalidDataFormat", + "incompatibleDataSchema", + "invalidDataPartition", + "missingData", + "missingResource", + "unauthorizedResource", + "failedSecurityPolicyApply", + "invalidDataOrganization" + ] + } + }, + "fields": { + "category": { + "type": "Category", + "id": 1 + }, + "issue": { + "type": "string", + "id": 2 + }, + "detectTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "name": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" + } + }, + "lake": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zone": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "asset": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "dataLocations": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "invalidDataFormat": { + "type": "InvalidDataFormat", + "id": 10 + }, + "incompatibleDataSchema": { + "type": "IncompatibleDataSchema", + "id": 11 + }, + "invalidDataPartition": { + "type": "InvalidDataPartition", + "id": 12 + }, + "missingData": { + "type": "MissingData", + "id": 13 + }, + "missingResource": { + "type": "MissingResource", + "id": 14 + }, + "unauthorizedResource": { + "type": "UnauthorizedResource", + "id": 15 + }, + "failedSecurityPolicyApply": { + "type": "FailedSecurityPolicyApply", + "id": 21 + }, + "invalidDataOrganization": { + "type": "InvalidDataOrganization", + "id": 22 + } + }, + "nested": { + "Category": { + "values": { + "CATEGORY_UNSPECIFIED": 0, + "RESOURCE_MANAGEMENT": 1, + "SECURITY_POLICY": 2, + "DATA_DISCOVERY": 3 + } + }, + "MissingResource": { + "fields": {} + }, + "UnauthorizedResource": { + "fields": {} + }, + "FailedSecurityPolicyApply": { + "fields": { + "asset": { + "type": "string", + "id": 1 + } + } + }, + "InvalidDataFormat": { + "fields": { + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "expectedFormat": { + "type": "string", + "id": 2 + }, + "newFormat": { + "type": "string", + "id": 3 + } + } + }, + "IncompatibleDataSchema": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "existingSchema": { + "type": "string", + "id": 2 + }, + "newSchema": { + "type": "string", + "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "schemaChange": { + "type": "SchemaChange", + "id": 5 + } + }, + "nested": { + "SchemaChange": { + "values": { + "SCHEMA_CHANGE_UNSPECIFIED": 0, + "INCOMPATIBLE": 1, + "MODIFIED": 2 + } + } + } + }, + "InvalidDataPartition": { + "fields": { + "expectedStructure": { + "type": "PartitionStructure", + "id": 1 + } + }, + "nested": { + "PartitionStructure": { + "values": { + "PARTITION_STRUCTURE_UNSPECIFIED": 0, + "CONSISTENT_KEYS": 1, + "HIVE_STYLE_KEYS": 2 + } + } + } + }, + "MissingData": { + "fields": {} + }, + "InvalidDataOrganization": { + "fields": {} + } + } + }, + "Asset": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Asset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSpec": { + "type": "ResourceSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceStatus": { + "type": "ResourceStatus", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "securityStatus": { + "type": "SecurityStatus", + "id": 103, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "discoverySpec": { + "type": "DiscoverySpec", + "id": 106, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "discoveryStatus": { + "type": "DiscoveryStatus", + "id": 107, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "SecurityStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "APPLYING": 2, + "ERROR": 3 + } + } + } + }, + "DiscoverySpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disableTypeInference": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ResourceSpec": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "readAccessMode": { + "type": "AccessMode", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "STORAGE_BUCKET": 1, + "BIGQUERY_DATASET": 2 + } + }, + "AccessMode": { + "values": { + "ACCESS_MODE_UNSPECIFIED": 0, + "DIRECT": 1, + "MANAGED": 2 + } + } + } + }, + "ResourceStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "managedAccessIdentity": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "ERROR": 2 + } + } + } + }, + "DiscoveryStatus": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "lastRunTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "stats": { + "type": "Stats", + "id": 6 + }, + "lastRunDuration": { + "type": "google.protobuf.Duration", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "IN_PROGRESS": 2, + "PAUSED": 3, + "DISABLED": 5 + } + }, + "Stats": { + "fields": { + "dataItems": { + "type": "int64", + "id": 1 + }, + "dataSize": { + "type": "int64", + "id": 2 + }, + "tables": { + "type": "int64", + "id": 3 + }, + "filesets": { + "type": "int64", + "id": 4 + } + } + } + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "CREATING": 2, + "DELETING": 3, + "ACTION_REQUIRED": 4 + } + }, + "CatalogService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEntryType": { + "requestType": "CreateEntryTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryTypes", + "(google.api.http).body": "entry_type", + "(google.api.method_signature)": "parent,entry_type,entry_type_id", + "(google.longrunning.operation_info).response_type": "EntryType", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/entryTypes", + "body": "entry_type" + } + }, + { + "(google.api.method_signature)": "parent,entry_type,entry_type_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "EntryType", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateEntryType": { + "requestType": "UpdateEntryTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}", + "(google.api.http).body": "entry_type", + "(google.api.method_signature)": "entry_type,update_mask", + "(google.longrunning.operation_info).response_type": "EntryType", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}", + "body": "entry_type" + } + }, + { + "(google.api.method_signature)": "entry_type,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "EntryType", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteEntryType": { + "requestType": "DeleteEntryTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryTypes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/entryTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListEntryTypes": { + "requestType": "ListEntryTypesRequest", + "responseType": "ListEntryTypesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/entryTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/entryTypes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEntryType": { + "requestType": "GetEntryTypeRequest", + "responseType": "EntryType", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/entryTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateAspectType": { + "requestType": "CreateAspectTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/aspectTypes", + "(google.api.http).body": "aspect_type", + "(google.api.method_signature)": "parent,aspect_type,aspect_type_id", + "(google.longrunning.operation_info).response_type": "AspectType", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/aspectTypes", + "body": "aspect_type" + } + }, + { + "(google.api.method_signature)": "parent,aspect_type,aspect_type_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AspectType", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAspectType": { + "requestType": "UpdateAspectTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}", + "(google.api.http).body": "aspect_type", + "(google.api.method_signature)": "aspect_type,update_mask", + "(google.longrunning.operation_info).response_type": "AspectType", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}", + "body": "aspect_type" + } + }, + { + "(google.api.method_signature)": "aspect_type,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AspectType", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAspectType": { + "requestType": "DeleteAspectTypeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/aspectTypes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/aspectTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListAspectTypes": { + "requestType": "ListAspectTypesRequest", + "responseType": "ListAspectTypesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/aspectTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/aspectTypes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAspectType": { + "requestType": "GetAspectTypeRequest", + "responseType": "AspectType", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/aspectTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/aspectTypes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateEntryGroup": { + "requestType": "CreateEntryGroupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryGroups", + "(google.api.http).body": "entry_group", + "(google.api.method_signature)": "parent,entry_group,entry_group_id", + "(google.longrunning.operation_info).response_type": "EntryGroup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/entryGroups", + "body": "entry_group" + } + }, + { + "(google.api.method_signature)": "parent,entry_group,entry_group_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "EntryGroup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateEntryGroup": { + "requestType": "UpdateEntryGroupRequest", + "responseType": "google.longrunning.Operation", + "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", + "(google.longrunning.operation_info).response_type": "EntryGroup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", + "body": "entry_group" + } + }, + { + "(google.api.method_signature)": "entry_group,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "EntryGroup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteEntryGroup": { + "requestType": "DeleteEntryGroupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/entryGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "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" + } + ] + }, + "GetEntryGroup": { + "requestType": "GetEntryGroupRequest", + "responseType": "EntryGroup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/entryGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "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,entry_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", + "body": "entry" + } + }, + { + "(google.api.method_signature)": "parent,entry,entry_id" + } + ] + }, + "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,update_mask" + } + ] + }, + "DeleteEntry": { + "requestType": "DeleteEntryRequest", + "responseType": "Entry", + "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" + } + ] + }, + "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" + } + ] + }, + "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/{name=projects/*/locations/*}:lookupEntry" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*}:lookupEntry" + } + } + ] + }, + "SearchEntries": { + "requestType": "SearchEntriesRequest", + "responseType": "SearchEntriesResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*}:searchEntries", + "(google.api.method_signature)": "name,query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*}:searchEntries" + } + }, + { + "(google.api.method_signature)": "name,query" + } + ] + }, + "CreateMetadataJob": { + "requestType": "CreateMetadataJobRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "(google.api.http).body": "metadata_job", + "(google.api.method_signature)": "parent,metadata_job,metadata_job_id", + "(google.longrunning.operation_info).response_type": "MetadataJob", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "body": "metadata_job" + } + }, + { + "(google.api.method_signature)": "parent,metadata_job,metadata_job_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MetadataJob", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetMetadataJob": { + "requestType": "GetMetadataJobRequest", + "responseType": "MetadataJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/metadataJobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/metadataJobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMetadataJobs": { + "requestType": "ListMetadataJobsRequest", + "responseType": "ListMetadataJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/metadataJobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CancelMetadataJob": { + "requestType": "CancelMetadataJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "AspectType": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/AspectType", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/aspectTypes/{aspect_type}", + "(google.api.resource).plural": "aspectTypes", + "(google.api.resource).singular": "aspectType" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 8 + }, + "authorization": { + "type": "Authorization", + "id": 52, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "metadataTemplate": { + "type": "MetadataTemplate", + "id": 53, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "transferStatus": { + "type": "TransferStatus", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Authorization": { + "fields": { + "alternateUsePermission": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "MetadataTemplate": { + "fields": { + "index": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recordFields": { + "rule": "repeated", + "type": "MetadataTemplate", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enumValues": { + "rule": "repeated", + "type": "EnumValue", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mapItems": { + "type": "MetadataTemplate", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "arrayItems": { + "type": "MetadataTemplate", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeId": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeRef": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "constraints": { + "type": "Constraints", + "id": 50, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "type": "Annotations", + "id": 51, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnumValue": { + "fields": { + "index": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deprecated": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Constraints": { + "fields": { + "required": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Annotations": { + "fields": { + "deprecated": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayOrder": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stringType": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stringValues": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "EntryGroup": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/EntryGroup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}", + "(google.api.resource).plural": "entryGroups", + "(google.api.resource).singular": "entryGroup" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 8 + }, + "transferStatus": { + "type": "TransferStatus", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EntryType": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/EntryType", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryTypes/{entry_type}", + "(google.api.resource).plural": "entryTypes", + "(google.api.resource).singular": "entryType" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeAliases": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "platform": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "system": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requiredAspects": { + "rule": "repeated", + "type": "AspectInfo", + "id": 50 + }, + "authorization": { + "type": "Authorization", + "id": 51, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "AspectInfo": { + "fields": { + "type": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + } + } + }, + "Authorization": { + "fields": { + "alternateUsePermission": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + } + } + }, + "Aspect": { + "fields": { + "aspectType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "path": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "data": { + "type": "google.protobuf.Struct", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aspectSource": { + "type": "AspectSource", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AspectSource": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "dataVersion": { + "type": "string", + "id": 12 + } + } + }, + "Entry": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Entry", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}", + "(google.api.resource).plural": "entries", + "(google.api.resource).singular": "entry" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "entryType": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "aspects": { + "keyType": "string", + "type": "Aspect", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "parentEntry": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "fullyQualifiedName": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entrySource": { + "type": "EntrySource", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EntrySource": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "system": { + "type": "string", + "id": 2 + }, + "platform": { + "type": "string", + "id": 3 + }, + "displayName": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "ancestors": { + "rule": "repeated", + "type": "Ancestor", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "location": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Ancestor": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "CreateEntryGroupRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "entryGroupId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entryGroup": { + "type": "EntryGroup", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEntryGroupRequest": { + "fields": { + "entryGroup": { + "type": "EntryGroup", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEntryGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + }, + "etag": { + "type": "string", + "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).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEntryGroupsResponse": { + "fields": { + "entryGroups": { + "rule": "repeated", + "type": "EntryGroup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetEntryGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + } + } + }, + "CreateEntryTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "entryTypeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entryType": { + "type": "EntryType", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEntryTypeRequest": { + "fields": { + "entryType": { + "type": "EntryType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEntryTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEntryTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEntryTypesResponse": { + "fields": { + "entryTypes": { + "rule": "repeated", + "type": "EntryType", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetEntryTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" + } + } + } + }, + "CreateAspectTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "aspectTypeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aspectType": { + "type": "AspectType", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAspectTypeRequest": { + "fields": { + "aspectType": { + "type": "AspectType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteAspectTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAspectTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAspectTypesResponse": { + "fields": { + "aspectTypes": { + "rule": "repeated", + "type": "AspectType", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetAspectTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + } + } + }, + "CreateEntryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + }, + "entryId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entry": { + "type": "Entry", + "id": 3, + "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, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deleteMissingAspects": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aspectKeys": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEntryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" + } + } + } + }, + "ListEntriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.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" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEntriesResponse": { + "fields": { + "entries": { + "rule": "repeated", + "type": "Entry", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" + } + }, + "view": { + "type": "EntryView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aspectTypes": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "LookupEntryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "view": { + "type": "EntryView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aspectTypes": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entry": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" + } + } + } + }, + "SearchEntriesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "query": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scope": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchEntriesResult": { + "fields": { + "linkedResource": { + "type": "string", + "id": 8, + "options": { + "deprecated": true + } + }, + "dataplexEntry": { + "type": "Entry", + "id": 9 + }, + "snippets": { + "type": "Snippets", + "id": 12, + "options": { + "deprecated": true + } + } + }, + "nested": { + "Snippets": { + "options": { + "deprecated": true + }, + "fields": { + "dataplexEntry": { + "type": "Entry", + "id": 1, + "options": { + "deprecated": true + } + } + } + } + } + }, + "SearchEntriesResponse": { + "fields": { + "results": { + "rule": "repeated", + "type": "SearchEntriesResult", + "id": 1 + }, + "totalSize": { + "type": "int32", + "id": 2 + }, + "nextPageToken": { + "type": "string", + "id": 3 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ImportItem": { + "fields": { + "entry": { + "type": "Entry", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "aspectKeys": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateMetadataJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "metadataJob": { + "type": "MetadataJob", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metadataJobId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetMetadataJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" + } + } + } + }, + "ListMetadataJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMetadataJobsResponse": { + "fields": { + "metadataJobs": { + "rule": "repeated", + "type": "MetadataJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CancelMetadataJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" + } + } + } + }, + "MetadataJob": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/MetadataJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" + }, + "oneofs": { + "spec": { + "oneof": [ + "importSpec" + ] + }, + "result": { + "oneof": [ + "importResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "importSpec": { + "type": "ImportJobSpec", + "id": 100 + }, + "importResult": { + "type": "ImportJobResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ImportJobResult": { + "fields": { + "deletedEntries": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updatedEntries": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createdEntries": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unchangedEntries": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "recreatedEntries": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ImportJobSpec": { + "fields": { + "sourceStorageUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sourceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scope": { + "type": "ImportJobScope", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entrySyncMode": { + "type": "SyncMode", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aspectSyncMode": { + "type": "SyncMode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "logLevel": { + "type": "LogLevel", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SyncMode": { + "values": { + "SYNC_MODE_UNSPECIFIED": 0, + "FULL": 1, + "INCREMENTAL": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "DEBUG": 1, + "INFO": 2 + } + }, + "ImportJobScope": { + "fields": { + "entryGroups": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + }, + "entryTypes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" + } + }, + "aspectTypes": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + } + } + } + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "IMPORT": 1 + } + }, + "Status": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "completionPercent": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "QUEUED": 1, + "RUNNING": 2, + "CANCELING": 3, + "CANCELED": 4, + "SUCCEEDED": 5, + "FAILED": 6, + "SUCCEEDED_WITH_ERRORS": 7 + } + } + } + } + } + }, + "EntryView": { + "values": { + "ENTRY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2, + "CUSTOM": 3, + "ALL": 4 + } + }, + "TransferStatus": { + "values": { + "TRANSFER_STATUS_UNSPECIFIED": 0, + "TRANSFER_STATUS_MIGRATED": 1, + "TRANSFER_STATUS_TRANSFERRED": 2 + } + }, + "DataplexService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateLake": { + "requestType": "CreateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "parent,lake,lake_id", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/lakes", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "parent,lake,lake_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateLake": { + "requestType": "UpdateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "lake,update_mask", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "lake,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteLake": { + "requestType": "DeleteLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListLakes": { + "requestType": "ListLakesRequest", + "responseType": "ListLakesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/lakes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetLake": { + "requestType": "GetLakeRequest", + "responseType": "Lake", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListLakeActions": { + "requestType": "ListLakeActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateZone": { + "requestType": "CreateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "parent,zone,zone_id", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "parent,zone,zone_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateZone": { + "requestType": "UpdateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "zone,update_mask", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "zone,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteZone": { + "requestType": "DeleteZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListZones": { + "requestType": "ListZonesRequest", + "responseType": "ListZonesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetZone": { + "requestType": "GetZoneRequest", + "responseType": "Zone", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListZoneActions": { + "requestType": "ListZoneActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateAsset": { + "requestType": "CreateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "parent,asset,asset_id", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "parent,asset,asset_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAsset": { + "requestType": "UpdateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "asset,update_mask", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "asset,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAsset": { + "requestType": "DeleteAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListAssets": { + "requestType": "ListAssetsRequest", + "responseType": "ListAssetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAsset": { + "requestType": "GetAssetRequest", + "responseType": "Asset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAssetActions": { + "requestType": "ListAssetActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateTask": { + "requestType": "CreateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.http).body": "task", + "(google.api.method_signature)": "parent,task,task_id", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "body": "task" + } + }, + { + "(google.api.method_signature)": "parent,task,task_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTask": { + "requestType": "UpdateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).body": "task", + "(google.api.method_signature)": "task,update_mask", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "body": "task" + } + }, + { + "(google.api.method_signature)": "task,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTask": { + "requestType": "DeleteTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListTasks": { + "requestType": "ListTasksRequest", + "responseType": "ListTasksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetTask": { + "requestType": "GetTaskRequest", + "responseType": "Task", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RunTask": { + "requestType": "RunTaskRequest", + "responseType": "RunTaskResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelJob": { + "requestType": "CancelJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment,environment_id", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment,environment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSessions": { + "requestType": "ListSessionsRequest", + "responseType": "ListSessionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateLakeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "lakeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateLakeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "ListLakesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLakesResponse": { + "fields": { + "lakes": { + "rule": "repeated", + "type": "Lake", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListLakeActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListActionsResponse": { + "fields": { + "actions": { + "rule": "repeated", + "type": "Action", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "CreateZoneRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "zoneId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateZoneRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "ListZonesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListZonesResponse": { + "fields": { + "zones": { + "rule": "repeated", + "type": "Zone", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListZoneActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + } + } + }, + "CreateAssetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "assetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAssetRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "ListAssetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAssetsResponse": { + "fields": { + "assets": { + "rule": "repeated", + "type": "Asset", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAssetActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetAssetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateTaskRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "taskId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTaskRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "task": { + "type": "Task", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "ListTasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTasksResponse": { + "fields": { + "tasks": { + "rule": "repeated", + "type": "Task", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "RunTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "args": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RunTaskResponse": { + "fields": { + "job": { + "type": "Job", + "id": 1 + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "environmentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "environment": { + "type": "Environment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "environment": { + "type": "Environment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListSessionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListSessionsResponse": { + "fields": { + "sessions": { + "rule": "repeated", + "type": "Session", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "Task": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Task", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }, + "oneofs": { + "config": { + "oneof": [ + "spark", + "notebook" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "triggerSpec": { + "type": "TriggerSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionStatus": { + "type": "ExecutionStatus", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "spark": { + "type": "SparkTaskConfig", + "id": 300 + }, + "notebook": { + "type": "NotebookTaskConfig", + "id": 302 + } + }, + "nested": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "batch" + ] + }, + "runtime": { + "oneof": [ + "containerImage" + ] + }, + "network": { + "oneof": [ + "vpcNetwork" + ] + } + }, + "fields": { + "batch": { + "type": "BatchComputeResources", + "id": 52 + }, + "containerImage": { + "type": "ContainerImageRuntime", + "id": 101 + }, + "vpcNetwork": { + "type": "VpcNetwork", + "id": 150 + } + }, + "nested": { + "BatchComputeResources": { + "fields": { + "executorsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxExecutorsCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ContainerImageRuntime": { + "fields": { + "image": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "javaJars": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "VpcNetwork": { + "oneofs": { + "networkName": { + "oneof": [ + "network", + "subNetwork" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subNetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "TriggerSpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } + }, + "fields": { + "type": { + "type": "Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxRetries": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedule": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "RECURRING": 2 + } + } + } + }, + "ExecutionSpec": { + "fields": { + "args": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "project": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxJobExecutionLifetime": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKey": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SparkTaskConfig": { + "oneofs": { + "driver": { + "oneof": [ + "mainJarFileUri", + "mainClass", + "pythonScriptFile", + "sqlScriptFile", + "sqlScript" + ] + } + }, + "fields": { + "mainJarFileUri": { + "type": "string", + "id": 100 + }, + "mainClass": { + "type": "string", + "id": 101 + }, + "pythonScriptFile": { + "type": "string", + "id": 102 + }, + "sqlScriptFile": { + "type": "string", + "id": 104 + }, + "sqlScript": { + "type": "string", + "id": 105 + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NotebookTaskConfig": { + "fields": { + "notebook": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExecutionStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestJob": { + "type": "Job", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "Job": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retryCount": { + "type": "uint32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceJob": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "trigger": { + "type": "Trigger", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "executionSpec": { + "type": "Task.ExecutionSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "ABORTED": 6 + } + }, + "Trigger": { + "values": { + "TRIGGER_UNSPECIFIED": 0, + "TASK_CONFIG": 1, + "RUN_REQUEST": 2 + } + } + } + }, + "ContentService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateContent": { + "requestType": "CreateContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "(google.api.http).body": "content", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", + "(google.api.http).additional_bindings.body": "content", + "(google.api.method_signature)": "parent,content" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "body": "content", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", + "body": "content" + } + } + }, + { + "(google.api.method_signature)": "parent,content" + } + ] + }, + "UpdateContent": { + "requestType": "UpdateContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).body": "content", + "(google.api.http).additional_bindings.patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", + "(google.api.http).additional_bindings.body": "content", + "(google.api.method_signature)": "content,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", + "body": "content", + "additional_bindings": { + "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", + "body": "content" + } + } + }, + { + "(google.api.method_signature)": "content,update_mask" + } + ] + }, + "DeleteContent": { + "requestType": "DeleteContentRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetContent": { + "requestType": "GetContentRequest", + "responseType": "Content", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", + "(google.api.http).additional_bindings.get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy", + "(google.api.method_signature)": "resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", + "additional_bindings": { + "get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", + "body": "*" + } + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", + "body": "*" + } + } + } + ] + }, + "ListContent": { + "requestType": "ListContentRequest", + "responseType": "ListContentResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/lakes/*}/content", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/content" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateContentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "content": { + "type": "Content", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteContentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } + } + } + }, + "ListContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListContentResponse": { + "fields": { + "content": { + "rule": "repeated", + "type": "Content", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetContentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" + } + }, + "view": { + "type": "ContentView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ContentView": { + "values": { + "CONTENT_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2 + } + } + } + }, + "DataDiscoverySpec": { + "oneofs": { + "resourceConfig": { + "oneof": [ + "storageConfig" + ] + } + }, + "fields": { + "bigqueryPublishingConfig": { + "type": "BigQueryPublishingConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageConfig": { + "type": "StorageConfig", + "id": 100 + } + }, + "nested": { + "BigQueryPublishingConfig": { + "fields": { + "tableType": { + "type": "TableType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "connection": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigqueryconnection.googleapis.com/Connection" + } + } + }, + "nested": { + "TableType": { + "values": { + "TABLE_TYPE_UNSPECIFIED": 0, + "EXTERNAL": 1, + "BIGLAKE": 2 + } + } + } + }, + "StorageConfig": { + "fields": { + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeInferenceDisabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeInferenceDisabled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "DataDiscoveryResult": { + "fields": { + "bigqueryPublishing": { + "type": "BigQueryPublishing", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "BigQueryPublishing": { + "fields": { + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "bigquery.googleapis.com/Dataset" + } + } + } + } + } + }, + "DataProfileSpec": { + "fields": { + "samplingPercent": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rowFilter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "postScanActions": { + "type": "PostScanActions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includeFields": { + "type": "SelectedFields", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludeFields": { + "type": "SelectedFields", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PostScanActions": { + "fields": { + "bigqueryExport": { + "type": "BigQueryExport", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BigQueryExport": { + "fields": { + "resultsTable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SelectedFields": { + "fields": { + "fieldNames": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataProfileResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 3 + }, + "profile": { + "type": "Profile", + "id": 4 + }, + "scannedData": { + "type": "ScannedData", + "id": 5 + }, + "postScanActionsResult": { + "type": "PostScanActionsResult", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Profile": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 2 + } + }, + "nested": { + "Field": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "mode": { + "type": "string", + "id": 3 + }, + "profile": { + "type": "ProfileInfo", + "id": 4 + } + }, + "nested": { + "ProfileInfo": { + "oneofs": { + "fieldInfo": { + "oneof": [ + "stringProfile", + "integerProfile", + "doubleProfile" + ] + } + }, + "fields": { + "nullRatio": { + "type": "double", + "id": 2 + }, + "distinctRatio": { + "type": "double", + "id": 3 + }, + "topNValues": { + "rule": "repeated", + "type": "TopNValue", + "id": 4 + }, + "stringProfile": { + "type": "StringFieldInfo", + "id": 101 + }, + "integerProfile": { + "type": "IntegerFieldInfo", + "id": 102 + }, + "doubleProfile": { + "type": "DoubleFieldInfo", + "id": 103 + } + }, + "nested": { + "StringFieldInfo": { + "fields": { + "minLength": { + "type": "int64", + "id": 1 + }, + "maxLength": { + "type": "int64", + "id": 2 + }, + "averageLength": { + "type": "double", + "id": 3 + } + } + }, + "IntegerFieldInfo": { + "fields": { + "average": { + "type": "double", + "id": 1 + }, + "standardDeviation": { + "type": "double", + "id": 3 + }, + "min": { + "type": "int64", + "id": 4 + }, + "quartiles": { + "rule": "repeated", + "type": "int64", + "id": 6 + }, + "max": { + "type": "int64", + "id": 5 + } + } + }, + "DoubleFieldInfo": { + "fields": { + "average": { + "type": "double", + "id": 1 + }, + "standardDeviation": { + "type": "double", + "id": 3 + }, + "min": { + "type": "double", + "id": 4 + }, + "quartiles": { + "rule": "repeated", + "type": "double", + "id": 6 + }, + "max": { + "type": "double", + "id": 5 + } + } + }, + "TopNValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + }, + "ratio": { + "type": "double", + "id": 3 + } + } + } + } + } + } + } + } + }, + "PostScanActionsResult": { + "fields": { + "bigqueryExportResult": { + "type": "BigQueryExportResult", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "BigQueryExportResult": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "SKIPPED": 3 + } + } + } + } + } + } + } + }, + "Trigger": { + "oneofs": { + "mode": { + "oneof": [ + "onDemand", + "schedule" + ] + } + }, + "fields": { + "onDemand": { + "type": "OnDemand", + "id": 100 + }, + "schedule": { + "type": "Schedule", + "id": 101 + } + }, + "nested": { + "OnDemand": { + "fields": {} + }, + "Schedule": { + "fields": { + "cron": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "DataSource": { + "oneofs": { + "source": { + "oneof": [ + "entity", + "resource" + ] + } + }, + "fields": { + "entity": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "resource": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "ScannedData": { + "oneofs": { + "dataRange": { + "oneof": [ + "incrementalField" + ] + } + }, + "fields": { + "incrementalField": { + "type": "IncrementalField", + "id": 1 + } + }, + "nested": { + "IncrementalField": { + "fields": { + "field": { + "type": "string", + "id": 1 + }, + "start": { + "type": "string", + "id": 2 + }, + "end": { + "type": "string", + "id": 3 + } + } + } + } + }, + "DataQualitySpec": { + "fields": { + "rules": { + "rule": "repeated", + "type": "DataQualityRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "samplingPercent": { + "type": "float", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rowFilter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "postScanActions": { + "type": "PostScanActions", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PostScanActions": { + "fields": { + "bigqueryExport": { + "type": "BigQueryExport", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "notificationReport": { + "type": "NotificationReport", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BigQueryExport": { + "fields": { + "resultsTable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Recipients": { + "fields": { + "emails": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ScoreThresholdTrigger": { + "fields": { + "scoreThreshold": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JobFailureTrigger": { + "fields": {} + }, + "JobEndTrigger": { + "fields": {} + }, + "NotificationReport": { + "fields": { + "recipients": { + "type": "Recipients", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scoreThresholdTrigger": { + "type": "ScoreThresholdTrigger", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jobFailureTrigger": { + "type": "JobFailureTrigger", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jobEndTrigger": { + "type": "JobEndTrigger", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "DataQualityResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "passed": { + "type": "bool", + "id": 5 + }, + "score": { + "type": "float", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "dimensions": { + "rule": "repeated", + "type": "DataQualityDimensionResult", + "id": 2 + }, + "columns": { + "rule": "repeated", + "type": "DataQualityColumnResult", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rules": { + "rule": "repeated", + "type": "DataQualityRuleResult", + "id": 3 + }, + "rowCount": { + "type": "int64", + "id": 4 + }, + "scannedData": { + "type": "ScannedData", + "id": 7 + }, + "postScanActionsResult": { + "type": "PostScanActionsResult", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PostScanActionsResult": { + "fields": { + "bigqueryExportResult": { + "type": "BigQueryExportResult", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "BigQueryExportResult": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "SKIPPED": 3 + } + } + } + } + } + } + } + }, + "DataQualityRuleResult": { + "fields": { + "rule": { + "type": "DataQualityRule", + "id": 1 + }, + "passed": { + "type": "bool", + "id": 7 + }, + "evaluatedCount": { + "type": "int64", + "id": 9 + }, + "passedCount": { + "type": "int64", + "id": 8 + }, + "nullCount": { + "type": "int64", + "id": 5 + }, + "passRatio": { + "type": "double", + "id": 6 + }, + "failingRowsQuery": { + "type": "string", + "id": 10 + }, + "assertionRowCount": { + "type": "int64", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataQualityDimensionResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "dimension": { + "type": "DataQualityDimension", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "passed": { + "type": "bool", + "id": 3 + }, + "score": { + "type": "float", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "DataQualityDimension": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DataQualityRule": { + "oneofs": { + "ruleType": { + "oneof": [ + "rangeExpectation", + "nonNullExpectation", + "setExpectation", + "regexExpectation", + "uniquenessExpectation", + "statisticRangeExpectation", + "rowConditionExpectation", + "tableConditionExpectation", + "sqlAssertion" + ] + } + }, + "fields": { + "rangeExpectation": { + "type": "RangeExpectation", + "id": 1 + }, + "nonNullExpectation": { + "type": "NonNullExpectation", + "id": 2 + }, + "setExpectation": { + "type": "SetExpectation", + "id": 3 + }, + "regexExpectation": { + "type": "RegexExpectation", + "id": 4 + }, + "uniquenessExpectation": { + "type": "UniquenessExpectation", + "id": 100 + }, + "statisticRangeExpectation": { + "type": "StatisticRangeExpectation", + "id": 101 + }, + "rowConditionExpectation": { + "type": "RowConditionExpectation", + "id": 200 + }, + "tableConditionExpectation": { + "type": "TableConditionExpectation", + "id": 201 + }, + "sqlAssertion": { + "type": "SqlAssertion", + "id": 202 + }, + "column": { + "type": "string", + "id": 500, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreNull": { + "type": "bool", + "id": 501, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimension": { + "type": "string", + "id": 502, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "threshold": { + "type": "double", + "id": 503, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 504, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 505, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "suspended": { + "type": "bool", + "id": 506, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RangeExpectation": { + "fields": { + "minValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMinEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMaxEnabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NonNullExpectation": { + "fields": {} + }, + "SetExpectation": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RegexExpectation": { + "fields": { + "regex": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UniquenessExpectation": { + "fields": {} + }, + "StatisticRangeExpectation": { + "fields": { + "statistic": { + "type": "ColumnStatistic", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxValue": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMinEnabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMaxEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ColumnStatistic": { + "values": { + "STATISTIC_UNDEFINED": 0, + "MEAN": 1, + "MIN": 2, + "MAX": 3 + } + } + } + }, + "RowConditionExpectation": { + "fields": { + "sqlExpression": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TableConditionExpectation": { + "fields": { + "sqlExpression": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SqlAssertion": { + "fields": { + "sqlStatement": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataQualityColumnResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "column": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "score": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "DataTaxonomyService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataTaxonomy": { + "requestType": "CreateDataTaxonomyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", + "(google.api.http).body": "data_taxonomy", + "(google.api.method_signature)": "parent,data_taxonomy,data_taxonomy_id", + "(google.longrunning.operation_info).response_type": "DataTaxonomy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", + "body": "data_taxonomy" + } + }, + { + "(google.api.method_signature)": "parent,data_taxonomy,data_taxonomy_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataTaxonomy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataTaxonomy": { + "requestType": "UpdateDataTaxonomyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}", + "(google.api.http).body": "data_taxonomy", + "(google.api.method_signature)": "data_taxonomy,update_mask", + "(google.longrunning.operation_info).response_type": "DataTaxonomy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}", + "body": "data_taxonomy" + } + }, + { + "(google.api.method_signature)": "data_taxonomy,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataTaxonomy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataTaxonomy": { + "requestType": "DeleteDataTaxonomyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListDataTaxonomies": { + "requestType": "ListDataTaxonomiesRequest", + "responseType": "ListDataTaxonomiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/dataTaxonomies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataTaxonomy": { + "requestType": "GetDataTaxonomyRequest", + "responseType": "DataTaxonomy", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDataAttributeBinding": { + "requestType": "CreateDataAttributeBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", + "(google.api.http).body": "data_attribute_binding", + "(google.api.method_signature)": "parent,data_attribute_binding,data_attribute_binding_id", + "(google.longrunning.operation_info).response_type": "DataAttributeBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", + "body": "data_attribute_binding" + } + }, + { + "(google.api.method_signature)": "parent,data_attribute_binding,data_attribute_binding_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAttributeBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataAttributeBinding": { + "requestType": "UpdateDataAttributeBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}", + "(google.api.http).body": "data_attribute_binding", + "(google.api.method_signature)": "data_attribute_binding,update_mask", + "(google.longrunning.operation_info).response_type": "DataAttributeBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}", + "body": "data_attribute_binding" + } + }, + { + "(google.api.method_signature)": "data_attribute_binding,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAttributeBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataAttributeBinding": { + "requestType": "DeleteDataAttributeBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListDataAttributeBindings": { + "requestType": "ListDataAttributeBindingsRequest", + "responseType": "ListDataAttributeBindingsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataAttributeBinding": { + "requestType": "GetDataAttributeBindingRequest", + "responseType": "DataAttributeBinding", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDataAttribute": { + "requestType": "CreateDataAttributeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", + "(google.api.http).body": "data_attribute", + "(google.api.method_signature)": "parent,data_attribute,data_attribute_id", + "(google.longrunning.operation_info).response_type": "DataAttribute", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", + "body": "data_attribute" + } + }, + { + "(google.api.method_signature)": "parent,data_attribute,data_attribute_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAttribute", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataAttribute": { + "requestType": "UpdateDataAttributeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + "(google.api.http).body": "data_attribute", + "(google.api.method_signature)": "data_attribute,update_mask", + "(google.longrunning.operation_info).response_type": "DataAttribute", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + "body": "data_attribute" + } + }, + { + "(google.api.method_signature)": "data_attribute,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataAttribute", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataAttribute": { + "requestType": "DeleteDataAttributeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListDataAttributes": { + "requestType": "ListDataAttributesRequest", + "responseType": "ListDataAttributesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataAttribute": { + "requestType": "GetDataAttributeRequest", + "responseType": "DataAttribute", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "DataTaxonomy": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataTaxonomy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "attributeCount": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 10 + }, + "classCount": { + "type": "int32", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataAttribute": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataAttribute", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "parentId": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + }, + "attributeCount": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 10 + }, + "resourceAccessSpec": { + "type": "ResourceAccessSpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataAccessSpec": { + "type": "DataAccessSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataAttributeBinding": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataAttributeBinding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}" + }, + "oneofs": { + "resourceReference": { + "oneof": [ + "resource" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 8 + }, + "resource": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "attributes": { + "rule": "repeated", + "type": "string", + "id": 110, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + }, + "paths": { + "rule": "repeated", + "type": "Path", + "id": 120, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Path": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "attributes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + } + } + } + } + }, + "CreateDataTaxonomyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "dataTaxonomyId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataTaxonomy": { + "type": "DataTaxonomy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataTaxonomyRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataTaxonomy": { + "type": "DataTaxonomy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetDataTaxonomyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" + } + } + } + }, + "ListDataTaxonomiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataTaxonomiesResponse": { + "fields": { + "dataTaxonomies": { + "rule": "repeated", + "type": "DataTaxonomy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DeleteDataTaxonomyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateDataAttributeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" + } + }, + "dataAttributeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataAttribute": { + "type": "DataAttribute", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataAttributeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataAttribute": { + "type": "DataAttribute", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetDataAttributeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + } + } + }, + "ListDataAttributesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataAttributesResponse": { + "fields": { + "dataAttributes": { + "rule": "repeated", + "type": "DataAttribute", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DeleteDataAttributeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateDataAttributeBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "dataAttributeBindingId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataAttributeBinding": { + "type": "DataAttributeBinding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataAttributeBindingRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataAttributeBinding": { + "type": "DataAttributeBinding", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetDataAttributeBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" + } + } + } + }, + "ListDataAttributeBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataAttributeBindingsResponse": { + "fields": { + "dataAttributeBindings": { + "rule": "repeated", + "type": "DataAttributeBinding", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DeleteDataAttributeBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ResourceAccessSpec": { + "fields": { + "readers": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "writers": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "owners": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataAccessSpec": { + "fields": { + "readers": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DataScanService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataScan": { + "requestType": "CreateDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataScans", + "(google.api.http).body": "data_scan", + "(google.api.method_signature)": "parent,data_scan,data_scan_id", + "(google.longrunning.operation_info).response_type": "DataScan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/dataScans", + "body": "data_scan" + } + }, + { + "(google.api.method_signature)": "parent,data_scan,data_scan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataScan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataScan": { + "requestType": "UpdateDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", + "(google.api.http).body": "data_scan", + "(google.api.method_signature)": "data_scan,update_mask", + "(google.longrunning.operation_info).response_type": "DataScan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", + "body": "data_scan" + } + }, + { + "(google.api.method_signature)": "data_scan,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataScan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataScan": { + "requestType": "DeleteDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataScans/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/dataScans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetDataScan": { + "requestType": "GetDataScanRequest", + "responseType": "DataScan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataScans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataScans": { + "requestType": "ListDataScansRequest", + "responseType": "ListDataScansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataScans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/dataScans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RunDataScan": { + "requestType": "RunDataScanRequest", + "responseType": "RunDataScanResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetDataScanJob": { + "requestType": "GetDataScanJobRequest", + "responseType": "DataScanJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataScanJobs": { + "requestType": "ListDataScanJobsRequest", + "responseType": "ListDataScanJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GenerateDataQualityRules": { + "requestType": "GenerateDataQualityRulesRequest", + "responseType": "GenerateDataQualityRulesResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "CreateDataScanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "dataScan": { + "type": "DataScan", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataScanId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateDataScanRequest": { + "fields": { + "dataScan": { + "type": "DataScan", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + } + } + }, + "GetDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + }, + "view": { + "type": "DataScanView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataScanView": { + "values": { + "DATA_SCAN_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 10 + } + } + } + }, + "ListDataScansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataScansResponse": { + "fields": { + "dataScans": { + "rule": "repeated", + "type": "DataScan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "RunDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + } + } + }, + "RunDataScanResponse": { + "fields": { + "job": { + "type": "DataScanJob", + "id": 1 + } + } + }, + "GetDataScanJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScanJob" + } + }, + "view": { + "type": "DataScanJobView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataScanJobView": { + "values": { + "DATA_SCAN_JOB_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 10 + } + } + } + }, + "ListDataScanJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataScanJobsResponse": { + "fields": { + "dataScanJobs": { + "rule": "repeated", + "type": "DataScanJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GenerateDataQualityRulesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GenerateDataQualityRulesResponse": { + "fields": { + "rule": { + "rule": "repeated", + "type": "DataQualityRule", + "id": 1 + } + } + }, + "DataScan": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataScan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}" + }, + "oneofs": { + "spec": { + "oneof": [ + "dataQualitySpec", + "dataProfileSpec", + "dataDiscoverySpec" + ] + }, + "result": { + "oneof": [ + "dataQualityResult", + "dataProfileResult", + "dataDiscoveryResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "data": { + "type": "DataSource", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "executionStatus": { + "type": "ExecutionStatus", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataScanType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualitySpec": { + "type": "DataQualitySpec", + "id": 100 + }, + "dataProfileSpec": { + "type": "DataProfileSpec", + "id": 101 + }, + "dataDiscoverySpec": { + "type": "DataDiscoverySpec", + "id": 102 + }, + "dataQualityResult": { + "type": "DataQualityResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileResult": { + "type": "DataProfileResult", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataDiscoveryResult": { + "type": "DataDiscoveryResult", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ExecutionSpec": { + "oneofs": { + "incremental": { + "oneof": [ + "field" + ] + } + }, + "fields": { + "trigger": { + "type": "Trigger", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "field": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "ExecutionStatus": { + "fields": { + "latestJobStartTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "latestJobEndTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "latestJobCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataScanJob": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataScanJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" + }, + "oneofs": { + "spec": { + "oneof": [ + "dataQualitySpec", + "dataProfileSpec", + "dataDiscoverySpec" + ] + }, + "result": { + "oneof": [ + "dataQualityResult", + "dataProfileResult", + "dataDiscoveryResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataScanType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualitySpec": { + "type": "DataQualitySpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileSpec": { + "type": "DataProfileSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataDiscoverySpec": { + "type": "DataDiscoverySpec", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualityResult": { + "type": "DataQualityResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileResult": { + "type": "DataProfileResult", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataDiscoveryResult": { + "type": "DataDiscoveryResult", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "PENDING": 7 + } + } + } + }, + "DataScanType": { + "values": { + "DATA_SCAN_TYPE_UNSPECIFIED": 0, + "DATA_QUALITY": 1, + "DATA_PROFILE": 2, + "DATA_DISCOVERY": 3 + } + }, + "DiscoveryEvent": { + "oneofs": { + "details": { + "oneof": [ + "config", + "entity", + "partition", + "action", + "table" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "lakeId": { + "type": "string", + "id": 2 + }, + "zoneId": { + "type": "string", + "id": 3 + }, + "assetId": { + "type": "string", + "id": 4 + }, + "dataLocation": { + "type": "string", + "id": 5 + }, + "datascanId": { + "type": "string", + "id": 6 + }, + "type": { + "type": "EventType", + "id": 10 + }, + "config": { + "type": "ConfigDetails", + "id": 20 + }, + "entity": { + "type": "EntityDetails", + "id": 21 + }, + "partition": { + "type": "PartitionDetails", + "id": 22 + }, + "action": { + "type": "ActionDetails", + "id": 23 + }, + "table": { + "type": "TableDetails", + "id": 24 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CONFIG": 1, + "ENTITY_CREATED": 2, + "ENTITY_UPDATED": 3, + "ENTITY_DELETED": 4, + "PARTITION_CREATED": 5, + "PARTITION_UPDATED": 6, + "PARTITION_DELETED": 7, + "TABLE_PUBLISHED": 10, + "TABLE_UPDATED": 11, + "TABLE_IGNORED": 12, + "TABLE_DELETED": 13 + } + }, + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "TableType": { + "values": { + "TABLE_TYPE_UNSPECIFIED": 0, + "EXTERNAL_TABLE": 1, + "BIGLAKE_TABLE": 2, + "OBJECT_TABLE": 3 + } + }, + "ConfigDetails": { + "fields": { + "parameters": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "EntityDetails": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "type": { + "type": "EntityType", + "id": 2 + } + } + }, + "TableDetails": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "type": { + "type": "TableType", + "id": 2 + } + } + }, + "PartitionDetails": { + "fields": { + "partition": { + "type": "string", + "id": 1 + }, + "entity": { + "type": "string", + "id": 2 + }, + "type": { + "type": "EntityType", + "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ActionDetails": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "issue": { + "type": "string", + "id": 2 + } + } + } + } + }, + "JobEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "retries": { + "type": "int32", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + }, + "service": { + "type": "Service", + "id": 8 + }, + "serviceJob": { + "type": "string", + "id": 9 + }, + "executionTrigger": { + "type": "ExecutionTrigger", + "id": 11 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SPARK": 1, + "NOTEBOOK": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "CANCELLED": 3, + "ABORTED": 4 + } + }, + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + }, + "ExecutionTrigger": { + "values": { + "EXECUTION_TRIGGER_UNSPECIFIED": 0, + "TASK_CONFIG": 1, + "RUN_REQUEST": 2 + } + } + } + }, + "SessionEvent": { + "oneofs": { + "detail": { + "oneof": [ + "query" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "userId": { + "type": "string", + "id": 2 + }, + "sessionId": { + "type": "string", + "id": 3 + }, + "type": { + "type": "EventType", + "id": 4 + }, + "query": { + "type": "QueryDetail", + "id": 5 + }, + "eventSucceeded": { + "type": "bool", + "id": 6 + }, + "fastStartupEnabled": { + "type": "bool", + "id": 7 + }, + "unassignedDuration": { + "type": "google.protobuf.Duration", + "id": 8 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "START": 1, + "STOP": 2, + "QUERY": 3, + "CREATE": 4 + } + }, + "QueryDetail": { + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "queryText": { + "type": "string", + "id": 2 + }, + "engine": { + "type": "Engine", + "id": 3 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "resultSizeBytes": { + "type": "int64", + "id": 5 + }, + "dataProcessedBytes": { + "type": "int64", + "id": 6 + } + }, + "nested": { + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "SPARK_SQL": 1, + "BIGQUERY": 2 + } + } + } + } + } + }, + "GovernanceEvent": { + "oneofs": { + "_entity": { + "oneof": [ + "entity" + ] + } + }, + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "eventType": { + "type": "EventType", + "id": 2 + }, + "entity": { + "type": "Entity", + "id": 3, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "Entity": { + "fields": { + "entity": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "entityType": { + "type": "EntityType", + "id": 2 + } + }, + "nested": { + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + } + } + }, + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "RESOURCE_IAM_POLICY_UPDATE": 1, + "BIGQUERY_TABLE_CREATE": 2, + "BIGQUERY_TABLE_UPDATE": 3, + "BIGQUERY_TABLE_DELETE": 4, + "BIGQUERY_CONNECTION_CREATE": 5, + "BIGQUERY_CONNECTION_UPDATE": 6, + "BIGQUERY_CONNECTION_DELETE": 7, + "BIGQUERY_TAXONOMY_CREATE": 10, + "BIGQUERY_POLICY_TAG_CREATE": 11, + "BIGQUERY_POLICY_TAG_DELETE": 12, + "BIGQUERY_POLICY_TAG_SET_IAM_POLICY": 13, + "ACCESS_POLICY_UPDATE": 14, + "GOVERNANCE_RULE_MATCHED_RESOURCES": 15, + "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS": 16, + "GOVERNANCE_RULE_ERRORS": 17, + "GOVERNANCE_RULE_PROCESSING": 18 + } + } + } + }, + "DataScanEvent": { + "oneofs": { + "result": { + "oneof": [ + "dataProfile", + "dataQuality" + ] + }, + "appliedConfigs": { + "oneof": [ + "dataProfileConfigs", + "dataQualityConfigs" + ] + } + }, + "fields": { + "dataSource": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 12 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "type": { + "type": "ScanType", + "id": 5 + }, + "state": { + "type": "State", + "id": 6 + }, + "message": { + "type": "string", + "id": 7 + }, + "specVersion": { + "type": "string", + "id": 8 + }, + "trigger": { + "type": "Trigger", + "id": 9 + }, + "scope": { + "type": "Scope", + "id": 10 + }, + "dataProfile": { + "type": "DataProfileResult", + "id": 101 + }, + "dataQuality": { + "type": "DataQualityResult", + "id": 102 + }, + "dataProfileConfigs": { + "type": "DataProfileAppliedConfigs", + "id": 201 + }, + "dataQualityConfigs": { + "type": "DataQualityAppliedConfigs", + "id": 202 + }, + "postScanActionsResult": { + "type": "PostScanActionsResult", + "id": 11 + } + }, + "nested": { + "ScanType": { + "values": { + "SCAN_TYPE_UNSPECIFIED": 0, + "DATA_PROFILE": 1, + "DATA_QUALITY": 2, + "DATA_DISCOVERY": 4 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4, + "CREATED": 5 + } + }, + "Trigger": { + "values": { + "TRIGGER_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "SCHEDULE": 2 + } + }, + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "FULL": 1, + "INCREMENTAL": 2 + } + }, + "DataProfileResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + } + } + }, + "DataQualityResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + }, + "passed": { + "type": "bool", + "id": 2 + }, + "dimensionPassed": { + "keyType": "string", + "type": "bool", + "id": 3 + }, + "score": { + "type": "float", + "id": 4 + }, + "dimensionScore": { + "keyType": "string", + "type": "float", + "id": 5 + }, + "columnScore": { + "keyType": "string", + "type": "float", + "id": 6 + } + } + }, + "DataProfileAppliedConfigs": { + "fields": { + "samplingPercent": { + "type": "float", + "id": 1 + }, + "rowFilterApplied": { + "type": "bool", + "id": 2 + }, + "columnFilterApplied": { + "type": "bool", + "id": 3 + } + } + }, + "DataQualityAppliedConfigs": { + "fields": { + "samplingPercent": { + "type": "float", + "id": 1 + }, + "rowFilterApplied": { + "type": "bool", + "id": 2 + } + } + }, + "PostScanActionsResult": { + "fields": { + "bigqueryExportResult": { + "type": "BigQueryExportResult", + "id": 1 + } + }, + "nested": { + "BigQueryExportResult": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "SKIPPED": 3 + } + } + } + } + } + } + } + }, + "DataQualityScanRuleResult": { + "fields": { + "jobId": { + "type": "string", + "id": 1 + }, + "dataSource": { + "type": "string", + "id": 2 + }, + "column": { + "type": "string", + "id": 3 + }, + "ruleName": { + "type": "string", + "id": 4 + }, + "ruleType": { + "type": "RuleType", + "id": 5 + }, + "evalutionType": { + "type": "EvaluationType", + "id": 6 + }, + "ruleDimension": { + "type": "string", + "id": 7 + }, + "thresholdPercent": { + "type": "double", + "id": 8 + }, + "result": { + "type": "Result", + "id": 9 + }, + "evaluatedRowCount": { + "type": "int64", + "id": 10 + }, + "passedRowCount": { + "type": "int64", + "id": 11 + }, + "nullRowCount": { + "type": "int64", + "id": 12 + }, + "assertionRowCount": { + "type": "int64", + "id": 13 + } + }, + "nested": { + "RuleType": { + "values": { + "RULE_TYPE_UNSPECIFIED": 0, + "NON_NULL_EXPECTATION": 1, + "RANGE_EXPECTATION": 2, + "REGEX_EXPECTATION": 3, + "ROW_CONDITION_EXPECTATION": 4, + "SET_EXPECTATION": 5, + "STATISTIC_RANGE_EXPECTATION": 6, + "TABLE_CONDITION_EXPECTATION": 7, + "UNIQUENESS_EXPECTATION": 8, + "SQL_ASSERTION": 9 + } + }, + "EvaluationType": { + "values": { + "EVALUATION_TYPE_UNSPECIFIED": 0, + "PER_ROW": 1, + "AGGREGATE": 2 + } + }, + "Result": { + "values": { + "RESULT_UNSPECIFIED": 0, + "PASSED": 1, + "FAILED": 2 + } + } + } + }, + "MetadataService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEntity": { + "requestType": "CreateEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.http).body": "entity", + "(google.api.method_signature)": "parent,entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "body": "entity" + } + }, + { + "(google.api.method_signature)": "parent,entity" + } + ] + }, + "UpdateEntity": { + "requestType": "UpdateEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.http).body": "entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "body": "entity" + } + } + ] + }, + "DeleteEntity": { + "requestType": "DeleteEntityRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetEntity": { + "requestType": "GetEntityRequest", + "responseType": "Entity", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEntities": { + "requestType": "ListEntitiesRequest", + "responseType": "ListEntitiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePartition": { + "requestType": "CreatePartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.http).body": "partition", + "(google.api.method_signature)": "parent,partition" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "body": "partition" + } + }, + { + "(google.api.method_signature)": "parent,partition" + } + ] + }, + "DeletePartition": { + "requestType": "DeletePartitionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetPartition": { + "requestType": "GetPartitionRequest", + "responseType": "Partition", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPartitions": { + "requestType": "ListPartitionsRequest", + "responseType": "ListPartitionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateEntityRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "entity": { + "type": "Entity", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEntityRequest": { + "fields": { + "entity": { + "type": "Entity", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListEntitiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "TABLES": 1, + "FILESETS": 2 + } + } + } + }, + "ListEntitiesResponse": { + "fields": { + "entities": { + "rule": "repeated", + "type": "Entity", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEntityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "view": { + "type": "EntityView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "SCHEMA": 2, + "FULL": 4 + } + } + } + }, + "ListPartitionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreatePartitionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "partition": { + "type": "Partition", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeletePartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPartitionsResponse": { + "fields": { + "partitions": { + "rule": "repeated", + "type": "Partition", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPartitionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + } + } + }, + "Entity": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Entity", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "id": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 10, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "asset": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPath": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataPathPattern": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "catalogEntry": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "system": { + "type": "StorageSystem", + "id": 15, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "format": { + "type": "StorageFormat", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "compatibility": { + "type": "CompatibilityStatus", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "access": { + "type": "StorageAccess", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "schema": { + "type": "Schema", + "id": 50, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "CompatibilityStatus": { + "fields": { + "hiveMetastore": { + "type": "Compatibility", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bigquery": { + "type": "Compatibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Compatibility": { + "fields": { + "compatible": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reason": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + }, + "Partition": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Partition", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "userManaged": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionFields": { + "rule": "repeated", + "type": "PartitionField", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionStyle": { + "type": "PartitionStyle", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "BOOLEAN": 1, + "BYTE": 2, + "INT16": 3, + "INT32": 4, + "INT64": 5, + "FLOAT": 6, + "DOUBLE": 7, + "DECIMAL": 8, + "STRING": 9, + "BINARY": 10, + "TIMESTAMP": 11, + "DATE": 12, + "TIME": 13, + "RECORD": 14, + "NULL": 100 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "REQUIRED": 1, + "NULLABLE": 2, + "REPEATED": 3 + } + }, + "SchemaField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mode": { + "type": "Mode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PartitionField": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "PartitionStyle": { + "values": { + "PARTITION_STYLE_UNSPECIFIED": 0, + "HIVE_COMPATIBLE": 1 + } + } + } + }, + "StorageFormat": { + "oneofs": { + "options": { + "oneof": [ + "csv", + "json", + "iceberg" + ] + } + }, + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "compressionFormat": { + "type": "CompressionFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "csv": { + "type": "CsvOptions", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "json": { + "type": "JsonOptions", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "iceberg": { + "type": "IcebergOptions", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "headerRows": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "IcebergOptions": { + "fields": { + "metadataLocation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "PARQUET": 1, + "AVRO": 2, + "ORC": 3, + "CSV": 100, + "JSON": 101, + "IMAGE": 200, + "AUDIO": 201, + "VIDEO": 202, + "TEXT": 203, + "TFRECORD": 204, + "OTHER": 1000, + "UNKNOWN": 1001 + } + }, + "CompressionFormat": { + "values": { + "COMPRESSION_FORMAT_UNSPECIFIED": 0, + "GZIP": 2, + "BZIP2": 3 + } + } + } + }, + "StorageAccess": { + "fields": { + "read": { + "type": "AccessMode", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "AccessMode": { + "values": { + "ACCESS_MODE_UNSPECIFIED": 0, + "DIRECT": 1, + "MANAGED": 2 + } + } + } + }, + "StorageSystem": { + "values": { + "STORAGE_SYSTEM_UNSPECIFIED": 0, + "CLOUD_STORAGE": 1, + "BIGQUERY": 2 + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldInfoProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + } + } + }, + "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 + } + } + } + } + }, + "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-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js new file mode 100644 index 00000000000..ee4070058e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_CancelMetadataJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCancelMetadataJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.cancelMetadataJob(request); + console.log(response); + } + + callCancelMetadataJob(); + // [END dataplex_v1_generated_CatalogService_CancelMetadataJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js new file mode 100644 index 00000000000..9f5c8daf7c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, aspectTypeId, aspectType) { + // [START dataplex_v1_generated_CatalogService_CreateAspectType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the AspectType, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a Google Cloud region. + */ + // const parent = 'abc123' + /** + * Required. AspectType identifier. + */ + // const aspectTypeId = 'abc123' + /** + * Required. AspectType Resource. + */ + // const aspectType = {} + /** + * Optional. The service validates the request without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCreateAspectType() { + // Construct request + const request = { + parent, + aspectTypeId, + aspectType, + }; + + // Run request + const [operation] = await dataplexClient.createAspectType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAspectType(); + // [END dataplex_v1_generated_CatalogService_CreateAspectType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js new file mode 100644 index 00000000000..7878fa9880f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, entryId, entry) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + */ + // const parent = 'abc123' + /** + * Required. Entry identifier. It has to be unique within an Entry Group. + * Entries corresponding to Google Cloud resources use an Entry ID format + * based on full resource + * names (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a full resource name of the resource without the + * prefix double slashes in the API service name part of the full resource + * name. This allows retrieval of entries using their associated resource + * name. + * For example, if the full resource name of a resource is + * `//library.googleapis.com/shelves/shelf1/books/book2`, + * then the suggested entry_id is + * `library.googleapis.com/shelves/shelf1/books/book2`. + * It is also suggested to follow the same convention for entries + * corresponding to resources from providers or systems other than Google + * Cloud. + * The maximum size of the field is 4000 characters. + */ + // const entryId = 'abc123' + /** + * Required. Entry resource. + */ + // const entry = {} + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCreateEntry() { + // Construct request + const request = { + parent, + entryId, + entry, + }; + + // Run request + const response = await dataplexClient.createEntry(request); + console.log(response); + } + + callCreateEntry(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js new file mode 100644 index 00000000000..8280461ff74 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, entryGroupId, entryGroup) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the entryGroup, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. EntryGroup identifier. + */ + // const entryGroupId = 'abc123' + /** + * Required. EntryGroup Resource. + */ + // const entryGroup = {} + /** + * Optional. The service validates the request without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCreateEntryGroup() { + // Construct request + const request = { + parent, + entryGroupId, + entryGroup, + }; + + // Run request + const [operation] = await dataplexClient.createEntryGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEntryGroup(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js new file mode 100644 index 00000000000..a5a8dc17981 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, entryTypeId, entryType) { + // [START dataplex_v1_generated_CatalogService_CreateEntryType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the EntryType, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a Google Cloud region. + */ + // const parent = 'abc123' + /** + * Required. EntryType identifier. + */ + // const entryTypeId = 'abc123' + /** + * Required. EntryType Resource. + */ + // const entryType = {} + /** + * Optional. The service validates the request without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCreateEntryType() { + // Construct request + const request = { + parent, + entryTypeId, + entryType, + }; + + // Run request + const [operation] = await dataplexClient.createEntryType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEntryType(); + // [END dataplex_v1_generated_CatalogService_CreateEntryType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js new file mode 100644 index 00000000000..60f054aa53c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, metadataJob) { + // [START dataplex_v1_generated_CatalogService_CreateMetadataJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + */ + // const parent = 'abc123' + /** + * Required. The metadata job resource. + */ + // const metadataJob = {} + /** + * Optional. The metadata job ID. If not provided, a unique ID is generated + * with the prefix `metadata-job-`. + */ + // const metadataJobId = 'abc123' + /** + * Optional. The service validates the request without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callCreateMetadataJob() { + // Construct request + const request = { + parent, + metadataJob, + }; + + // Run request + const [operation] = await dataplexClient.createMetadataJob(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMetadataJob(); + // [END dataplex_v1_generated_CatalogService_CreateMetadataJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js new file mode 100644 index 00000000000..be62c1257f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_DeleteAspectType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the AspectType: + * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + */ + // const name = 'abc123' + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteAspectTypeRequest method returns an ABORTED error + * response. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callDeleteAspectType() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteAspectType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAspectType(); + // [END dataplex_v1_generated_CatalogService_DeleteAspectType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js new file mode 100644 index 00000000000..a03a81cc0c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callDeleteEntry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.deleteEntry(request); + console.log(response); + } + + callDeleteEntry(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js new file mode 100644 index 00000000000..68f864f6567 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the EntryGroup: + * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + */ + // const name = 'abc123' + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteEntryGroupRequest method returns an ABORTED error + * response. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callDeleteEntryGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteEntryGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEntryGroup(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js new file mode 100644 index 00000000000..a9600d68ee9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_DeleteEntryType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the EntryType: + * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + */ + // const name = 'abc123' + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteEntryTypeRequest method returns an ABORTED error response. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callDeleteEntryType() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteEntryType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEntryType(); + // [END dataplex_v1_generated_CatalogService_DeleteEntryType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js new file mode 100644 index 00000000000..d67d138832c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_GetAspectType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the AspectType: + * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callGetAspectType() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getAspectType(request); + console.log(response); + } + + callGetAspectType(); + // [END dataplex_v1_generated_CatalogService_GetAspectType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js new file mode 100644 index 00000000000..50dff5372ff --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + */ + // const name = 'abc123' + /** + * Optional. View to control which parts of an entry the service should + * return. + */ + // const view = {} + /** + * Optional. Limits the aspects returned to the provided aspect types. + * It only works for CUSTOM view. + */ + // const aspectTypes = ['abc','def'] + /** + * Optional. Limits the aspects returned to those associated with the provided + * paths within the Entry. It only works for CUSTOM view. + */ + // const paths = ['abc','def'] + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callGetEntry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntry(request); + console.log(response); + } + + callGetEntry(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js new file mode 100644 index 00000000000..0e7f5fe333c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the EntryGroup: + * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callGetEntryGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntryGroup(request); + console.log(response); + } + + callGetEntryGroup(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js new file mode 100644 index 00000000000..93ca21cf3a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_GetEntryType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the EntryType: + * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callGetEntryType() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntryType(request); + console.log(response); + } + + callGetEntryType(); + // [END dataplex_v1_generated_CatalogService_GetEntryType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js new file mode 100644 index 00000000000..14e7ffdbfeb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_CatalogService_GetMetadataJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the metadata job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callGetMetadataJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getMetadataJob(request); + console.log(response); + } + + callGetMetadataJob(); + // [END dataplex_v1_generated_CatalogService_GetMetadataJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js new file mode 100644 index 00000000000..7984ec990c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 dataplex_v1_generated_CatalogService_ListAspectTypes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the AspectType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of AspectTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAspectTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + */ + // const filter = 'abc123' + /** + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callListAspectTypes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listAspectTypesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAspectTypes(); + // [END dataplex_v1_generated_CatalogService_ListAspectTypes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js new file mode 100644 index 00000000000..7f2bc294577 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js @@ -0,0 +1,94 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + */ + // const parent = 'abc123' + /** + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * * entry_type + * * entry_source.display_name + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * You can use the logical operators AND, OR, NOT in the filter. + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * Example filter expressions: + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callListEntries() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listEntriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntries(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js new file mode 100644 index 00000000000..594addd7df7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_CatalogService_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 resource name of the entryGroup location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of EntryGroups to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntryGroups` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callListEntryGroups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listEntryGroupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntryGroups(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js new file mode 100644 index 00000000000..d6d9e6108ea --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 dataplex_v1_generated_CatalogService_ListEntryTypes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the EntryType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of EntryTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntryTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + */ + // const filter = 'abc123' + /** + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callListEntryTypes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listEntryTypesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntryTypes(); + // [END dataplex_v1_generated_CatalogService_ListEntryTypes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js new file mode 100644 index 00000000000..6044ee627ab --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js @@ -0,0 +1,92 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_CatalogService_ListMetadataJobs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + */ + // const pageSize = 1234 + /** + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * You can combine filters with `AND`, `OR`, and `NOT` operators. + */ + // const filter = 'abc123' + /** + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callListMetadataJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listMetadataJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMetadataJobs(); + // [END dataplex_v1_generated_CatalogService_ListMetadataJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js new file mode 100644 index 00000000000..67cb293c769 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js @@ -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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, entry) { + // [START dataplex_v1_generated_CatalogService_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. + */ + /** + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + */ + // const name = 'abc123' + /** + * Optional. View to control which parts of an entry the service should + * return. + */ + // const view = {} + /** + * Optional. Limits the aspects returned to the provided aspect types. + * It only works for CUSTOM view. + */ + // const aspectTypes = ['abc','def'] + /** + * Optional. Limits the aspects returned to those associated with the provided + * paths within the Entry. It only works for CUSTOM view. + */ + // const paths = ['abc','def'] + /** + * Required. The resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + */ + // const entry = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callLookupEntry() { + // Construct request + const request = { + name, + entry, + }; + + // Run request + const response = await dataplexClient.lookupEntry(request); + console.log(response); + } + + callLookupEntry(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js new file mode 100644 index 00000000000..d2a3d980ded --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js @@ -0,0 +1,91 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, query) { + // [START dataplex_v1_generated_CatalogService_SearchEntries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + */ + // const name = 'abc123' + /** + * Required. The query against which entries in scope should be matched. + */ + // const query = 'abc123' + /** + * 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. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + /** + * Optional. Specifies the ordering of results. + */ + // const orderBy = 'abc123' + /** + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. + */ + // const scope = 'abc123' + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callSearchEntries() { + // Construct request + const request = { + name, + query, + }; + + // Run request + const iterable = dataplexClient.searchEntriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchEntries(); + // [END dataplex_v1_generated_CatalogService_SearchEntries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js new file mode 100644 index 00000000000..6b1e17cbce2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(aspectType, updateMask) { + // [START dataplex_v1_generated_CatalogService_UpdateAspectType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. AspectType Resource + */ + // const aspectType = {} + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callUpdateAspectType() { + // Construct request + const request = { + aspectType, + updateMask, + }; + + // Run request + const [operation] = await dataplexClient.updateAspectType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAspectType(); + // [END dataplex_v1_generated_CatalogService_UpdateAspectType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js new file mode 100644 index 00000000000..b8eb05b145e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js @@ -0,0 +1,97 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 dataplex_v1_generated_CatalogService_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. Entry resource. + */ + // const entry = {} + /** + * Optional. Mask of fields to update. To update Aspects, the update_mask must + * contain the value "aspects". + * If the update_mask is empty, the service will update all modifiable fields + * present in the request. + */ + // const updateMask = {} + /** + * Optional. If set to true and the entry doesn't exist, the service will + * create it. + */ + // const allowMissing = true + /** + * Optional. If set to true and the aspect_keys specify aspect ranges, the + * service deletes any existing aspects from that range that weren't provided + * in the request. + */ + // const deleteMissingAspects = true + /** + * Optional. The map keys of the Aspects which the service should modify. It + * supports the following syntaxes: + * * `` - matches an aspect of the given type and empty + * path. + * * `@path` - matches an aspect of the given type and + * specified path. For example, to attach an aspect to a field that is + * specified by the `schema` aspect, the path should have the format + * `Schema.`. + * * `*` - matches aspects of the given type for all + * paths. + * * `*@path` - matches aspects of all types on the given path. + * The service will not remove existing aspects matching the syntax unless + * `delete_missing_aspects` is set to true. + * If this field is left empty, the service treats it as specifying + * exactly those Aspects present in the request. + */ + // const aspectKeys = ['abc','def'] + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callUpdateEntry() { + // Construct request + const request = { + entry, + }; + + // Run request + const response = await dataplexClient.updateEntry(request); + console.log(response); + } + + callUpdateEntry(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js new file mode 100644 index 00000000000..ecdf55324b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entryGroup, updateMask) { + // [START dataplex_v1_generated_CatalogService_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. EntryGroup Resource. + */ + // const entryGroup = {} + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Optional. The service validates the request, without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callUpdateEntryGroup() { + // Construct request + const request = { + entryGroup, + updateMask, + }; + + // Run request + const [operation] = await dataplexClient.updateEntryGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEntryGroup(); + // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js new file mode 100644 index 00000000000..6b8ab21e781 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entryType, updateMask) { + // [START dataplex_v1_generated_CatalogService_UpdateEntryType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. EntryType Resource. + */ + // const entryType = {} + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Optional. The service validates the request without performing any + * mutations. The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new CatalogServiceClient(); + + async function callUpdateEntryType() { + // Construct request + const request = { + entryType, + updateMask, + }; + + // Run request + const [operation] = await dataplexClient.updateEntryType(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEntryType(); + // [END dataplex_v1_generated_CatalogService_UpdateEntryType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js new file mode 100644 index 00000000000..88cff8bc82e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, content) { + // [START dataplex_v1_generated_ContentService_CreateContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Required. Content resource. + */ + // const content = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callCreateContent() { + // Construct request + const request = { + parent, + content, + }; + + // Run request + const response = await dataplexClient.createContent(request); + console.log(response); + } + + callCreateContent(); + // [END dataplex_v1_generated_ContentService_CreateContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js new file mode 100644 index 00000000000..832fb2ab7d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_ContentService_DeleteContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callDeleteContent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.deleteContent(request); + console.log(response); + } + + callDeleteContent(); + // [END dataplex_v1_generated_ContentService_DeleteContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js new file mode 100644 index 00000000000..3e9a34c6492 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_ContentService_GetContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + */ + // const name = 'abc123' + /** + * Optional. Specify content view to make a partial request. + */ + // const view = {} + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callGetContent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getContent(request); + console.log(response); + } + + callGetContent(); + // [END dataplex_v1_generated_ContentService_GetContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js new file mode 100644 index 00000000000..11d73bf6398 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START dataplex_v1_generated_ContentService_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 Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await dataplexClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.list_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js new file mode 100644 index 00000000000..6ca7fc6b45d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_ContentService_ListContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callListContent() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listContentAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListContent(); + // [END dataplex_v1_generated_ContentService_ListContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js new file mode 100644 index 00000000000..ec86722bce1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START dataplex_v1_generated_ContentService_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 Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await dataplexClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js new file mode 100644 index 00000000000..b4c66a3da57 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START dataplex_v1_generated_ContentService_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 Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await dataplexClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.update_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js new file mode 100644 index 00000000000..8c3d748a88b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, content) { + // [START dataplex_v1_generated_ContentService_UpdateContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const content = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {ContentServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new ContentServiceClient(); + + async function callUpdateContent() { + // Construct request + const request = { + updateMask, + content, + }; + + // Run request + const response = await dataplexClient.updateContent(request); + console.log(response); + } + + callUpdateContent(); + // [END dataplex_v1_generated_ContentService_UpdateContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js new file mode 100644 index 00000000000..a3047036d18 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, dataScan, dataScanId) { + // [START dataplex_v1_generated_DataScanService_CreateDataScan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. DataScan resource. + */ + // const dataScan = {} + /** + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + */ + // const dataScanId = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callCreateDataScan() { + // Construct request + const request = { + parent, + dataScan, + dataScanId, + }; + + // Run request + const [operation] = await dataplexClient.createDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataScan(); + // [END dataplex_v1_generated_DataScanService_CreateDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js new file mode 100644 index 00000000000..fdbd0d18eeb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataScanService_DeleteDataScan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callDeleteDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataScan(); + // [END dataplex_v1_generated_DataScanService_DeleteDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js new file mode 100644 index 00000000000..34f43533abb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 must be one of the following: + * * The name of a data scan with at least one successful, completed data + * profiling job + * * The name of a successful, completed data profiling job (a data scan job + * where the job type is data profiling) + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callGenerateDataQualityRules() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.generateDataQualityRules(request); + console.log(response); + } + + callGenerateDataQualityRules(); + // [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js new file mode 100644 index 00000000000..5a9642bc214 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataScanService_GetDataScan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + /** + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callGetDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataScan(request); + console.log(response); + } + + callGetDataScan(); + // [END dataplex_v1_generated_DataScanService_GetDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js new file mode 100644 index 00000000000..506a56e8e80 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataScanService_GetDataScanJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + /** + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callGetDataScanJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataScanJob(request); + console.log(response); + } + + callGetDataScanJob(); + // [END dataplex_v1_generated_DataScanService_GetDataScanJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js new file mode 100644 index 00000000000..ff5e026674b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js @@ -0,0 +1,95 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataScanService_ListDataScanJobs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * Allowed fields are: + * - `start_time` + * - `end_time` + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callListDataScanJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listDataScanJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataScanJobs(); + // [END dataplex_v1_generated_DataScanService_ListDataScanJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js new file mode 100644 index 00000000000..9907d0d8a84 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js @@ -0,0 +1,88 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataScanService_ListDataScans_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callListDataScans() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listDataScansAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataScans(); + // [END dataplex_v1_generated_DataScanService_ListDataScans_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js new file mode 100644 index 00000000000..410e2e8d15a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataScanService_RunDataScan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * Only **OnDemand** data scans are allowed. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callRunDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.runDataScan(request); + console.log(response); + } + + callRunDataScan(); + // [END dataplex_v1_generated_DataScanService_RunDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js new file mode 100644 index 00000000000..a1ff3edbf48 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataScan, updateMask) { + // [START dataplex_v1_generated_DataScanService_UpdateDataScan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. DataScan resource to be updated. + * Only fields specified in `update_mask` are updated. + */ + // const dataScan = {} + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callUpdateDataScan() { + // Construct request + const request = { + dataScan, + updateMask, + }; + + // Run request + const [operation] = await dataplexClient.updateDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataScan(); + // [END dataplex_v1_generated_DataScanService_UpdateDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js new file mode 100644 index 00000000000..ea7ed823838 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js @@ -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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, dataAttributeId, dataAttribute) { + // [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + */ + // const parent = 'abc123' + /** + * Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + */ + // const dataAttributeId = 'abc123' + /** + * Required. DataAttribute resource. + */ + // const dataAttribute = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callCreateDataAttribute() { + // Construct request + const request = { + parent, + dataAttributeId, + dataAttribute, + }; + + // Run request + const [operation] = await dataplexClient.createDataAttribute(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataAttribute(); + // [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js new file mode 100644 index 00000000000..c76700164b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js @@ -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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, dataAttributeBindingId, dataAttributeBinding) { + // [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + */ + // const parent = 'abc123' + /** + * Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + */ + // const dataAttributeBindingId = 'abc123' + /** + * Required. DataAttributeBinding resource. + */ + // const dataAttributeBinding = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callCreateDataAttributeBinding() { + // Construct request + const request = { + parent, + dataAttributeBindingId, + dataAttributeBinding, + }; + + // Run request + const [operation] = await dataplexClient.createDataAttributeBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataAttributeBinding(); + // [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js new file mode 100644 index 00000000000..2e4cd38d232 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, dataTaxonomyId, dataTaxonomy) { + // [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + */ + // const dataTaxonomyId = 'abc123' + /** + * Required. DataTaxonomy resource. + */ + // const dataTaxonomy = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callCreateDataTaxonomy() { + // Construct request + const request = { + parent, + dataTaxonomyId, + dataTaxonomy, + }; + + // Run request + const [operation] = await dataplexClient.createDataTaxonomy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataTaxonomy(); + // [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js new file mode 100644 index 00000000000..2b11f86cbfc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + */ + // const name = 'abc123' + /** + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callDeleteDataAttribute() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteDataAttribute(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataAttribute(); + // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js new file mode 100644 index 00000000000..517371a0777 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, etag) { + // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + */ + // const name = 'abc123' + /** + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callDeleteDataAttributeBinding() { + // Construct request + const request = { + name, + etag, + }; + + // Run request + const [operation] = await dataplexClient.deleteDataAttributeBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataAttributeBinding(); + // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js new file mode 100644 index 00000000000..6c3827fcaeb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + */ + // const name = 'abc123' + /** + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callDeleteDataTaxonomy() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteDataTaxonomy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataTaxonomy(); + // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js new file mode 100644 index 00000000000..d5b719fc1d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callGetDataAttribute() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataAttribute(request); + console.log(response); + } + + callGetDataAttribute(); + // [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js new file mode 100644 index 00000000000..9085c21f040 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callGetDataAttributeBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataAttributeBinding(request); + console.log(response); + } + + callGetDataAttributeBinding(); + // [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js new file mode 100644 index 00000000000..bcca5a65396 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callGetDataTaxonomy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataTaxonomy(request); + console.log(response); + } + + callGetDataTaxonomy(); + // [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js new file mode 100644 index 00000000000..1fa010d1e8d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js @@ -0,0 +1,90 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` must match the + * call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callListDataAttributeBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listDataAttributeBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataAttributeBindings(); + // [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js new file mode 100644 index 00000000000..7d126c61f99 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callListDataAttributes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listDataAttributesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataAttributes(); + // [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js new file mode 100644 index 00000000000..cbc2328e142 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callListDataTaxonomies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listDataTaxonomiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataTaxonomies(); + // [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js new file mode 100644 index 00000000000..e881ec18650 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, dataAttribute) { + // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Only fields specified in `update_mask` are updated. + */ + // const dataAttribute = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callUpdateDataAttribute() { + // Construct request + const request = { + updateMask, + dataAttribute, + }; + + // Run request + const [operation] = await dataplexClient.updateDataAttribute(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataAttribute(); + // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js new file mode 100644 index 00000000000..027d4cd3b82 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, dataAttributeBinding) { + // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Only fields specified in `update_mask` are updated. + */ + // const dataAttributeBinding = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callUpdateDataAttributeBinding() { + // Construct request + const request = { + updateMask, + dataAttributeBinding, + }; + + // Run request + const [operation] = await dataplexClient.updateDataAttributeBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataAttributeBinding(); + // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js new file mode 100644 index 00000000000..58f476aff67 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, dataTaxonomy) { + // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Only fields specified in `update_mask` are updated. + */ + // const dataTaxonomy = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataTaxonomyServiceClient(); + + async function callUpdateDataTaxonomy() { + // Construct request + const request = { + updateMask, + dataTaxonomy, + }; + + // Run request + const [operation] = await dataplexClient.updateDataTaxonomy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataTaxonomy(); + // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js new file mode 100644 index 00000000000..f04b5cc5eba --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_CancelJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCancelJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.cancelJob(request); + console.log(response); + } + + callCancelJob(); + // [END dataplex_v1_generated_DataplexService_CancelJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js new file mode 100644 index 00000000000..3634e2ad50a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, assetId, asset) { + // [START dataplex_v1_generated_DataplexService_CreateAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + */ + // const assetId = 'abc123' + /** + * Required. Asset resource. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateAsset() { + // Construct request + const request = { + parent, + assetId, + asset, + }; + + // Run request + const [operation] = await dataplexClient.createAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAsset(); + // [END dataplex_v1_generated_DataplexService_CreateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js new file mode 100644 index 00000000000..269b372ca28 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js @@ -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 +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, environmentId, environment) { + // [START dataplex_v1_generated_DataplexService_CreateEnvironment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + */ + // const environmentId = 'abc123' + /** + * Required. Environment resource. + */ + // const environment = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateEnvironment() { + // Construct request + const request = { + parent, + environmentId, + environment, + }; + + // Run request + const [operation] = await dataplexClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEnvironment(); + // [END dataplex_v1_generated_DataplexService_CreateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js new file mode 100644 index 00000000000..8876b055350 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, lakeId, lake) { + // [START dataplex_v1_generated_DataplexService_CreateLake_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + */ + // const lakeId = 'abc123' + /** + * Required. Lake resource + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateLake() { + // Construct request + const request = { + parent, + lakeId, + lake, + }; + + // Run request + const [operation] = await dataplexClient.createLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateLake(); + // [END dataplex_v1_generated_DataplexService_CreateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js new file mode 100644 index 00000000000..0903bf59a4f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, taskId, task) { + // [START dataplex_v1_generated_DataplexService_CreateTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Task identifier. + */ + // const taskId = 'abc123' + /** + * Required. Task resource. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateTask() { + // Construct request + const request = { + parent, + taskId, + task, + }; + + // Run request + const [operation] = await dataplexClient.createTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTask(); + // [END dataplex_v1_generated_DataplexService_CreateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js new file mode 100644 index 00000000000..b350112fa1e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, zoneId, zone) { + // [START dataplex_v1_generated_DataplexService_CreateZone_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + */ + // const zoneId = 'abc123' + /** + * Required. Zone resource. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callCreateZone() { + // Construct request + const request = { + parent, + zoneId, + zone, + }; + + // Run request + const [operation] = await dataplexClient.createZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateZone(); + // [END dataplex_v1_generated_DataplexService_CreateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js new file mode 100644 index 00000000000..1ac115ecb35 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAsset(); + // [END dataplex_v1_generated_DataplexService_DeleteAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js new file mode 100644 index 00000000000..58a24f27eb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteEnvironment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteEnvironment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEnvironment(); + // [END dataplex_v1_generated_DataplexService_DeleteEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js new file mode 100644 index 00000000000..95c2e5214e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteLake_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteLake() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteLake(); + // [END dataplex_v1_generated_DataplexService_DeleteLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js new file mode 100644 index 00000000000..4e3571b1477 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteTask() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteTask(); + // [END dataplex_v1_generated_DataplexService_DeleteTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js new file mode 100644 index 00000000000..cfba3cf2c48 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_DeleteZone_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callDeleteZone() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteZone(); + // [END dataplex_v1_generated_DataplexService_DeleteZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js new file mode 100644 index 00000000000..df3b4531b0a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetAsset() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getAsset(request); + console.log(response); + } + + callGetAsset(); + // [END dataplex_v1_generated_DataplexService_GetAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js new file mode 100644 index 00000000000..db19c3b6d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetEnvironment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetEnvironment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEnvironment(request); + console.log(response); + } + + callGetEnvironment(); + // [END dataplex_v1_generated_DataplexService_GetEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js new file mode 100644 index 00000000000..83695490013 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getJob(request); + console.log(response); + } + + callGetJob(); + // [END dataplex_v1_generated_DataplexService_GetJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js new file mode 100644 index 00000000000..956687ba77e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetLake_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetLake() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getLake(request); + console.log(response); + } + + callGetLake(); + // [END dataplex_v1_generated_DataplexService_GetLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js new file mode 100644 index 00000000000..040e5c918b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getTask(request); + console.log(response); + } + + callGetTask(); + // [END dataplex_v1_generated_DataplexService_GetTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js new file mode 100644 index 00000000000..65347857025 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_GetZone_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callGetZone() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getZone(request); + console.log(response); + } + + callGetZone(); + // [END dataplex_v1_generated_DataplexService_GetZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js new file mode 100644 index 00000000000..478790a848a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssetActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssetActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listAssetActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssetActions(); + // [END dataplex_v1_generated_DataplexService_ListAssetActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js new file mode 100644 index 00000000000..92566694726 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListAssets_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListAssets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listAssetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAssets(); + // [END dataplex_v1_generated_DataplexService_ListAssets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js new file mode 100644 index 00000000000..50f38a27114 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListEnvironments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListEnvironments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEnvironments(); + // [END dataplex_v1_generated_DataplexService_ListEnvironments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js new file mode 100644 index 00000000000..9dce7612afb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListJobs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobs(); + // [END dataplex_v1_generated_DataplexService_ListJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js new file mode 100644 index 00000000000..10e0159f325 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakeActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakeActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listLakeActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakeActions(); + // [END dataplex_v1_generated_DataplexService_ListLakeActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js new file mode 100644 index 00000000000..99680c71e0f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js @@ -0,0 +1,85 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListLakes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListLakes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listLakesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListLakes(); + // [END dataplex_v1_generated_DataplexService_ListLakes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js new file mode 100644 index 00000000000..6b2489fd3d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js @@ -0,0 +1,88 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListSessions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * mode = ADMIN | USER + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListSessions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listSessionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSessions(); + // [END dataplex_v1_generated_DataplexService_ListSessions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js new file mode 100644 index 00000000000..fce1ffe161d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListTasks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListTasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listTasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTasks(); + // [END dataplex_v1_generated_DataplexService_ListTasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js new file mode 100644 index 00000000000..7e043a720db --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZoneActions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZoneActions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listZoneActionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZoneActions(); + // [END dataplex_v1_generated_DataplexService_ListZoneActions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js new file mode 100644 index 00000000000..1cc0e5bf291 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_DataplexService_ListZones_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callListZones() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listZonesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListZones(); + // [END dataplex_v1_generated_DataplexService_ListZones_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js new file mode 100644 index 00000000000..f6167a71666 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js @@ -0,0 +1,82 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_DataplexService_RunTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + */ + // const name = 'abc123' + /** + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + */ + // const labels = [1,2,3,4] + /** + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be empty. + */ + // const args = [1,2,3,4] + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callRunTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.runTask(request); + console.log(response); + } + + callRunTask(); + // [END dataplex_v1_generated_DataplexService_RunTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js new file mode 100644 index 00000000000..037a3cdb416 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, asset) { + // [START dataplex_v1_generated_DataplexService_UpdateAsset_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const asset = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateAsset() { + // Construct request + const request = { + updateMask, + asset, + }; + + // Run request + const [operation] = await dataplexClient.updateAsset(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAsset(); + // [END dataplex_v1_generated_DataplexService_UpdateAsset_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js new file mode 100644 index 00000000000..3aeab58822c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, environment) { + // [START dataplex_v1_generated_DataplexService_UpdateEnvironment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const environment = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateEnvironment() { + // Construct request + const request = { + updateMask, + environment, + }; + + // Run request + const [operation] = await dataplexClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEnvironment(); + // [END dataplex_v1_generated_DataplexService_UpdateEnvironment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js new file mode 100644 index 00000000000..dcf0b238495 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, lake) { + // [START dataplex_v1_generated_DataplexService_UpdateLake_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const lake = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateLake() { + // Construct request + const request = { + updateMask, + lake, + }; + + // Run request + const [operation] = await dataplexClient.updateLake(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateLake(); + // [END dataplex_v1_generated_DataplexService_UpdateLake_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js new file mode 100644 index 00000000000..17e32a7a66f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, task) { + // [START dataplex_v1_generated_DataplexService_UpdateTask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const task = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateTask() { + // Construct request + const request = { + updateMask, + task, + }; + + // Run request + const [operation] = await dataplexClient.updateTask(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateTask(); + // [END dataplex_v1_generated_DataplexService_UpdateTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js new file mode 100644 index 00000000000..3d2ad7a38a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, zone) { + // [START dataplex_v1_generated_DataplexService_UpdateZone_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + /** + * Required. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const zone = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callUpdateZone() { + // Construct request + const request = { + updateMask, + zone, + }; + + // Run request + const [operation] = await dataplexClient.updateZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateZone(); + // [END dataplex_v1_generated_DataplexService_UpdateZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js new file mode 100644 index 00000000000..098730ad285 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, entity) { + // [START dataplex_v1_generated_MetadataService_CreateEntity_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Entity resource. + */ + // const entity = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callCreateEntity() { + // Construct request + const request = { + parent, + entity, + }; + + // Run request + const response = await dataplexClient.createEntity(request); + console.log(response); + } + + callCreateEntity(); + // [END dataplex_v1_generated_MetadataService_CreateEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js new file mode 100644 index 00000000000..3152314d87d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, partition) { + // [START dataplex_v1_generated_MetadataService_CreatePartition_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const parent = 'abc123' + /** + * Required. Partition resource. + */ + // const partition = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callCreatePartition() { + // Construct request + const request = { + parent, + partition, + }; + + // Run request + const response = await dataplexClient.createPartition(request); + console.log(response); + } + + callCreatePartition(); + // [END dataplex_v1_generated_MetadataService_CreatePartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js new file mode 100644 index 00000000000..8d757a39cf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, etag) { + // [START dataplex_v1_generated_MetadataService_DeleteEntity_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const name = 'abc123' + /** + * Required. The etag associated with the entity, which can be retrieved with + * a GetEntity request. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callDeleteEntity() { + // Construct request + const request = { + name, + etag, + }; + + // Run request + const response = await dataplexClient.deleteEntity(request); + console.log(response); + } + + callDeleteEntity(); + // [END dataplex_v1_generated_MetadataService_DeleteEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js new file mode 100644 index 00000000000..115a87472c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_DeletePartition_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + */ + // const name = 'abc123' + /** + * Optional. The etag associated with the partition. + */ + // const etag = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callDeletePartition() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.deletePartition(request); + console.log(response); + } + + callDeletePartition(); + // [END dataplex_v1_generated_MetadataService_DeletePartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js new file mode 100644 index 00000000000..217959d5b97 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetEntity_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + */ + // const name = 'abc123' + /** + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetEntity() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getEntity(request); + console.log(response); + } + + callGetEntity(); + // [END dataplex_v1_generated_MetadataService_GetEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js new file mode 100644 index 00000000000..d2d7d512b9d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dataplex_v1_generated_MetadataService_GetPartition_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callGetPartition() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getPartition(request); + console.log(response); + } + + callGetPartition(); + // [END dataplex_v1_generated_MetadataService_GetPartition_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js new file mode 100644 index 00000000000..7a3de4ab2f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, view) { + // [START dataplex_v1_generated_MetadataService_ListEntities_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + */ + // const parent = 'abc123' + /** + * Required. Specify the entity view to make a partial list request. + */ + // const view = {} + /** + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListEntities() { + // Construct request + const request = { + parent, + view, + }; + + // Run request + const iterable = dataplexClient.listEntitiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEntities(); + // [END dataplex_v1_generated_MetadataService_ListEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js new file mode 100644 index 00000000000..1f91b49e053 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js @@ -0,0 +1,96 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dataplex_v1_generated_MetadataService_ListPartitions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * **Notes:** + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + */ + // const filter = 'abc123' + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callListPartitions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dataplexClient.listPartitionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPartitions(); + // [END dataplex_v1_generated_MetadataService_ListPartitions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js new file mode 100644 index 00000000000..a1c7ce1c3ca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(entity) { + // [START dataplex_v1_generated_MetadataService_UpdateEntity_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Update description. + */ + // const entity = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + */ + // const validateOnly = true + + // Imports the Dataplex library + const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new MetadataServiceClient(); + + async function callUpdateEntity() { + // Construct request + const request = { + entity, + }; + + // Run request + const response = await dataplexClient.updateEntity(request); + console.log(response); + } + + callUpdateEntity(); + // [END dataplex_v1_generated_MetadataService_UpdateEntity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json new file mode 100644 index 00000000000..b1497dcdec6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json @@ -0,0 +1,4763 @@ +{ + "clientLibrary": { + "name": "nodejs-dataplex", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryType_async", + "title": "CatalogService createEntryType Sample", + "origin": "API_DEFINITION", + "description": " Creates an EntryType.", + "canonical": true, + "file": "catalog_service.create_entry_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entry_type_id", + "type": "TYPE_STRING" + }, + { + "name": "entry_type", + "type": ".google.cloud.dataplex.v1.EntryType" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryType_async", + "title": "CatalogService updateEntryType Sample", + "origin": "API_DEFINITION", + "description": " Updates an EntryType.", + "canonical": true, + "file": "catalog_service.update_entry_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", + "async": true, + "parameters": [ + { + "name": "entry_type", + "type": ".google.cloud.dataplex.v1.EntryType" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "UpdateEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryType_async", + "title": "CatalogService deleteEntryType Sample", + "origin": "API_DEFINITION", + "description": " Deletes an EntryType.", + "canonical": true, + "file": "catalog_service.delete_entry_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "DeleteEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListEntryTypes_async", + "title": "CatalogService listEntryTypes Sample", + "origin": "API_DEFINITION", + "description": " Lists EntryType resources in a project and location.", + "canonical": true, + "file": "catalog_service.list_entry_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntryTypes", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEntryTypesResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListEntryTypes", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetEntryType_async", + "title": "CatalogService getEntryType Sample", + "origin": "API_DEFINITION", + "description": " Gets an EntryType.", + "canonical": true, + "file": "catalog_service.get_entry_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.EntryType", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetEntryType", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateAspectType_async", + "title": "CatalogService createAspectType Sample", + "origin": "API_DEFINITION", + "description": " Creates an AspectType.", + "canonical": true, + "file": "catalog_service.create_aspect_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "aspect_type_id", + "type": "TYPE_STRING" + }, + { + "name": "aspect_type", + "type": ".google.cloud.dataplex.v1.AspectType" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_UpdateAspectType_async", + "title": "CatalogService updateAspectType Sample", + "origin": "API_DEFINITION", + "description": " Updates an AspectType.", + "canonical": true, + "file": "catalog_service.update_aspect_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", + "async": true, + "parameters": [ + { + "name": "aspect_type", + "type": ".google.cloud.dataplex.v1.AspectType" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "UpdateAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_DeleteAspectType_async", + "title": "CatalogService deleteAspectType Sample", + "origin": "API_DEFINITION", + "description": " Deletes an AspectType.", + "canonical": true, + "file": "catalog_service.delete_aspect_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "DeleteAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListAspectTypes_async", + "title": "CatalogService listAspectTypes Sample", + "origin": "API_DEFINITION", + "description": " Lists AspectType resources in a project and location.", + "canonical": true, + "file": "catalog_service.list_aspect_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAspectTypes", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListAspectTypesResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListAspectTypes", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetAspectType_async", + "title": "CatalogService getAspectType Sample", + "origin": "API_DEFINITION", + "description": " Gets an AspectType.", + "canonical": true, + "file": "catalog_service.get_aspect_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetAspectType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.AspectType", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetAspectType", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetAspectType", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_async", + "title": "CatalogService createEntryGroup Sample", + "origin": "API_DEFINITION", + "description": " Creates an EntryGroup.", + "canonical": true, + "file": "catalog_service.create_entry_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entry_group_id", + "type": "TYPE_STRING" + }, + { + "name": "entry_group", + "type": ".google.cloud.dataplex.v1.EntryGroup" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_async", + "title": "CatalogService updateEntryGroup Sample", + "origin": "API_DEFINITION", + "description": " Updates an EntryGroup.", + "canonical": true, + "file": "catalog_service.update_entry_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", + "async": true, + "parameters": [ + { + "name": "entry_group", + "type": ".google.cloud.dataplex.v1.EntryGroup" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "UpdateEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_async", + "title": "CatalogService deleteEntryGroup Sample", + "origin": "API_DEFINITION", + "description": " Deletes an EntryGroup.", + "canonical": true, + "file": "catalog_service.delete_entry_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "DeleteEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListEntryGroups_async", + "title": "CatalogService listEntryGroups Sample", + "origin": "API_DEFINITION", + "description": " Lists EntryGroup resources in a project and location.", + "canonical": true, + "file": "catalog_service.list_entry_groups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntryGroups", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEntryGroupsResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListEntryGroups", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetEntryGroup_async", + "title": "CatalogService getEntryGroup Sample", + "origin": "API_DEFINITION", + "description": " Gets an EntryGroup.", + "canonical": true, + "file": "catalog_service.get_entry_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.EntryGroup", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetEntryGroup", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateEntry_async", + "title": "CatalogService createEntry Sample", + "origin": "API_DEFINITION", + "description": " Creates an Entry.", + "canonical": true, + "file": "catalog_service.create_entry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntry", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entry_id", + "type": "TYPE_STRING" + }, + { + "name": "entry", + "type": ".google.cloud.dataplex.v1.Entry" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entry", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntry", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntry_async", + "title": "CatalogService updateEntry Sample", + "origin": "API_DEFINITION", + "description": " Updates an Entry.", + "canonical": true, + "file": "catalog_service.update_entry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", + "async": true, + "parameters": [ + { + "name": "entry", + "type": ".google.cloud.dataplex.v1.Entry" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "delete_missing_aspects", + "type": "TYPE_BOOL" + }, + { + "name": "aspect_keys", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entry", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "UpdateEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntry_async", + "title": "CatalogService deleteEntry Sample", + "origin": "API_DEFINITION", + "description": " Deletes an Entry.", + "canonical": true, + "file": "catalog_service.delete_entry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entry", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "DeleteEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListEntries_async", + "title": "CatalogService listEntries Sample", + "origin": "API_DEFINITION", + "description": " Lists Entries within an EntryGroup.", + "canonical": true, + "file": "catalog_service.list_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntries", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntries", + "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.dataplex.v1.ListEntriesResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListEntries", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntries", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetEntry_async", + "title": "CatalogService getEntry Sample", + "origin": "API_DEFINITION", + "description": " Gets an Entry. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", + "canonical": true, + "file": "catalog_service.get_entry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.EntryView" + }, + { + "name": "aspect_types", + "type": "TYPE_STRING[]" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entry", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntry", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_LookupEntry_async", + "title": "CatalogService lookupEntry Sample", + "origin": "API_DEFINITION", + "description": " Looks up a single Entry by name using the permission on the source system. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", + "canonical": true, + "file": "catalog_service.lookup_entry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "LookupEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.LookupEntry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.EntryView" + }, + { + "name": "aspect_types", + "type": "TYPE_STRING[]" + }, + { + "name": "paths", + "type": "TYPE_STRING[]" + }, + { + "name": "entry", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entry", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "LookupEntry", + "fullName": "google.cloud.dataplex.v1.CatalogService.LookupEntry", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_SearchEntries_async", + "title": "CatalogService searchEntries Sample", + "origin": "API_DEFINITION", + "description": " Searches for Entries matching the given query and scope.", + "canonical": true, + "file": "catalog_service.search_entries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchEntries", + "fullName": "google.cloud.dataplex.v1.CatalogService.SearchEntries", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "query", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "scope", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.SearchEntriesResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "SearchEntries", + "fullName": "google.cloud.dataplex.v1.CatalogService.SearchEntries", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateMetadataJob_async", + "title": "CatalogService createMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.", + "canonical": true, + "file": "catalog_service.create_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "metadata_job", + "type": ".google.cloud.dataplex.v1.MetadataJob" + }, + { + "name": "metadata_job_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetMetadataJob_async", + "title": "CatalogService getMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Gets a metadata job.", + "canonical": true, + "file": "catalog_service.get_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.MetadataJob", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListMetadataJobs_async", + "title": "CatalogService listMetadataJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists metadata jobs.", + "canonical": true, + "file": "catalog_service.list_metadata_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMetadataJobs", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListMetadataJobsResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListMetadataJobs", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CancelMetadataJob_async", + "title": "CatalogService cancelMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Cancels a metadata job. If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.", + "canonical": true, + "file": "catalog_service.cancel_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CancelMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", + "title": "CatalogService createContent Sample", + "origin": "API_DEFINITION", + "description": " Create a content.", + "canonical": true, + "file": "content_service.create_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "CreateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_UpdateContent_async", + "title": "CatalogService updateContent Sample", + "origin": "API_DEFINITION", + "description": " Update a content. Only supports full resource update.", + "canonical": true, + "file": "content_service.update_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "content", + "type": ".google.cloud.dataplex.v1.Content" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "UpdateContent", + "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_DeleteContent_async", + "title": "CatalogService deleteContent Sample", + "origin": "API_DEFINITION", + "description": " Delete a content.", + "canonical": true, + "file": "content_service.delete_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "DeleteContent", + "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_GetContent_async", + "title": "CatalogService getContent Sample", + "origin": "API_DEFINITION", + "description": " Get a content resource.", + "canonical": true, + "file": "content_service.get_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetContentRequest.ContentView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Content", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "GetContent", + "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_GetIamPolicy_async", + "title": "CatalogService getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the access control policy for a contentitem 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. Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.", + "canonical": true, + "file": "content_service.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_SetIamPolicy_async", + "title": "CatalogService setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the access control policy on the specified contentitem resource. Replaces any existing policy. Caller must have Google IAM `dataplex.content.setIamPolicy` permission on the resource.", + "canonical": true, + "file": "content_service.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.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": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_TestIamPermissions_async", + "title": "CatalogService 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 (a `NOT_FOUND` error is not returned). A caller is not required to have Google IAM permission to make this request. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "canonical": true, + "file": "content_service.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", + "title": "CatalogService listContent Sample", + "origin": "API_DEFINITION", + "description": " List content.", + "canonical": true, + "file": "content_service.list_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "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.dataplex.v1.ListContentResponse", + "client": { + "shortName": "ContentServiceClient", + "fullName": "google.cloud.dataplex.v1.ContentServiceClient" + }, + "method": { + "shortName": "ListContent", + "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", + "service": { + "shortName": "ContentService", + "fullName": "google.cloud.dataplex.v1.ContentService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateLake_async", + "title": "CatalogService createLake Sample", + "origin": "API_DEFINITION", + "description": " Creates a lake resource.", + "canonical": true, + "file": "dataplex_service.create_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "lake_id", + "type": "TYPE_STRING" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateLake_async", + "title": "CatalogService updateLake Sample", + "origin": "API_DEFINITION", + "description": " Updates a lake resource.", + "canonical": true, + "file": "dataplex_service.update_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "lake", + "type": ".google.cloud.dataplex.v1.Lake" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteLake_async", + "title": "CatalogService deleteLake Sample", + "origin": "API_DEFINITION", + "description": " Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListLakes_async", + "title": "CatalogService listLakes Sample", + "origin": "API_DEFINITION", + "description": " Lists lake resources in a project and location.", + "canonical": true, + "file": "dataplex_service.list_lakes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListLakesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakes", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetLake_async", + "title": "CatalogService getLake Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a lake resource.", + "canonical": true, + "file": "dataplex_service.get_lake.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Lake", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetLake", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListLakeActions_async", + "title": "CatalogService listLakeActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_lake_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListLakeActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateZone_async", + "title": "CatalogService createZone Sample", + "origin": "API_DEFINITION", + "description": " Creates a zone resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "zone_id", + "type": "TYPE_STRING" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateZone_async", + "title": "CatalogService updateZone Sample", + "origin": "API_DEFINITION", + "description": " Updates a zone resource.", + "canonical": true, + "file": "dataplex_service.update_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "zone", + "type": ".google.cloud.dataplex.v1.Zone" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteZone_async", + "title": "CatalogService deleteZone Sample", + "origin": "API_DEFINITION", + "description": " Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", + "canonical": true, + "file": "dataplex_service.delete_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListZones_async", + "title": "CatalogService listZones Sample", + "origin": "API_DEFINITION", + "description": " Lists zone resources in a lake.", + "canonical": true, + "file": "dataplex_service.list_zones.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListZonesResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZones", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetZone_async", + "title": "CatalogService getZone Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a zone resource.", + "canonical": true, + "file": "dataplex_service.get_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Zone", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetZone", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListZoneActions_async", + "title": "CatalogService listZoneActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_zone_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListZoneActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateAsset_async", + "title": "CatalogService createAsset Sample", + "origin": "API_DEFINITION", + "description": " Creates an asset resource.", + "canonical": true, + "file": "dataplex_service.create_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "asset_id", + "type": "TYPE_STRING" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateAsset_async", + "title": "CatalogService updateAsset Sample", + "origin": "API_DEFINITION", + "description": " Updates an asset resource.", + "canonical": true, + "file": "dataplex_service.update_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "asset", + "type": ".google.cloud.dataplex.v1.Asset" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteAsset_async", + "title": "CatalogService deleteAsset Sample", + "origin": "API_DEFINITION", + "description": " Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", + "canonical": true, + "file": "dataplex_service.delete_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListAssets_async", + "title": "CatalogService listAssets Sample", + "origin": "API_DEFINITION", + "description": " Lists asset resources in a zone.", + "canonical": true, + "file": "dataplex_service.list_assets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListAssetsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssets", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetAsset_async", + "title": "CatalogService getAsset Sample", + "origin": "API_DEFINITION", + "description": " Retrieves an asset resource.", + "canonical": true, + "file": "dataplex_service.get_asset.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Asset", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetAsset", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListAssetActions_async", + "title": "CatalogService listAssetActions Sample", + "origin": "API_DEFINITION", + "description": " Lists action resources in an asset.", + "canonical": true, + "file": "dataplex_service.list_asset_actions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListAssetActions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateTask_async", + "title": "CatalogService createTask Sample", + "origin": "API_DEFINITION", + "description": " Creates a task resource within a lake.", + "canonical": true, + "file": "dataplex_service.create_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "task_id", + "type": "TYPE_STRING" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateTask_async", + "title": "CatalogService updateTask Sample", + "origin": "API_DEFINITION", + "description": " Update the task resource.", + "canonical": true, + "file": "dataplex_service.update_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "task", + "type": ".google.cloud.dataplex.v1.Task" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteTask_async", + "title": "CatalogService deleteTask Sample", + "origin": "API_DEFINITION", + "description": " Delete the task resource.", + "canonical": true, + "file": "dataplex_service.delete_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListTasks_async", + "title": "CatalogService listTasks Sample", + "origin": "API_DEFINITION", + "description": " Lists tasks under the given lake.", + "canonical": true, + "file": "dataplex_service.list_tasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListTasksResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListTasks", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetTask_async", + "title": "CatalogService getTask Sample", + "origin": "API_DEFINITION", + "description": " Get task resource.", + "canonical": true, + "file": "dataplex_service.get_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Task", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListJobs_async", + "title": "CatalogService listJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists Jobs under the given task.", + "canonical": true, + "file": "dataplex_service.list_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListJobsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListJobs", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_RunTask_async", + "title": "CatalogService runTask Sample", + "origin": "API_DEFINITION", + "description": " Run an on demand execution of a Task.", + "canonical": true, + "file": "dataplex_service.run_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "labels", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "args", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.dataplex.v1.RunTaskResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "RunTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", + "title": "CatalogService getJob Sample", + "origin": "API_DEFINITION", + "description": " Get job resource.", + "canonical": true, + "file": "dataplex_service.get_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Job", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CancelJob_async", + "title": "CatalogService cancelJob Sample", + "origin": "API_DEFINITION", + "description": " Cancel jobs running for the task resource.", + "canonical": true, + "file": "dataplex_service.cancel_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CancelJob", + "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_CreateEnvironment_async", + "title": "CatalogService createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create an environment resource.", + "canonical": true, + "file": "dataplex_service.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment_id", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_async", + "title": "CatalogService updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update the environment resource.", + "canonical": true, + "file": "dataplex_service.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "environment", + "type": ".google.cloud.dataplex.v1.Environment" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_async", + "title": "CatalogService deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", + "canonical": true, + "file": "dataplex_service.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListEnvironments_async", + "title": "CatalogService listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " Lists environments under the given lake.", + "canonical": true, + "file": "dataplex_service.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEnvironmentsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_GetEnvironment_async", + "title": "CatalogService getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get environment resource.", + "canonical": true, + "file": "dataplex_service.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Environment", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataplexService_ListSessions_async", + "title": "CatalogService listSessions Sample", + "origin": "API_DEFINITION", + "description": " Lists session resources in an environment.", + "canonical": true, + "file": "dataplex_service.list_sessions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "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.dataplex.v1.ListSessionsResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "ListSessions", + "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_CreateDataScan_async", + "title": "CatalogService createDataScan Sample", + "origin": "API_DEFINITION", + "description": " Creates a DataScan resource.", + "canonical": true, + "file": "data_scan_service.create_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_scan", + "type": ".google.cloud.dataplex.v1.DataScan" + }, + { + "name": "data_scan_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "CreateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_UpdateDataScan_async", + "title": "CatalogService updateDataScan Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataScan resource.", + "canonical": true, + "file": "data_scan_service.update_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "async": true, + "parameters": [ + { + "name": "data_scan", + "type": ".google.cloud.dataplex.v1.DataScan" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "UpdateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_DeleteDataScan_async", + "title": "CatalogService deleteDataScan Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataScan resource.", + "canonical": true, + "file": "data_scan_service.delete_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "DeleteDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_GetDataScan_async", + "title": "CatalogService getDataScan Sample", + "origin": "API_DEFINITION", + "description": " Gets a DataScan resource.", + "canonical": true, + "file": "data_scan_service.get_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataScan", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "GetDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_ListDataScans_async", + "title": "CatalogService listDataScans Sample", + "origin": "API_DEFINITION", + "description": " Lists DataScans.", + "canonical": true, + "file": "data_scan_service.list_data_scans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataScans", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataScansResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "ListDataScans", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_RunDataScan_async", + "title": "CatalogService runDataScan Sample", + "origin": "API_DEFINITION", + "description": " Runs an on-demand execution of a DataScan", + "canonical": true, + "file": "data_scan_service.run_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.RunDataScanResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "RunDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_GetDataScanJob_async", + "title": "CatalogService getDataScanJob Sample", + "origin": "API_DEFINITION", + "description": " Gets a DataScanJob resource.", + "canonical": true, + "file": "data_scan_service.get_data_scan_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataScanJob", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataScanJob", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "GetDataScanJob", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_async", + "title": "CatalogService listDataScanJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists DataScanJobs under the given DataScan.", + "canonical": true, + "file": "data_scan_service.list_data_scan_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataScanJobs", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "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.dataplex.v1.ListDataScanJobsResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "ListDataScanJobs", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async", + "title": "CatalogService generateDataQualityRules Sample", + "origin": "API_DEFINITION", + "description": " Generates recommended data quality rules based on the results of a data profiling scan. Use the recommendations to build rules for a data quality scan.", + "canonical": true, + "file": "data_scan_service.generate_data_quality_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateDataQualityRules", + "fullName": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "GenerateDataQualityRules", + "fullName": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async", + "title": "CatalogService createDataTaxonomy Sample", + "origin": "API_DEFINITION", + "description": " Create a DataTaxonomy resource.", + "canonical": true, + "file": "data_taxonomy_service.create_data_taxonomy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_taxonomy_id", + "type": "TYPE_STRING" + }, + { + "name": "data_taxonomy", + "type": ".google.cloud.dataplex.v1.DataTaxonomy" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "CreateDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async", + "title": "CatalogService updateDataTaxonomy Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataTaxonomy resource.", + "canonical": true, + "file": "data_taxonomy_service.update_data_taxonomy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_taxonomy", + "type": ".google.cloud.dataplex.v1.DataTaxonomy" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "UpdateDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async", + "title": "CatalogService deleteDataTaxonomy Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before the DataTaxonomy can be deleted.", + "canonical": true, + "file": "data_taxonomy_service.delete_data_taxonomy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "DeleteDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async", + "title": "CatalogService listDataTaxonomies Sample", + "origin": "API_DEFINITION", + "description": " Lists DataTaxonomy resources in a project and location.", + "canonical": true, + "file": "data_taxonomy_service.list_data_taxonomies.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataTaxonomies", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataTaxonomiesResponse", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "ListDataTaxonomies", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async", + "title": "CatalogService getDataTaxonomy Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a DataTaxonomy resource.", + "canonical": true, + "file": "data_taxonomy_service.get_data_taxonomy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataTaxonomy", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "GetDataTaxonomy", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async", + "title": "CatalogService createDataAttributeBinding Sample", + "origin": "API_DEFINITION", + "description": " Create a DataAttributeBinding resource.", + "canonical": true, + "file": "data_taxonomy_service.create_data_attribute_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_attribute_binding_id", + "type": "TYPE_STRING" + }, + { + "name": "data_attribute_binding", + "type": ".google.cloud.dataplex.v1.DataAttributeBinding" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "CreateDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async", + "title": "CatalogService updateDataAttributeBinding Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataAttributeBinding resource.", + "canonical": true, + "file": "data_taxonomy_service.update_data_attribute_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_attribute_binding", + "type": ".google.cloud.dataplex.v1.DataAttributeBinding" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "UpdateDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async", + "title": "CatalogService deleteDataAttributeBinding Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be deleted before the DataAttributeBinding can be deleted.", + "canonical": true, + "file": "data_taxonomy_service.delete_data_attribute_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "DeleteDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async", + "title": "CatalogService listDataAttributeBindings Sample", + "origin": "API_DEFINITION", + "description": " Lists DataAttributeBinding resources in a project and location.", + "canonical": true, + "file": "data_taxonomy_service.list_data_attribute_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataAttributeBindings", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "ListDataAttributeBindings", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async", + "title": "CatalogService getDataAttributeBinding Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a DataAttributeBinding resource.", + "canonical": true, + "file": "data_taxonomy_service.get_data_attribute_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataAttributeBinding", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "GetDataAttributeBinding", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async", + "title": "CatalogService createDataAttribute Sample", + "origin": "API_DEFINITION", + "description": " Create a DataAttribute resource.", + "canonical": true, + "file": "data_taxonomy_service.create_data_attribute.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_attribute_id", + "type": "TYPE_STRING" + }, + { + "name": "data_attribute", + "type": ".google.cloud.dataplex.v1.DataAttribute" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "CreateDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async", + "title": "CatalogService updateDataAttribute Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataAttribute resource.", + "canonical": true, + "file": "data_taxonomy_service.update_data_attribute.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_attribute", + "type": ".google.cloud.dataplex.v1.DataAttribute" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "UpdateDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async", + "title": "CatalogService deleteDataAttribute Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Data Attribute resource.", + "canonical": true, + "file": "data_taxonomy_service.delete_data_attribute.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "DeleteDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async", + "title": "CatalogService listDataAttributes Sample", + "origin": "API_DEFINITION", + "description": " Lists Data Attribute resources in a DataTaxonomy.", + "canonical": true, + "file": "data_taxonomy_service.list_data_attributes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataAttributes", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataAttributesResponse", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "ListDataAttributes", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async", + "title": "CatalogService getDataAttribute Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a Data Attribute resource.", + "canonical": true, + "file": "data_taxonomy_service.get_data_attribute.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataAttribute", + "client": { + "shortName": "DataTaxonomyServiceClient", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" + }, + "method": { + "shortName": "GetDataAttribute", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", + "service": { + "shortName": "DataTaxonomyService", + "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", + "title": "CatalogService createEntity Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata entity.", + "canonical": true, + "file": "metadata_service.create_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_UpdateEntity_async", + "title": "CatalogService updateEntity Sample", + "origin": "API_DEFINITION", + "description": " Update a metadata entity. Only supports full resource update.", + "canonical": true, + "file": "metadata_service.update_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "async": true, + "parameters": [ + { + "name": "entity", + "type": ".google.cloud.dataplex.v1.Entity" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "UpdateEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_DeleteEntity_async", + "title": "CatalogService deleteEntity Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata entity.", + "canonical": true, + "file": "metadata_service.delete_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeleteEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_GetEntity_async", + "title": "CatalogService getEntity Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata entity.", + "canonical": true, + "file": "metadata_service.get_entity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetEntityRequest.EntityView" + } + ], + "resultType": ".google.cloud.dataplex.v1.Entity", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetEntity", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_ListEntities_async", + "title": "CatalogService listEntities Sample", + "origin": "API_DEFINITION", + "description": " List metadata entities in a zone.", + "canonical": true, + "file": "metadata_service.list_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListEntitiesResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListEntities", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_CreatePartition_async", + "title": "CatalogService createPartition Sample", + "origin": "API_DEFINITION", + "description": " Create a metadata partition.", + "canonical": true, + "file": "metadata_service.create_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "partition", + "type": ".google.cloud.dataplex.v1.Partition" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "CreatePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_DeletePartition_async", + "title": "CatalogService deletePartition Sample", + "origin": "API_DEFINITION", + "description": " Delete a metadata partition.", + "canonical": true, + "file": "metadata_service.delete_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "DeletePartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_GetPartition_async", + "title": "CatalogService getPartition Sample", + "origin": "API_DEFINITION", + "description": " Get a metadata partition of an entity.", + "canonical": true, + "file": "metadata_service.get_partition.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.Partition", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "GetPartition", + "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_MetadataService_ListPartitions_async", + "title": "CatalogService listPartitions Sample", + "origin": "API_DEFINITION", + "description": " List metadata partitions of an entity.", + "canonical": true, + "file": "metadata_service.list_partitions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "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.dataplex.v1.ListPartitionsResponse", + "client": { + "shortName": "MetadataServiceClient", + "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" + }, + "method": { + "shortName": "ListPartitions", + "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "shortName": "MetadataService", + "fullName": "google.cloud.dataplex.v1.MetadataService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts new file mode 100644 index 00000000000..500f50c7e11 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts @@ -0,0 +1,35 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const CatalogServiceClient = v1.CatalogServiceClient; +type CatalogServiceClient = v1.CatalogServiceClient; +const ContentServiceClient = v1.ContentServiceClient; +type ContentServiceClient = v1.ContentServiceClient; +const DataplexServiceClient = v1.DataplexServiceClient; +type DataplexServiceClient = v1.DataplexServiceClient; +const DataScanServiceClient = v1.DataScanServiceClient; +type DataScanServiceClient = v1.DataScanServiceClient; +const DataTaxonomyServiceClient = v1.DataTaxonomyServiceClient; +type DataTaxonomyServiceClient = v1.DataTaxonomyServiceClient; +const MetadataServiceClient = v1.MetadataServiceClient; +type MetadataServiceClient = v1.MetadataServiceClient; +export {v1, CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient}; +export default {v1, CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts new file mode 100644 index 00000000000..ce0489240a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts @@ -0,0 +1,5390 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/catalog_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './catalog_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The primary resources offered by this service are EntryGroups, EntryTypes, + * AspectTypes, and Entries. They collectively let data administrators organize, + * manage, secure, and catalog data located across cloud projects in their + * organization in a variety of storage systems, including Cloud Storage and + * BigQuery. + * @class + * @memberof v1 + */ +export class CatalogServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + catalogServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CatalogServiceClient. + * + * @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 CatalogServiceClient({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 CatalogServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listEntryTypes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entryTypes'), + listAspectTypes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'aspectTypes'), + listEntryGroups: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entryGroups'), + listEntries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entries'), + searchEntries: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'), + listMetadataJobs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'metadataJobs') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createEntryTypeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.EntryType') as gax.protobuf.Type; + const createEntryTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateEntryTypeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.EntryType') as gax.protobuf.Type; + const updateEntryTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteEntryTypeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteEntryTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createAspectTypeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.AspectType') as gax.protobuf.Type; + const createAspectTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateAspectTypeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.AspectType') as gax.protobuf.Type; + const updateAspectTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAspectTypeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAspectTypeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createEntryGroupResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.EntryGroup') as gax.protobuf.Type; + const createEntryGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateEntryGroupResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.EntryGroup') as gax.protobuf.Type; + const updateEntryGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteEntryGroupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteEntryGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createMetadataJobResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.MetadataJob') as gax.protobuf.Type; + const createMetadataJobMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createEntryType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEntryTypeResponse.decode.bind(createEntryTypeResponse), + createEntryTypeMetadata.decode.bind(createEntryTypeMetadata)), + updateEntryType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEntryTypeResponse.decode.bind(updateEntryTypeResponse), + updateEntryTypeMetadata.decode.bind(updateEntryTypeMetadata)), + deleteEntryType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEntryTypeResponse.decode.bind(deleteEntryTypeResponse), + deleteEntryTypeMetadata.decode.bind(deleteEntryTypeMetadata)), + createAspectType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAspectTypeResponse.decode.bind(createAspectTypeResponse), + createAspectTypeMetadata.decode.bind(createAspectTypeMetadata)), + updateAspectType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAspectTypeResponse.decode.bind(updateAspectTypeResponse), + updateAspectTypeMetadata.decode.bind(updateAspectTypeMetadata)), + deleteAspectType: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAspectTypeResponse.decode.bind(deleteAspectTypeResponse), + deleteAspectTypeMetadata.decode.bind(deleteAspectTypeMetadata)), + createEntryGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEntryGroupResponse.decode.bind(createEntryGroupResponse), + createEntryGroupMetadata.decode.bind(createEntryGroupMetadata)), + updateEntryGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEntryGroupResponse.decode.bind(updateEntryGroupResponse), + updateEntryGroupMetadata.decode.bind(updateEntryGroupMetadata)), + deleteEntryGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEntryGroupResponse.decode.bind(deleteEntryGroupResponse), + deleteEntryGroupMetadata.decode.bind(deleteEntryGroupMetadata)), + createMetadataJob: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMetadataJobResponse.decode.bind(createMetadataJobResponse), + createMetadataJobMetadata.decode.bind(createMetadataJobMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.CatalogService', 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.catalogServiceStub) { + return this.catalogServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.CatalogService. + this.catalogServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.CatalogService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.CatalogService, + 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 catalogServiceStubMethods = + ['createEntryType', 'updateEntryType', 'deleteEntryType', 'listEntryTypes', 'getEntryType', 'createAspectType', 'updateAspectType', 'deleteAspectType', 'listAspectTypes', 'getAspectType', 'createEntryGroup', 'updateEntryGroup', 'deleteEntryGroup', 'listEntryGroups', 'getEntryGroup', 'createEntry', 'updateEntry', 'deleteEntry', 'listEntries', 'getEntry', 'lookupEntry', 'searchEntries', 'createMetadataJob', 'getMetadataJob', 'listMetadataJobs', 'cancelMetadataJob']; + for (const methodName of catalogServiceStubMethods) { + const callPromise = this.catalogServiceStub.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.catalogServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Gets an EntryType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the EntryType: + * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_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.dataplex.v1.EntryType|EntryType}. + * Please see the {@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/catalog_service.get_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_GetEntryType_async + */ + getEntryType( + request?: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|undefined, {}|undefined + ]>; + getEntryType( + request: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, + {}|null|undefined>): void; + getEntryType( + request: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, + {}|null|undefined>): void; + getEntryType( + request?: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryType, + protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getEntryType(request, options, callback); + } +/** + * Gets an AspectType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the AspectType: + * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_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.dataplex.v1.AspectType|AspectType}. + * Please see the {@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/catalog_service.get_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_GetAspectType_async + */ + getAspectType( + request?: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|undefined, {}|undefined + ]>; + getAspectType( + request: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, + {}|null|undefined>): void; + getAspectType( + request: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, + {}|null|undefined>): void; + getAspectType( + request?: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IAspectType, + protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getAspectType(request, options, callback); + } +/** + * Gets an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the EntryGroup: + * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.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/catalog_service.get_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_GetEntryGroup_async + */ + getEntryGroup( + request?: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|undefined, {}|undefined + ]>; + getEntryGroup( + request: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, + {}|null|undefined>): void; + getEntryGroup( + request: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, + {}|null|undefined>): void; + getEntryGroup( + request?: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryGroup, + protos.google.cloud.dataplex.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); + } +/** + * Creates an Entry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + * @param {string} request.entryId + * Required. Entry identifier. It has to be unique within an Entry Group. + * + * Entries corresponding to Google Cloud resources use an Entry ID format + * based on [full resource + * names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a full resource name of the resource without the + * prefix double slashes in the API service name part of the full resource + * name. This allows retrieval of entries using their associated resource + * name. + * + * For example, if the full resource name of a resource is + * `//library.googleapis.com/shelves/shelf1/books/book2`, + * then the suggested entry_id is + * `library.googleapis.com/shelves/shelf1/books/book2`. + * + * It is also suggested to follow the same convention for entries + * corresponding to resources from providers or systems other than Google + * Cloud. + * + * The maximum size of the field is 4000 characters. + * @param {google.cloud.dataplex.v1.Entry} request.entry + * Required. Entry resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.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/catalog_service.create_entry.js + * region_tag:dataplex_v1_generated_CatalogService_CreateEntry_async + */ + createEntry( + request?: protos.google.cloud.dataplex.v1.ICreateEntryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ICreateEntryRequest|undefined, {}|undefined + ]>; + createEntry( + request: protos.google.cloud.dataplex.v1.ICreateEntryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, + {}|null|undefined>): void; + createEntry( + request: protos.google.cloud.dataplex.v1.ICreateEntryRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, + {}|null|undefined>): void; + createEntry( + request?: protos.google.cloud.dataplex.v1.ICreateEntryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.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 Entry. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.Entry} request.entry + * Required. Entry resource. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Mask of fields to update. To update Aspects, the update_mask must + * contain the value "aspects". + * + * If the update_mask is empty, the service will update all modifiable fields + * present in the request. + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the entry doesn't exist, the service will + * create it. + * @param {boolean} [request.deleteMissingAspects] + * Optional. If set to true and the aspect_keys specify aspect ranges, the + * service deletes any existing aspects from that range that weren't provided + * in the request. + * @param {string[]} [request.aspectKeys] + * Optional. The map keys of the Aspects which the service should modify. It + * supports the following syntaxes: + * + * * `` - matches an aspect of the given type and empty + * path. + * * `@path` - matches an aspect of the given type and + * specified path. For example, to attach an aspect to a field that is + * specified by the `schema` aspect, the path should have the format + * `Schema.`. + * * `*` - matches aspects of the given type for all + * paths. + * * `*@path` - matches aspects of all types on the given path. + * + * The service will not remove existing aspects matching the syntax unless + * `delete_missing_aspects` is set to true. + * + * If this field is left empty, the service treats it as specifying + * exactly those Aspects present in the 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 an object representing {@link protos.google.cloud.dataplex.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/catalog_service.update_entry.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateEntry_async + */ + updateEntry( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IUpdateEntryRequest|undefined, {}|undefined + ]>; + updateEntry( + request: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, + {}|null|undefined>): void; + updateEntry( + request: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, + {}|null|undefined>): void; + updateEntry( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.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 Entry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.delete_entry.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteEntry_async + */ + deleteEntry( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IDeleteEntryRequest|undefined, {}|undefined + ]>; + deleteEntry( + request: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, + {}|null|undefined>): void; + deleteEntry( + request: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, + {}|null|undefined>): void; + deleteEntry( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.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. + * + * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + * changing. For more information, see [Changes to BigQuery metadata stored in + * Dataplex + * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + * @param {google.cloud.dataplex.v1.EntryView} [request.view] + * Optional. View to control which parts of an entry the service should + * return. + * @param {string[]} [request.aspectTypes] + * Optional. Limits the aspects returned to the provided aspect types. + * It only works for CUSTOM view. + * @param {string[]} [request.paths] + * Optional. Limits the aspects returned to those associated with the provided + * paths within the Entry. It only works for CUSTOM view. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.get_entry.js + * region_tag:dataplex_v1_generated_CatalogService_GetEntry_async + */ + getEntry( + request?: protos.google.cloud.dataplex.v1.IGetEntryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IGetEntryRequest|undefined, {}|undefined + ]>; + getEntry( + request: protos.google.cloud.dataplex.v1.IGetEntryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, + {}|null|undefined>): void; + getEntry( + request: protos.google.cloud.dataplex.v1.IGetEntryRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, + {}|null|undefined>): void; + getEntry( + request?: protos.google.cloud.dataplex.v1.IGetEntryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.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); + } +/** + * Looks up a single Entry by name using the permission on the source system. + * + * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + * changing. For more information, see [Changes to BigQuery metadata stored in + * Dataplex + * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + * @param {google.cloud.dataplex.v1.EntryView} [request.view] + * Optional. View to control which parts of an entry the service should + * return. + * @param {string[]} [request.aspectTypes] + * Optional. Limits the aspects returned to the provided aspect types. + * It only works for CUSTOM view. + * @param {string[]} [request.paths] + * Optional. Limits the aspects returned to those associated with the provided + * paths within the Entry. It only works for CUSTOM view. + * @param {string} request.entry + * Required. The resource name of the Entry: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.lookup_entry.js + * region_tag:dataplex_v1_generated_CatalogService_LookupEntry_async + */ + lookupEntry( + request?: protos.google.cloud.dataplex.v1.ILookupEntryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ILookupEntryRequest|undefined, {}|undefined + ]>; + lookupEntry( + request: protos.google.cloud.dataplex.v1.ILookupEntryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, + {}|null|undefined>): void; + lookupEntry( + request: protos.google.cloud.dataplex.v1.ILookupEntryRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, + {}|null|undefined>): void; + lookupEntry( + request?: protos.google.cloud.dataplex.v1.ILookupEntryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry, + protos.google.cloud.dataplex.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 || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.lookupEntry(request, options, callback); + } +/** + * Gets a metadata job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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.dataplex.v1.MetadataJob|MetadataJob}. + * Please see the {@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/catalog_service.get_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_GetMetadataJob_async + */ + getMetadataJob( + request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|undefined, {}|undefined + ]>; + getMetadataJob( + request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, + {}|null|undefined>): void; + getMetadataJob( + request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, + {}|null|undefined>): void; + getMetadataJob( + request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getMetadataJob(request, options, callback); + } +/** + * Cancels a metadata job. + * + * If you cancel a metadata import job that is in progress, the changes in the + * job might be partially applied. We recommend that you reset the state of + * the entry groups in your project by running another metadata job that + * reverts the changes from the canceled job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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/v1/catalog_service.cancel_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CancelMetadataJob_async + */ + cancelMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|undefined, {}|undefined + ]>; + cancelMetadataJob( + request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, + {}|null|undefined>): void; + cancelMetadataJob( + request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, + {}|null|undefined>): void; + cancelMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.cancelMetadataJob(request, options, callback); + } + +/** + * Creates an EntryType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the EntryType, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a Google Cloud region. + * @param {string} request.entryTypeId + * Required. EntryType identifier. + * @param {google.cloud.dataplex.v1.EntryType} request.entryType + * Required. EntryType Resource. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.create_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_CreateEntryType_async + */ + createEntryType( + request?: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createEntryType( + request: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEntryType( + request: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEntryType( + request?: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, + 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.createEntryType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createEntryType()`. + * @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/catalog_service.create_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_CreateEntryType_async + */ + async checkCreateEntryTypeProgress(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.createEntryType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an EntryType. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.EntryType} request.entryType + * Required. EntryType Resource. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.update_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryType_async + */ + updateEntryType( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateEntryType( + request: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEntryType( + request: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEntryType( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, + 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({ + 'entry_type.name': request.entryType!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEntryType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateEntryType()`. + * @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/catalog_service.update_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryType_async + */ + async checkUpdateEntryTypeProgress(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.updateEntryType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes an EntryType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the EntryType: + * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + * @param {string} [request.etag] + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteEntryTypeRequest method returns an ABORTED error response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is 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/catalog_service.delete_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryType_async + */ + deleteEntryType( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteEntryType( + request: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEntryType( + request: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEntryType( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteEntryType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteEntryType()`. + * @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/catalog_service.delete_entry_type.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryType_async + */ + async checkDeleteEntryTypeProgress(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.deleteEntryType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates an AspectType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the AspectType, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a Google Cloud region. + * @param {string} request.aspectTypeId + * Required. AspectType identifier. + * @param {google.cloud.dataplex.v1.AspectType} request.aspectType + * Required. AspectType Resource. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.create_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_CreateAspectType_async + */ + createAspectType( + request?: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAspectType( + request: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAspectType( + request: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAspectType( + request?: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, + 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.createAspectType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAspectType()`. + * @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/catalog_service.create_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_CreateAspectType_async + */ + async checkCreateAspectTypeProgress(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.createAspectType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an AspectType. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.AspectType} request.aspectType + * Required. AspectType Resource + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.update_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateAspectType_async + */ + updateAspectType( + request?: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAspectType( + request: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAspectType( + request: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAspectType( + request?: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, + 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({ + 'aspect_type.name': request.aspectType!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAspectType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAspectType()`. + * @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/catalog_service.update_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateAspectType_async + */ + async checkUpdateAspectTypeProgress(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.updateAspectType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes an AspectType. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the AspectType: + * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + * @param {string} [request.etag] + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteAspectTypeRequest method returns an ABORTED error + * response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is 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/catalog_service.delete_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteAspectType_async + */ + deleteAspectType( + request?: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAspectType( + request: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAspectType( + request: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAspectType( + request?: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAspectType(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAspectType()`. + * @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/catalog_service.delete_aspect_type.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteAspectType_async + */ + async checkDeleteAspectTypeProgress(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.deleteAspectType, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the entryGroup, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {string} request.entryGroupId + * Required. EntryGroup identifier. + * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup + * Required. EntryGroup Resource. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.create_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_CreateEntryGroup_async + */ + createEntryGroup( + request?: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createEntryGroup( + request: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEntryGroup( + request: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEntryGroup( + request?: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, + 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.createEntryGroup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createEntryGroup()`. + * @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/catalog_service.create_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_CreateEntryGroup_async + */ + async checkCreateEntryGroupProgress(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.createEntryGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup + * Required. EntryGroup Resource. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request, without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.update_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryGroup_async + */ + updateEntryGroup( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateEntryGroup( + request: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEntryGroup( + request: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEntryGroup( + request?: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, + 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({ + 'entry_group.name': request.entryGroup!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEntryGroup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateEntryGroup()`. + * @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/catalog_service.update_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryGroup_async + */ + async checkUpdateEntryGroupProgress(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.updateEntryGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the EntryGroup: + * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + * @param {string} [request.etag] + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteEntryGroupRequest method returns an ABORTED error + * response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is 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/catalog_service.delete_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryGroup_async + */ + deleteEntryGroup( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteEntryGroup( + request: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEntryGroup( + request: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEntryGroup( + request?: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteEntryGroup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteEntryGroup()`. + * @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/catalog_service.delete_entry_group.js + * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryGroup_async + */ + async checkDeleteEntryGroupProgress(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.deleteEntryGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a metadata job. For example, use a metadata job to import Dataplex + * Catalog entries and aspects from a third-party system into Dataplex. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {google.cloud.dataplex.v1.MetadataJob} request.metadataJob + * Required. The metadata job resource. + * @param {string} [request.metadataJobId] + * Optional. The metadata job ID. If not provided, a unique ID is generated + * with the prefix `metadata-job-`. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/catalog_service.create_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async + */ + createMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createMetadataJob( + request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMetadataJob( + request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + 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.createMetadataJob(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createMetadataJob()`. + * @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/catalog_service.create_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async + */ + async checkCreateMetadataJobProgress(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.createMetadataJob, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists EntryType resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the EntryType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.EntryType|EntryType}. + * 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 `listEntryTypesAsync()` + * 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. + */ + listEntryTypes( + request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryType[], + protos.google.cloud.dataplex.v1.IListEntryTypesRequest|null, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse + ]>; + listEntryTypes( + request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryType>): void; + listEntryTypes( + request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryType>): void; + listEntryTypes( + request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryType>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryType>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryType[], + protos.google.cloud.dataplex.v1.IListEntryTypesRequest|null, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listEntryTypes(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 resource name of the EntryType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.EntryType|EntryType} 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 `listEntryTypesAsync()` + * 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. + */ + listEntryTypesStream( + request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + 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['listEntryTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntryTypes.createStream( + this.innerApiCalls.listEntryTypes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEntryTypes`, 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 resource name of the EntryType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.EntryType|EntryType}. 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/catalog_service.list_entry_types.js + * region_tag:dataplex_v1_generated_CatalogService_ListEntryTypes_async + */ + listEntryTypesAsync( + request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + 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['listEntryTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntryTypes.asyncIterate( + this.innerApiCalls['listEntryTypes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists AspectType resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the AspectType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of AspectTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAspectTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.AspectType|AspectType}. + * 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 `listAspectTypesAsync()` + * 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. + */ + listAspectTypes( + request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAspectType[], + protos.google.cloud.dataplex.v1.IListAspectTypesRequest|null, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse + ]>; + listAspectTypes( + request: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAspectType>): void; + listAspectTypes( + request: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAspectType>): void; + listAspectTypes( + request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAspectType>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAspectType>): + Promise<[ + protos.google.cloud.dataplex.v1.IAspectType[], + protos.google.cloud.dataplex.v1.IListAspectTypesRequest|null, + protos.google.cloud.dataplex.v1.IListAspectTypesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listAspectTypes(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 resource name of the AspectType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of AspectTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAspectTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.AspectType|AspectType} 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 `listAspectTypesAsync()` + * 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. + */ + listAspectTypesStream( + request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + 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['listAspectTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAspectTypes.createStream( + this.innerApiCalls.listAspectTypes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAspectTypes`, 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 resource name of the AspectType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of AspectTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAspectTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.AspectType|AspectType}. 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/catalog_service.list_aspect_types.js + * region_tag:dataplex_v1_generated_CatalogService_ListAspectTypes_async + */ + listAspectTypesAsync( + request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, + 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['listAspectTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAspectTypes.asyncIterate( + this.innerApiCalls['listAspectTypes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists EntryGroup resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the entryGroup location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryGroups to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryGroups` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.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.dataplex.v1.IListEntryGroupsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryGroup[], + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest|null, + protos.google.cloud.dataplex.v1.IListEntryGroupsResponse + ]>; + listEntryGroups( + request: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryGroup>): void; + listEntryGroups( + request: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryGroup>): void; + listEntryGroups( + request?: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryGroup>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, + protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntryGroup>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntryGroup[], + protos.google.cloud.dataplex.v1.IListEntryGroupsRequest|null, + protos.google.cloud.dataplex.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 resource name of the entryGroup location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryGroups to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryGroups` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.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.dataplex.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 resource name of the entryGroup location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryGroups to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryGroups` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.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/catalog_service.list_entry_groups.js + * region_tag:dataplex_v1_generated_CatalogService_ListEntryGroups_async + */ + listEntryGroupsAsync( + request?: protos.google.cloud.dataplex.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 within an EntryGroup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.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.dataplex.v1.IListEntriesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry[], + protos.google.cloud.dataplex.v1.IListEntriesRequest|null, + protos.google.cloud.dataplex.v1.IListEntriesResponse + ]>; + listEntries( + request: protos.google.cloud.dataplex.v1.IListEntriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntriesRequest, + protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntry>): void; + listEntries( + request: protos.google.cloud.dataplex.v1.IListEntriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntriesRequest, + protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntry>): void; + listEntries( + request?: protos.google.cloud.dataplex.v1.IListEntriesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntriesRequest, + protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntry>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntriesRequest, + protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntry>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntry[], + protos.google.cloud.dataplex.v1.IListEntriesRequest|null, + protos.google.cloud.dataplex.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 resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" + * @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.dataplex.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.dataplex.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 resource name of the parent Entry Group: + * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.filter] + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" + * @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.dataplex.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/catalog_service.list_entries.js + * region_tag:dataplex_v1_generated_CatalogService_ListEntries_async + */ + listEntriesAsync( + request?: protos.google.cloud.dataplex.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; + } + /** + * Searches for Entries matching the given query and scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + * @param {string} request.query + * Required. The query against which entries in scope should be matched. + * @param {number} [request.pageSize] + * 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. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results. + * @param {string} [request.scope] + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.SearchEntriesResult|SearchEntriesResult}. + * 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 `searchEntriesAsync()` + * 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. + */ + searchEntries( + request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ISearchEntriesResult[], + protos.google.cloud.dataplex.v1.ISearchEntriesRequest|null, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse + ]>; + searchEntries( + request: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISearchEntriesResult>): void; + searchEntries( + request: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISearchEntriesResult>): void; + searchEntries( + request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISearchEntriesResult>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISearchEntriesResult>): + Promise<[ + protos.google.cloud.dataplex.v1.ISearchEntriesResult[], + protos.google.cloud.dataplex.v1.ISearchEntriesRequest|null, + protos.google.cloud.dataplex.v1.ISearchEntriesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.searchEntries(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.name + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + * @param {string} request.query + * Required. The query against which entries in scope should be matched. + * @param {number} [request.pageSize] + * 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. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results. + * @param {string} [request.scope] + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. + * @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.dataplex.v1.SearchEntriesResult|SearchEntriesResult} 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 `searchEntriesAsync()` + * 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. + */ + searchEntriesStream( + request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + 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({ + 'name': request.name ?? '', + }); + const defaultCallSettings = this._defaults['searchEntries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchEntries.createStream( + this.innerApiCalls.searchEntries as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `searchEntries`, 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.name + * Required. The project to which the request should be attributed in the + * following form: `projects/{project}/locations/{location}`. + * @param {string} request.query + * Required. The query against which entries in scope should be matched. + * @param {number} [request.pageSize] + * 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. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. + * @param {string} [request.orderBy] + * Optional. Specifies the ordering of results. + * @param {string} [request.scope] + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. + * @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.dataplex.v1.SearchEntriesResult|SearchEntriesResult}. 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/catalog_service.search_entries.js + * region_tag:dataplex_v1_generated_CatalogService_SearchEntries_async + */ + searchEntriesAsync( + request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, + 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({ + 'name': request.name ?? '', + }); + const defaultCallSettings = this._defaults['searchEntries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchEntries.asyncIterate( + this.innerApiCalls['searchEntries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists metadata jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.MetadataJob|MetadataJob}. + * 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 `listMetadataJobsAsync()` + * 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. + */ + listMetadataJobs( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IMetadataJob[], + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest|null, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + ]>; + listMetadataJobs( + request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IMetadataJob>): void; + listMetadataJobs( + request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IMetadataJob>): void; + listMetadataJobs( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IMetadataJob>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IMetadataJob>): + Promise<[ + protos.google.cloud.dataplex.v1.IMetadataJob[], + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest|null, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listMetadataJobs(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 resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.MetadataJob|MetadataJob} 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 `listMetadataJobsAsync()` + * 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. + */ + listMetadataJobsStream( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + 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['listMetadataJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMetadataJobs.createStream( + this.innerApiCalls.listMetadataJobs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMetadataJobs`, 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 resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.MetadataJob|MetadataJob}. 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/catalog_service.list_metadata_jobs.js + * region_tag:dataplex_v1_generated_CatalogService_ListMetadataJobs_async + */ + listMetadataJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + 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['listMetadataJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMetadataJobs.asyncIterate( + this.innerApiCalls['listMetadataJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * 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 metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.catalogServiceStub && !this._terminated) { + return this.catalogServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json new file mode 100644 index 00000000000..4d0adc34635 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json @@ -0,0 +1,165 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.CatalogService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "resource_exhausted_unavailable": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateEntryType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEntryType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEntryType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEntryTypes": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetEntryType": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAspectType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAspectType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAspectType": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAspectTypes": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAspectType": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEntryGroups": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetEntryGroup": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEntry": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteEntry": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEntries": { + "timeout_millis": 20000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetEntry": { + "timeout_millis": 20000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "LookupEntry": { + "timeout_millis": 20000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "SearchEntries": { + "timeout_millis": 60000, + "retry_codes_name": "resource_exhausted_unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMetadataJobs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts new file mode 100644 index 00000000000..82719a249c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts @@ -0,0 +1,2911 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/content_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './content_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * ContentService manages Notebook and SQL Scripts for Dataplex. + * @class + * @memberof v1 + */ +export class ContentServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + contentServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContentServiceClient. + * + * @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 ContentServiceClient({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 ContentServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listContent: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'content') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + + this.descriptors.longrunning = { + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.ContentService', 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.contentServiceStub) { + return this.contentServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.ContentService. + this.contentServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.ContentService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.ContentService, + 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 contentServiceStubMethods = + ['createContent', 'updateContent', 'deleteContent', 'getContent', 'getIamPolicy', 'setIamPolicy', 'testIamPermissions', 'listContent']; + for (const methodName of contentServiceStubMethods) { + const callPromise = this.contentServiceStub.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.contentServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Create a content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {google.cloud.dataplex.v1.Content} request.content + * Required. Content resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. + * Please see the {@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/content_service.create_content.js + * region_tag:dataplex_v1_generated_ContentService_CreateContent_async + */ + createContent( + request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|undefined, {}|undefined + ]>; + createContent( + request: protos.google.cloud.dataplex.v1.ICreateContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, + {}|null|undefined>): void; + createContent( + request: protos.google.cloud.dataplex.v1.ICreateContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, + {}|null|undefined>): void; + createContent( + request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.ICreateContentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.createContent(request, options, callback); + } +/** + * Update a content. Only supports full resource update. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Content} request.content + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. + * Please see the {@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/content_service.update_content.js + * region_tag:dataplex_v1_generated_ContentService_UpdateContent_async + */ + updateContent( + request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|undefined, {}|undefined + ]>; + updateContent( + request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, + {}|null|undefined>): void; + updateContent( + request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, + {}|null|undefined>): void; + updateContent( + request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IUpdateContentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'content.name': request.content!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateContent(request, options, callback); + } +/** + * Delete a content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_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/v1/content_service.delete_content.js + * region_tag:dataplex_v1_generated_ContentService_DeleteContent_async + */ + deleteContent( + request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|undefined, {}|undefined + ]>; + deleteContent( + request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, + {}|null|undefined>): void; + deleteContent( + request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, + {}|null|undefined>): void; + deleteContent( + request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteContentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.deleteContent(request, options, callback); + } +/** + * Get a content resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @param {google.cloud.dataplex.v1.GetContentRequest.ContentView} [request.view] + * Optional. Specify content view to make a partial 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 an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. + * Please see the {@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/content_service.get_content.js + * region_tag:dataplex_v1_generated_ContentService_GetContent_async + */ + getContent( + request?: protos.google.cloud.dataplex.v1.IGetContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|undefined, {}|undefined + ]>; + getContent( + request: protos.google.cloud.dataplex.v1.IGetContentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): void; + getContent( + request: protos.google.cloud.dataplex.v1.IGetContentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): void; + getContent( + request?: protos.google.cloud.dataplex.v1.IGetContentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IContent, + protos.google.cloud.dataplex.v1.IGetContentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getContent(request, options, callback); + } +/** + * Gets the access control policy for a contentitem 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. + * + * Caller must have Google IAM `dataplex.content.getIamPolicy` permission + * on the resource. + * + * @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/content_service.get_iam_policy.js + * region_tag:dataplex_v1_generated_ContentService_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 access control policy on the specified contentitem resource. + * Replaces any existing policy. + * + * Caller must have Google IAM `dataplex.content.setIamPolicy` permission + * on the resource. + * + * @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/content_service.set_iam_policy.js + * region_tag:dataplex_v1_generated_ContentService_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 caller's permissions on a resource. + * If the resource does not exist, an empty set of + * permissions is returned (a `NOT_FOUND` error is not returned). + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [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/content_service.test_iam_permissions.js + * region_tag:dataplex_v1_generated_ContentService_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); + } + + /** + * List content. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Content|Content}. + * 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 `listContentAsync()` + * 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. + */ + listContent( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IContent[], + protos.google.cloud.dataplex.v1.IListContentRequest|null, + protos.google.cloud.dataplex.v1.IListContentResponse + ]>; + listContent( + request: protos.google.cloud.dataplex.v1.IListContentRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, + protos.google.cloud.dataplex.v1.IContent>): void; + listContent( + request: protos.google.cloud.dataplex.v1.IListContentRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, + protos.google.cloud.dataplex.v1.IContent>): void; + listContent( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, + protos.google.cloud.dataplex.v1.IContent>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListContentRequest, + protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, + protos.google.cloud.dataplex.v1.IContent>): + Promise<[ + protos.google.cloud.dataplex.v1.IContent[], + protos.google.cloud.dataplex.v1.IListContentRequest|null, + protos.google.cloud.dataplex.v1.IListContentResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listContent(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 resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @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.dataplex.v1.Content|Content} 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 `listContentAsync()` + * 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. + */ + listContentStream( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + 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['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listContent.createStream( + this.innerApiCalls.listContent as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listContent`, 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 resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of content to return. The service may return fewer + * than this value. If unspecified, at most 10 content will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListContent` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListContent` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The following formats are supported: + * + * labels.key1 = "value1" + * labels:key1 + * type = "NOTEBOOK" + * type = "SQL_SCRIPT" + * + * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * @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.dataplex.v1.Content|Content}. 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/content_service.list_content.js + * region_tag:dataplex_v1_generated_ContentService_ListContent_async + */ + listContentAsync( + request?: protos.google.cloud.dataplex.v1.IListContentRequest, + 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['listContent']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listContent.asyncIterate( + this.innerApiCalls['listContent'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.contentServiceStub && !this._terminated) { + return this.contentServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json new file mode 100644 index 00000000000..2f8dc65d04f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json @@ -0,0 +1,78 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.ContentService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateContent": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateContent": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteContent": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetContent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListContent": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts new file mode 100644 index 00000000000..5138db58007 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts @@ -0,0 +1,3271 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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_scan_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_scan_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * DataScanService manages DataScan resources which can be configured to run + * various types of data scanning workload and generate enriched metadata (e.g. + * Data Profile, Data Quality) for the data source. + * @class + * @memberof v1 + */ +export class DataScanServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataScanServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataScanServiceClient. + * + * @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 DataScanServiceClient({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 DataScanServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listDataScans: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataScans'), + listDataScanJobs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataScanJobs') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDataScanResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataScan') as gax.protobuf.Type; + const createDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataScanResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataScan') as gax.protobuf.Type; + const updateDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDataScanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataScanResponse.decode.bind(createDataScanResponse), + createDataScanMetadata.decode.bind(createDataScanMetadata)), + updateDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataScanResponse.decode.bind(updateDataScanResponse), + updateDataScanMetadata.decode.bind(updateDataScanMetadata)), + deleteDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataScanResponse.decode.bind(deleteDataScanResponse), + deleteDataScanMetadata.decode.bind(deleteDataScanMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataScanService', 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.dataScanServiceStub) { + return this.dataScanServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataScanService. + this.dataScanServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataScanService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataScanService, + 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 dataScanServiceStubMethods = + ['createDataScan', 'updateDataScan', 'deleteDataScan', 'getDataScan', 'listDataScans', 'runDataScan', 'getDataScanJob', 'listDataScanJobs', 'generateDataQualityRules']; + for (const methodName of dataScanServiceStubMethods) { + const callPromise = this.dataScanServiceStub.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.dataScanServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Gets a DataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} [request.view] + * Optional. Select the DataScan view to return. Defaults to `BASIC`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.DataScan|DataScan}. + * Please see the {@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_scan_service.get_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_GetDataScan_async + */ + getDataScan( + request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|undefined, {}|undefined + ]>; + getDataScan( + request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, + {}|null|undefined>): void; + getDataScan( + request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, + {}|null|undefined>): void; + getDataScan( + request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getDataScan(request, options, callback); + } +/** + * Runs an on-demand execution of a DataScan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * + * Only **OnDemand** data scans are 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.dataplex.v1.RunDataScanResponse|RunDataScanResponse}. + * Please see the {@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_scan_service.run_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_RunDataScan_async + */ + runDataScan( + request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|undefined, {}|undefined + ]>; + runDataScan( + request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, + {}|null|undefined>): void; + runDataScan( + request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, + {}|null|undefined>): void; + runDataScan( + request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.runDataScan(request, options, callback); + } +/** + * Gets a DataScanJob resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataScanJob: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} [request.view] + * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.DataScanJob|DataScanJob}. + * Please see the {@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_scan_service.get_data_scan_job.js + * region_tag:dataplex_v1_generated_DataScanService_GetDataScanJob_async + */ + getDataScanJob( + request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|undefined, {}|undefined + ]>; + getDataScanJob( + request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, + {}|null|undefined>): void; + getDataScanJob( + request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, + {}|null|undefined>): void; + getDataScanJob( + request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getDataScanJob(request, options, callback); + } +/** + * Generates recommended data quality rules based on the results of a data + * profiling scan. + * + * Use the recommendations to build rules for a data quality scan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name must be one of the following: + * + * * The name of a data scan with at least one successful, completed data + * profiling job + * * The name of a successful, completed data profiling job (a data scan job + * where the job type is data profiling) + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.v1.GenerateDataQualityRulesResponse|GenerateDataQualityRulesResponse}. + * Please see the {@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_scan_service.generate_data_quality_rules.js + * region_tag:dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async + */ + generateDataQualityRules( + request?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|undefined, {}|undefined + ]>; + generateDataQualityRules( + request: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, + {}|null|undefined>): void; + generateDataQualityRules( + request: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, + {}|null|undefined>): void; + generateDataQualityRules( + request?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, + protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.generateDataQualityRules(request, options, callback); + } + +/** + * Creates a DataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.DataScan} request.dataScan + * Required. DataScan resource. + * @param {string} request.dataScanId + * Required. DataScan identifier. + * + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.create_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async + */ + createDataScan( + request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataScan( + request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataScan( + request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataScan( + request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + 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.createDataScan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createDataScan()`. + * @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_scan_service.create_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async + */ + async checkCreateDataScanProgress(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.createDataScan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a DataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.DataScan} request.dataScan + * Required. DataScan resource to be updated. + * + * Only fields specified in `update_mask` are updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.update_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async + */ + updateDataScan( + request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataScan( + request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataScan( + request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataScan( + request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + 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({ + 'data_scan.name': request.dataScan!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataScan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataScan()`. + * @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_scan_service.update_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async + */ + async checkUpdateDataScanProgress(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.updateDataScan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a DataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataScan: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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_scan_service.delete_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async + */ + deleteDataScan( + request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataScan( + request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataScan( + request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataScan( + request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataScan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteDataScan()`. + * @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_scan_service.delete_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async + */ + async checkDeleteDataScanProgress(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.deleteDataScan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists DataScans. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataScan|DataScan}. + * 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 `listDataScansAsync()` + * 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. + */ + listDataScans( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScan[], + protos.google.cloud.dataplex.v1.IListDataScansRequest|null, + protos.google.cloud.dataplex.v1.IListDataScansResponse + ]>; + listDataScans( + request: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScan>): void; + listDataScans( + request: protos.google.cloud.dataplex.v1.IListDataScansRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScan>): void; + listDataScans( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScan>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScan>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScan[], + protos.google.cloud.dataplex.v1.IListDataScansRequest|null, + protos.google.cloud.dataplex.v1.IListDataScansResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDataScans(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 resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.DataScan|DataScan} 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 `listDataScansAsync()` + * 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. + */ + listDataScansStream( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + 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['listDataScans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScans.createStream( + this.innerApiCalls.listDataScans as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataScans`, 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 resource name of the parent location: + * `projects/{project}/locations/{location_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 500 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (`name` or `create_time`) for the result. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.DataScan|DataScan}. 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_scan_service.list_data_scans.js + * region_tag:dataplex_v1_generated_DataScanService_ListDataScans_async + */ + listDataScansAsync( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + 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['listDataScans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScans.asyncIterate( + this.innerApiCalls['listDataScans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataScanJobs under the given DataScan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * + * Allowed fields are: + * + * - `start_time` + * - `end_time` + * + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataScanJob|DataScanJob}. + * 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 `listDataScanJobsAsync()` + * 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. + */ + listDataScanJobs( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScanJob[], + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest|null, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + ]>; + listDataScanJobs( + request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScanJob>): void; + listDataScanJobs( + request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScanJob>): void; + listDataScanJobs( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScanJob>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataScanJob>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataScanJob[], + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest|null, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDataScanJobs(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 resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * + * Allowed fields are: + * + * - `start_time` + * - `end_time` + * + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * @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.dataplex.v1.DataScanJob|DataScanJob} 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 `listDataScanJobsAsync()` + * 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. + */ + listDataScanJobsStream( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + 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['listDataScanJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScanJobs.createStream( + this.innerApiCalls.listDataScanJobs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataScanJobs`, 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 resource name of the parent environment: + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + * where `project` refers to a *project_id* or *project_number* and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * + * Allowed fields are: + * + * - `start_time` + * - `end_time` + * + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + * @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.dataplex.v1.DataScanJob|DataScanJob}. 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_scan_service.list_data_scan_jobs.js + * region_tag:dataplex_v1_generated_DataScanService_ListDataScanJobs_async + */ + listDataScanJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + 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['listDataScanJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScanJobs.asyncIterate( + this.innerApiCalls['listDataScanJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * 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 metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.dataScanServiceStub && !this._terminated) { + return this.dataScanServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json new file mode 100644 index 00000000000..7b3caf2548d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataScanService": { + "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": { + "CreateDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataScans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataScanJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataScanJobs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateDataQualityRules": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts new file mode 100644 index 00000000000..f02ca8047dc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts @@ -0,0 +1,3974 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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_taxonomy_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_taxonomy_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * DataTaxonomyService enables attribute-based governance. The resources + * currently offered include DataTaxonomy and DataAttribute. + * @class + * @memberof v1 + */ +export class DataTaxonomyServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataTaxonomyServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataTaxonomyServiceClient. + * + * @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 DataTaxonomyServiceClient({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 DataTaxonomyServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listDataTaxonomies: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataTaxonomies'), + listDataAttributeBindings: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAttributeBindings'), + listDataAttributes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAttributes') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDataTaxonomyResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataTaxonomy') as gax.protobuf.Type; + const createDataTaxonomyMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataTaxonomyResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataTaxonomy') as gax.protobuf.Type; + const updateDataTaxonomyMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDataTaxonomyResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataTaxonomyMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createDataAttributeBindingResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataAttributeBinding') as gax.protobuf.Type; + const createDataAttributeBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataAttributeBindingResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataAttributeBinding') as gax.protobuf.Type; + const updateDataAttributeBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDataAttributeBindingResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataAttributeBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createDataAttributeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataAttribute') as gax.protobuf.Type; + const createDataAttributeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataAttributeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataAttribute') as gax.protobuf.Type; + const updateDataAttributeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDataAttributeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDataAttributeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDataTaxonomy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataTaxonomyResponse.decode.bind(createDataTaxonomyResponse), + createDataTaxonomyMetadata.decode.bind(createDataTaxonomyMetadata)), + updateDataTaxonomy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataTaxonomyResponse.decode.bind(updateDataTaxonomyResponse), + updateDataTaxonomyMetadata.decode.bind(updateDataTaxonomyMetadata)), + deleteDataTaxonomy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataTaxonomyResponse.decode.bind(deleteDataTaxonomyResponse), + deleteDataTaxonomyMetadata.decode.bind(deleteDataTaxonomyMetadata)), + createDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataAttributeBindingResponse.decode.bind(createDataAttributeBindingResponse), + createDataAttributeBindingMetadata.decode.bind(createDataAttributeBindingMetadata)), + updateDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataAttributeBindingResponse.decode.bind(updateDataAttributeBindingResponse), + updateDataAttributeBindingMetadata.decode.bind(updateDataAttributeBindingMetadata)), + deleteDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataAttributeBindingResponse.decode.bind(deleteDataAttributeBindingResponse), + deleteDataAttributeBindingMetadata.decode.bind(deleteDataAttributeBindingMetadata)), + createDataAttribute: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataAttributeResponse.decode.bind(createDataAttributeResponse), + createDataAttributeMetadata.decode.bind(createDataAttributeMetadata)), + updateDataAttribute: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataAttributeResponse.decode.bind(updateDataAttributeResponse), + updateDataAttributeMetadata.decode.bind(updateDataAttributeMetadata)), + deleteDataAttribute: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataAttributeResponse.decode.bind(deleteDataAttributeResponse), + deleteDataAttributeMetadata.decode.bind(deleteDataAttributeMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataTaxonomyService', 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.dataTaxonomyServiceStub) { + return this.dataTaxonomyServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataTaxonomyService. + this.dataTaxonomyServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataTaxonomyService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataTaxonomyService, + 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 dataTaxonomyServiceStubMethods = + ['createDataTaxonomy', 'updateDataTaxonomy', 'deleteDataTaxonomy', 'listDataTaxonomies', 'getDataTaxonomy', 'createDataAttributeBinding', 'updateDataAttributeBinding', 'deleteDataAttributeBinding', 'listDataAttributeBindings', 'getDataAttributeBinding', 'createDataAttribute', 'updateDataAttribute', 'deleteDataAttribute', 'listDataAttributes', 'getDataAttribute']; + for (const methodName of dataTaxonomyServiceStubMethods) { + const callPromise = this.dataTaxonomyServiceStub.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.dataTaxonomyServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Retrieves a DataTaxonomy resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_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.dataplex.v1.DataTaxonomy|DataTaxonomy}. + * Please see the {@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_taxonomy_service.get_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async + */ + getDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|undefined, {}|undefined + ]>; + getDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, + {}|null|undefined>): void; + getDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, + {}|null|undefined>): void; + getDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataTaxonomy, + protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getDataTaxonomy(request, options, callback); + } +/** + * Retrieves a DataAttributeBinding resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. + * Please see the {@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_taxonomy_service.get_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async + */ + getDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|undefined, {}|undefined + ]>; + getDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, + {}|null|undefined>): void; + getDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, + {}|null|undefined>): void; + getDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttributeBinding, + protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getDataAttributeBinding(request, options, callback); + } +/** + * Retrieves a Data Attribute resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_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.dataplex.v1.DataAttribute|DataAttribute}. + * Please see the {@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_taxonomy_service.get_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async + */ + getDataAttribute( + request?: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|undefined, {}|undefined + ]>; + getDataAttribute( + request: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, + {}|null|undefined>): void; + getDataAttribute( + request: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, + {}|null|undefined>): void; + getDataAttribute( + request?: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttribute, + protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getDataAttribute(request, options, callback); + } + +/** + * Create a DataTaxonomy resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {string} request.dataTaxonomyId + * Required. DataTaxonomy identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Project. + * @param {google.cloud.dataplex.v1.DataTaxonomy} request.dataTaxonomy + * Required. DataTaxonomy resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async + */ + createDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataTaxonomy( + request: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataTaxonomy( + request: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, + 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.createDataTaxonomy(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createDataTaxonomy()`. + * @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_taxonomy_service.create_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async + */ + async checkCreateDataTaxonomyProgress(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.createDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a DataTaxonomy resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.DataTaxonomy} request.dataTaxonomy + * Required. Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async + */ + updateDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, + 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({ + 'data_taxonomy.name': request.dataTaxonomy!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataTaxonomy(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataTaxonomy()`. + * @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_taxonomy_service.update_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async + */ + async checkUpdateDataTaxonomyProgress(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.updateDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + * must be deleted before the DataTaxonomy can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param {string} [request.etag] + * Optional. If the client provided etag value does not match the current etag + * value,the DeleteDataTaxonomy method returns an ABORTED error. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async + */ + deleteDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataTaxonomy( + request: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataTaxonomy( + request?: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataTaxonomy(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteDataTaxonomy()`. + * @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_taxonomy_service.delete_data_taxonomy.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async + */ + async checkDeleteDataTaxonomyProgress(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.deleteDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a DataAttributeBinding resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * @param {string} request.dataAttributeBindingId + * Required. DataAttributeBinding identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the Location. + * @param {google.cloud.dataplex.v1.DataAttributeBinding} request.dataAttributeBinding + * Required. DataAttributeBinding resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async + */ + createDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, + 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.createDataAttributeBinding(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createDataAttributeBinding()`. + * @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_taxonomy_service.create_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async + */ + async checkCreateDataAttributeBindingProgress(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.createDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a DataAttributeBinding resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.DataAttributeBinding} request.dataAttributeBinding + * Required. Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async + */ + updateDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, + 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({ + 'data_attribute_binding.name': request.dataAttributeBinding!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataAttributeBinding(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataAttributeBinding()`. + * @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_taxonomy_service.update_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async + */ + async checkUpdateDataAttributeBindingProgress(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.updateDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a DataAttributeBinding resource. All attributes within the + * DataAttributeBinding must be deleted before the DataAttributeBinding can be + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @param {string} request.etag + * Required. If the client provided etag value does not match the current etag + * value, the DeleteDataAttributeBindingRequest method returns an ABORTED + * error response. Etags must be used when calling the + * DeleteDataAttributeBinding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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_taxonomy_service.delete_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async + */ + deleteDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAttributeBinding( + request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAttributeBinding( + request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataAttributeBinding(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteDataAttributeBinding()`. + * @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_taxonomy_service.delete_data_attribute_binding.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async + */ + async checkDeleteDataAttributeBindingProgress(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.deleteDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a DataAttribute resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param {string} request.dataAttributeId + * Required. DataAttribute identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the DataTaxonomy. + * @param {google.cloud.dataplex.v1.DataAttribute} request.dataAttribute + * Required. DataAttribute resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.create_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async + */ + createDataAttribute( + request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDataAttribute( + request: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAttribute( + request: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDataAttribute( + request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, + 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.createDataAttribute(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createDataAttribute()`. + * @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_taxonomy_service.create_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async + */ + async checkCreateDataAttributeProgress(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.createDataAttribute, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a DataAttribute resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.DataAttribute} request.dataAttribute + * Required. Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/data_taxonomy_service.update_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async + */ + updateDataAttribute( + request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataAttribute( + request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAttribute( + request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataAttribute( + request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, + 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({ + 'data_attribute.name': request.dataAttribute!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataAttribute(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataAttribute()`. + * @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_taxonomy_service.update_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async + */ + async checkUpdateDataAttributeProgress(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.updateDataAttribute, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Data Attribute resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @param {string} [request.etag] + * Optional. If the client provided etag value does not match the current etag + * value, the DeleteDataAttribute method returns an ABORTED error response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is 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_taxonomy_service.delete_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async + */ + deleteDataAttribute( + request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDataAttribute( + request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAttribute( + request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDataAttribute( + request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataAttribute(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteDataAttribute()`. + * @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_taxonomy_service.delete_data_attribute.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async + */ + async checkDeleteDataAttributeProgress(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.deleteDataAttribute, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists DataTaxonomy resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataTaxonomy|DataTaxonomy}. + * 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 `listDataTaxonomiesAsync()` + * 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. + */ + listDataTaxonomies( + request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataTaxonomy[], + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest|null, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse + ]>; + listDataTaxonomies( + request: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataTaxonomy>): void; + listDataTaxonomies( + request: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataTaxonomy>): void; + listDataTaxonomies( + request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataTaxonomy>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataTaxonomy>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataTaxonomy[], + protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest|null, + protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDataTaxonomies(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 resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataTaxonomy|DataTaxonomy} 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 `listDataTaxonomiesAsync()` + * 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. + */ + listDataTaxonomiesStream( + request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + 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['listDataTaxonomies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataTaxonomies.createStream( + this.innerApiCalls.listDataTaxonomies as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataTaxonomies`, 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 resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataTaxonomies to return. The service may + * return fewer than this value. If unspecified, at most 10 DataTaxonomies + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous ` ListDataTaxonomies` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to ` ListDataTaxonomies` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataTaxonomy|DataTaxonomy}. 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_taxonomy_service.list_data_taxonomies.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async + */ + listDataTaxonomiesAsync( + request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, + 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['listDataTaxonomies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataTaxonomies.asyncIterate( + this.innerApiCalls['listDataTaxonomies'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataAttributeBinding resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` must match the + * call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. + * 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 `listDataAttributeBindingsAsync()` + * 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. + */ + listDataAttributeBindings( + request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttributeBinding[], + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest|null, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse + ]>; + listDataAttributeBindings( + request: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttributeBinding>): void; + listDataAttributeBindings( + request: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttributeBinding>): void; + listDataAttributeBindings( + request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttributeBinding>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttributeBinding>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttributeBinding[], + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest|null, + protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDataAttributeBindings(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 resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` must match the + * call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataAttributeBinding|DataAttributeBinding} 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 `listDataAttributeBindingsAsync()` + * 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. + */ + listDataAttributeBindingsStream( + request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + 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['listDataAttributeBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataAttributeBindings.createStream( + this.innerApiCalls.listDataAttributeBindings as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataAttributeBindings`, 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 resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributeBindings to return. The service + * may return fewer than this value. If unspecified, at most 10 + * DataAttributeBindings will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributeBindings` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListDataAttributeBindings` must match the + * call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * Filter using resource: filter=resource:"resource-name" + * Filter using attribute: filter=attributes:"attribute-name" + * Filter using attribute in paths list: + * filter=paths.attributes:"attribute-name" + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. 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_taxonomy_service.list_data_attribute_bindings.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async + */ + listDataAttributeBindingsAsync( + request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, + 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['listDataAttributeBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataAttributeBindings.asyncIterate( + this.innerApiCalls['listDataAttributeBindings'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataAttribute|DataAttribute}. + * 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 `listDataAttributesAsync()` + * 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. + */ + listDataAttributes( + request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttribute[], + protos.google.cloud.dataplex.v1.IListDataAttributesRequest|null, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse + ]>; + listDataAttributes( + request: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttribute>): void; + listDataAttributes( + request: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttribute>): void; + listDataAttributes( + request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttribute>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IDataAttribute>): + Promise<[ + protos.google.cloud.dataplex.v1.IDataAttribute[], + protos.google.cloud.dataplex.v1.IListDataAttributesRequest|null, + protos.google.cloud.dataplex.v1.IListDataAttributesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDataAttributes(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 resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataAttribute|DataAttribute} 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 `listDataAttributesAsync()` + * 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. + */ + listDataAttributesStream( + request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + 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['listDataAttributes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataAttributes.createStream( + this.innerApiCalls.listDataAttributes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataAttributes`, 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 resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param {number} [request.pageSize] + * Optional. Maximum number of DataAttributes to return. The service may + * return fewer than this value. If unspecified, at most 10 dataAttributes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataAttributes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataAttributes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.DataAttribute|DataAttribute}. 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_taxonomy_service.list_data_attributes.js + * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async + */ + listDataAttributesAsync( + request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, + 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['listDataAttributes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataAttributes.asyncIterate( + this.innerApiCalls['listDataAttributes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * 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 metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.dataTaxonomyServiceStub && !this._terminated) { + return this.dataTaxonomyServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json new file mode 100644 index 00000000000..27640f6111a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json @@ -0,0 +1,86 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataTaxonomyService": { + "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": { + "CreateDataTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataTaxonomies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataTaxonomy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateDataAttributeBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataAttributeBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataAttributeBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataAttributeBindings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataAttributeBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateDataAttribute": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataAttribute": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataAttribute": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataAttributes": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataAttribute": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts new file mode 100644 index 00000000000..9b7d3ed8a21 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts @@ -0,0 +1,6322 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/dataplex_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dataplex_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Dataplex service provides data lakes as a service. The primary resources + * offered by this service are Lakes, Zones and Assets which collectively allow + * a data administrator to organize, manage, secure and catalog data across + * their organization located across cloud projects in a variety of storage + * systems including Cloud Storage and BigQuery. + * @class + * @memberof v1 + */ +export class DataplexServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataplexServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataplexServiceClient. + * + * @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 DataplexServiceClient({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 DataplexServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listLakes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'lakes'), + listLakeActions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), + listZones: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'zones'), + listZoneActions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), + listAssets: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'assets'), + listAssetActions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), + listTasks: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tasks'), + listJobs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobs'), + listEnvironments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), + listSessions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake') as gax.protobuf.Type; + const createLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateLakeResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Lake') as gax.protobuf.Type; + const updateLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteLakeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteLakeMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone') as gax.protobuf.Type; + const createZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateZoneResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Zone') as gax.protobuf.Type; + const updateZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteZoneResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset') as gax.protobuf.Type; + const createAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateAssetResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Asset') as gax.protobuf.Type; + const updateAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAssetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAssetMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task') as gax.protobuf.Type; + const createTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateTaskResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Task') as gax.protobuf.Type; + const updateTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteTaskResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteTaskMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Environment') as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.Environment') as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createLakeResponse.decode.bind(createLakeResponse), + createLakeMetadata.decode.bind(createLakeMetadata)), + updateLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateLakeResponse.decode.bind(updateLakeResponse), + updateLakeMetadata.decode.bind(updateLakeMetadata)), + deleteLake: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteLakeResponse.decode.bind(deleteLakeResponse), + deleteLakeMetadata.decode.bind(deleteLakeMetadata)), + createZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createZoneResponse.decode.bind(createZoneResponse), + createZoneMetadata.decode.bind(createZoneMetadata)), + updateZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateZoneResponse.decode.bind(updateZoneResponse), + updateZoneMetadata.decode.bind(updateZoneMetadata)), + deleteZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteZoneResponse.decode.bind(deleteZoneResponse), + deleteZoneMetadata.decode.bind(deleteZoneMetadata)), + createAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAssetResponse.decode.bind(createAssetResponse), + createAssetMetadata.decode.bind(createAssetMetadata)), + updateAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAssetResponse.decode.bind(updateAssetResponse), + updateAssetMetadata.decode.bind(updateAssetMetadata)), + deleteAsset: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAssetResponse.decode.bind(deleteAssetResponse), + deleteAssetMetadata.decode.bind(deleteAssetMetadata)), + createTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTaskResponse.decode.bind(createTaskResponse), + createTaskMetadata.decode.bind(createTaskMetadata)), + updateTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTaskResponse.decode.bind(updateTaskResponse), + updateTaskMetadata.decode.bind(updateTaskMetadata)), + deleteTask: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTaskResponse.decode.bind(deleteTaskResponse), + deleteTaskMetadata.decode.bind(deleteTaskMetadata)), + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataplexService', 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.dataplexServiceStub) { + return this.dataplexServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataplexService. + this.dataplexServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataplexService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataplexService, + 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 dataplexServiceStubMethods = + ['createLake', 'updateLake', 'deleteLake', 'listLakes', 'getLake', 'listLakeActions', 'createZone', 'updateZone', 'deleteZone', 'listZones', 'getZone', 'listZoneActions', 'createAsset', 'updateAsset', 'deleteAsset', 'listAssets', 'getAsset', 'listAssetActions', 'createTask', 'updateTask', 'deleteTask', 'listTasks', 'getTask', 'listJobs', 'runTask', 'getJob', 'cancelJob', 'createEnvironment', 'updateEnvironment', 'deleteEnvironment', 'listEnvironments', 'getEnvironment', 'listSessions']; + for (const methodName of dataplexServiceStubMethods) { + const callPromise = this.dataplexServiceStub.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.dataplexServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Retrieves a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_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.dataplex.v1.Lake|Lake}. + * Please see the {@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/dataplex_service.get_lake.js + * region_tag:dataplex_v1_generated_DataplexService_GetLake_async + */ + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|undefined, {}|undefined + ]>; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, + {}|null|undefined>): void; + getLake( + request: protos.google.cloud.dataplex.v1.IGetLakeRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, + {}|null|undefined>): void; + getLake( + request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.ILake, + protos.google.cloud.dataplex.v1.IGetLakeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getLake(request, options, callback); + } +/** + * Retrieves a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.dataplex.v1.Zone|Zone}. + * Please see the {@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/dataplex_service.get_zone.js + * region_tag:dataplex_v1_generated_DataplexService_GetZone_async + */ + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|undefined, {}|undefined + ]>; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, + {}|null|undefined>): void; + getZone( + request: protos.google.cloud.dataplex.v1.IGetZoneRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, + {}|null|undefined>): void; + getZone( + request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IZone, + protos.google.cloud.dataplex.v1.IGetZoneRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getZone(request, options, callback); + } +/** + * Retrieves an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_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.dataplex.v1.Asset|Asset}. + * Please see the {@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/dataplex_service.get_asset.js + * region_tag:dataplex_v1_generated_DataplexService_GetAsset_async + */ + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|undefined, {}|undefined + ]>; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, + {}|null|undefined>): void; + getAsset( + request: protos.google.cloud.dataplex.v1.IGetAssetRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, + {}|null|undefined>): void; + getAsset( + request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IAsset, + protos.google.cloud.dataplex.v1.IGetAssetRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getAsset(request, options, callback); + } +/** + * Get task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_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.dataplex.v1.Task|Task}. + * Please see the {@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/dataplex_service.get_task.js + * region_tag:dataplex_v1_generated_DataplexService_GetTask_async + */ + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|undefined, {}|undefined + ]>; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, + {}|null|undefined>): void; + getTask( + request: protos.google.cloud.dataplex.v1.IGetTaskRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, + {}|null|undefined>): void; + getTask( + request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.ITask, + protos.google.cloud.dataplex.v1.IGetTaskRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getTask(request, options, callback); + } +/** + * Run an on demand execution of a Task. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number[]} [request.labels] + * Optional. User-defined labels for the task. If the map is left empty, the + * task will run with existing labels from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * labels. If the map contains an entry with an existing label key in task + * definition, the task will run with new label value for that entry. Clearing + * an existing label will require label value to be explicitly set to a hyphen + * "-". The label value cannot be empty. + * @param {number[]} [request.args] + * Optional. Execution spec arguments. If the map is left empty, the task will + * run with existing execution spec args from task definition. If the map + * contains an entry with a new key, the same will be added to existing set of + * args. If the map contains an entry with an existing arg key in task + * definition, the task will run with new arg value for that entry. Clearing + * an existing arg will require arg value to be explicitly set to a hyphen + * "-". The arg value cannot be 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.dataplex.v1.RunTaskResponse|RunTaskResponse}. + * Please see the {@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/dataplex_service.run_task.js + * region_tag:dataplex_v1_generated_DataplexService_RunTask_async + */ + runTask( + request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|undefined, {}|undefined + ]>; + runTask( + request: protos.google.cloud.dataplex.v1.IRunTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, + {}|null|undefined>): void; + runTask( + request: protos.google.cloud.dataplex.v1.IRunTaskRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, + {}|null|undefined>): void; + runTask( + request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.runTask(request, options, callback); + } +/** + * Get job resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_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.dataplex.v1.Job|Job}. + * Please see the {@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/dataplex_service.get_job.js + * region_tag:dataplex_v1_generated_DataplexService_GetJob_async + */ + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|undefined, {}|undefined + ]>; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, + {}|null|undefined>): void; + getJob( + request: protos.google.cloud.dataplex.v1.IGetJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, + {}|null|undefined>): void; + getJob( + request?: protos.google.cloud.dataplex.v1.IGetJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IJob, + protos.google.cloud.dataplex.v1.IGetJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getJob(request, options, callback); + } +/** + * Cancel jobs running for the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_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/v1/dataplex_service.cancel_job.js + * region_tag:dataplex_v1_generated_DataplexService_CancelJob_async + */ + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|undefined, {}|undefined + ]>; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, + {}|null|undefined>): void; + cancelJob( + request: protos.google.cloud.dataplex.v1.ICancelJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, + {}|null|undefined>): void; + cancelJob( + request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.cancelJob(request, options, callback); + } +/** + * Get environment resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_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.dataplex.v1.Environment|Environment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.get_environment.js + * region_tag:dataplex_v1_generated_DataplexService_GetEnvironment_async + */ + getEnvironment( + request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>; + getEnvironment( + request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEnvironment, + protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } + +/** + * Creates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * projects/{project_number}/locations/{location_id} + * where `location_id` refers to a GCP region. + * @param {string} request.lakeId + * Required. Lake identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Lake resource + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createLake( + request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createLake( + request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, + 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.createLake(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createLake()`. + * @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/dataplex_service.create_lake.js + * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async + */ + async checkCreateLakeProgress(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.createLake, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a lake resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Lake} request.lake + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateLake( + request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateLake( + request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, + 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({ + 'lake.name': request.lake!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateLake(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateLake()`. + * @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/dataplex_service.update_lake.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async + */ + async checkUpdateLakeProgress(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.updateLake, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a lake resource. All zones within the lake must be deleted before + * the lake can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_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/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteLake( + request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteLake( + request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteLake(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteLake()`. + * @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/dataplex_service.delete_lake.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async + */ + async checkDeleteLakeProgress(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.deleteLake, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a zone resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.zoneId + * Required. Zone identifier. + * This ID will be used to generate names such as database and dataset names + * when publishing metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique across all lakes from all locations in a project. + * * Must not be one of the reserved IDs (i.e. "default", "global-temp") + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Zone resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createZone( + request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createZone( + request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, + 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.createZone(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createZone()`. + * @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/dataplex_service.create_zone.js + * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async + */ + async checkCreateZoneProgress(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.createZone, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a zone resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Zone} request.zone + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateZone( + request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateZone( + request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, + 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({ + 'zone.name': request.zone!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateZone(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateZone()`. + * @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/dataplex_service.update_zone.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async + */ + async checkUpdateZoneProgress(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.updateZone, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a zone resource. All assets within a zone must be deleted before + * the zone can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteZone( + request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteZone( + request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteZone(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteZone()`. + * @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/dataplex_service.delete_zone.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async + */ + async checkDeleteZoneProgress(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.deleteZone, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {string} request.assetId + * Required. Asset identifier. + * This ID will be used to generate names such as table names when publishing + * metadata to Hive Metastore and BigQuery. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the zone. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Asset resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAsset( + request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAsset( + request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, + 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.createAsset(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAsset()`. + * @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/dataplex_service.create_asset.js + * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async + */ + async checkCreateAssetProgress(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.createAsset, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an asset resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Asset} request.asset + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAsset( + request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAsset( + request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, + 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({ + 'asset.name': request.asset!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAsset(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAsset()`. + * @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/dataplex_service.update_asset.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async + */ + async checkUpdateAssetProgress(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.updateAsset, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes an asset resource. The referenced storage resource is detached + * (default) or deleted based on the associated Lifecycle policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_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/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAsset( + request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAsset( + request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAsset(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAsset()`. + * @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/dataplex_service.delete_asset.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async + */ + async checkDeleteAssetProgress(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.deleteAsset, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a task resource within a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.taskId + * Required. Task identifier. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Task resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTask( + request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTask( + request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, + 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.createTask(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createTask()`. + * @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/dataplex_service.create_task.js + * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async + */ + async checkCreateTaskProgress(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.createTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Update the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Task} request.task + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTask( + request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTask( + request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, + 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({ + 'task.name': request.task!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateTask(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateTask()`. + * @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/dataplex_service.update_task.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async + */ + async checkUpdateTaskProgress(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.updateTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Delete the task resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_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/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteTask( + request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteTask( + request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteTask(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteTask()`. + * @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/dataplex_service.delete_task.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async + */ + async checkDeleteTaskProgress(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.deleteTask, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create an environment resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param {string} request.environmentId + * Required. Environment identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the lake. + * @param {google.cloud.dataplex.v1.Environment} request.environment + * Required. Environment resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_environment.js + * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async + */ + createEnvironment( + request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createEnvironment( + request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.create_environment.js + * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async + */ + async checkCreateEnvironmentProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Update the environment resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.dataplex.v1.Environment} request.environment + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_environment.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async + */ + updateEnvironment( + request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateEnvironment( + request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'environment.name': request.environment!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.update_environment.js + * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async + */ + async checkUpdateEnvironmentProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Delete the environment resource. All the child resources must have been + * deleted before environment deletion can be initiated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the environment: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_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/dataplex_service.delete_environment.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async + */ + deleteEnvironment( + request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteEnvironment( + request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.delete_environment.js + * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async + */ + async checkDeleteEnvironmentProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists lake resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Lake|Lake}. + * 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 `listLakesAsync()` + * 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. + */ + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest|null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ]>; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ILake>): void; + listLakes( + request: protos.google.cloud.dataplex.v1.IListLakesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ILake>): void; + listLakes( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ILake>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakesRequest, + protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, + protos.google.cloud.dataplex.v1.ILake>): + Promise<[ + protos.google.cloud.dataplex.v1.ILake[], + protos.google.cloud.dataplex.v1.IListLakesRequest|null, + protos.google.cloud.dataplex.v1.IListLakesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listLakes(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 resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Lake|Lake} 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 `listLakesAsync()` + * 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. + */ + listLakesStream( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + 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['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.createStream( + this.innerApiCalls.listLakes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listLakes`, 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 resource name of the lake location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of Lakes to return. The service may return fewer + * than this value. If unspecified, at most 10 lakes will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakes` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListLakes` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Lake|Lake}. 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/dataplex_service.list_lakes.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async + */ + listLakesAsync( + request?: protos.google.cloud.dataplex.v1.IListLakesRequest, + 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['listLakes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakes.asyncIterate( + this.innerApiCalls['listLakes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. + * 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 `listLakeActionsAsync()` + * 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. + */ + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listLakeActions( + request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listLakeActions( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListLakeActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listLakeActions(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listLakeActionsAsync()` + * 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. + */ + listLakeActionsStream( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + 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['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.createStream( + this.innerApiCalls.listLakeActions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listLakeActions`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListLakeActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListLakeActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_lake_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async + */ + listLakeActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, + 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['listLakeActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listLakeActions.asyncIterate( + this.innerApiCalls['listLakeActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists zone resources in a lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Zone|Zone}. + * 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 `listZonesAsync()` + * 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. + */ + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest|null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ]>; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IZone>): void; + listZones( + request: protos.google.cloud.dataplex.v1.IListZonesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IZone>): void; + listZones( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IZone>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZonesRequest, + protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IZone>): + Promise<[ + protos.google.cloud.dataplex.v1.IZone[], + protos.google.cloud.dataplex.v1.IListZonesRequest|null, + protos.google.cloud.dataplex.v1.IListZonesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listZones(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Zone|Zone} 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 `listZonesAsync()` + * 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. + */ + listZonesStream( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + 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['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.createStream( + this.innerApiCalls.listZones as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listZones`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of zones to return. The service may return fewer + * than this value. If unspecified, at most 10 zones will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Zone|Zone}. 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/dataplex_service.list_zones.js + * region_tag:dataplex_v1_generated_DataplexService_ListZones_async + */ + listZonesAsync( + request?: protos.google.cloud.dataplex.v1.IListZonesRequest, + 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['listZones']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZones.asyncIterate( + this.innerApiCalls['listZones'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. + * 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 `listZoneActionsAsync()` + * 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. + */ + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listZoneActions( + request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listZoneActions( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListZoneActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listZoneActions(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listZoneActionsAsync()` + * 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. + */ + listZoneActionsStream( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + 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['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.createStream( + this.innerApiCalls.listZoneActions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listZoneActions`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZoneActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListZoneActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_zone_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async + */ + listZoneActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, + 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['listZoneActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listZoneActions.asyncIterate( + this.innerApiCalls['listZoneActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists asset resources in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Asset|Asset}. + * 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 `listAssetsAsync()` + * 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. + */ + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest|null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ]>; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAsset>): void; + listAssets( + request: protos.google.cloud.dataplex.v1.IListAssetsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAsset>): void; + listAssets( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAsset>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetsRequest, + protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAsset>): + Promise<[ + protos.google.cloud.dataplex.v1.IAsset[], + protos.google.cloud.dataplex.v1.IListAssetsRequest|null, + protos.google.cloud.dataplex.v1.IListAssetsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listAssets(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Asset|Asset} 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 `listAssetsAsync()` + * 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. + */ + listAssetsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + 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['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.createStream( + this.innerApiCalls.listAssets as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAssets`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of asset to return. The service may return fewer + * than this value. If unspecified, at most 10 assets will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssets` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListAssets` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Asset|Asset}. 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/dataplex_service.list_assets.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async + */ + listAssetsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, + 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['listAssets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssets.asyncIterate( + this.innerApiCalls['listAssets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists action resources in an asset. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. + * 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 `listAssetActionsAsync()` + * 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. + */ + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listAssetActions( + request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): void; + listAssetActions( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IAction>): + Promise<[ + protos.google.cloud.dataplex.v1.IAction[], + protos.google.cloud.dataplex.v1.IListAssetActionsRequest|null, + protos.google.cloud.dataplex.v1.IListActionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listAssetActions(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 resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listAssetActionsAsync()` + * 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. + */ + listAssetActionsStream( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + 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['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.createStream( + this.innerApiCalls.listAssetActions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAssetActions`, 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 resource name of the parent asset: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of actions to return. The service may return fewer + * than this value. If unspecified, at most 10 actions will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListAssetActions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListAssetActions` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_asset_actions.js + * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async + */ + listAssetActionsAsync( + request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, + 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['listAssetActions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAssetActions.asyncIterate( + this.innerApiCalls['listAssetActions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists tasks under the given lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Task|Task}. + * 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 `listTasksAsync()` + * 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. + */ + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest|null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ]>; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, + protos.google.cloud.dataplex.v1.ITask>): void; + listTasks( + request: protos.google.cloud.dataplex.v1.IListTasksRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, + protos.google.cloud.dataplex.v1.ITask>): void; + listTasks( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, + protos.google.cloud.dataplex.v1.ITask>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListTasksRequest, + protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, + protos.google.cloud.dataplex.v1.ITask>): + Promise<[ + protos.google.cloud.dataplex.v1.ITask[], + protos.google.cloud.dataplex.v1.IListTasksRequest|null, + protos.google.cloud.dataplex.v1.IListTasksResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listTasks(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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Task|Task} 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 `listTasksAsync()` + * 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. + */ + listTasksStream( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + 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['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.createStream( + this.innerApiCalls.listTasks as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTasks`, 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 resource name of the parent lake: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of tasks to return. The service may return fewer + * than this value. If unspecified, at most 10 tasks will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListZones` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListZones` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Task|Task}. 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/dataplex_service.list_tasks.js + * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async + */ + listTasksAsync( + request?: protos.google.cloud.dataplex.v1.IListTasksRequest, + 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['listTasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTasks.asyncIterate( + this.innerApiCalls['listTasks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Jobs under the given task. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Job|Job}. + * 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 `listJobsAsync()` + * 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. + */ + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest|null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ]>; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IJob>): void; + listJobs( + request: protos.google.cloud.dataplex.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IJob>): void; + listJobs( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IJob>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListJobsRequest, + protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IJob>): + Promise<[ + protos.google.cloud.dataplex.v1.IJob[], + protos.google.cloud.dataplex.v1.IListJobsRequest|null, + protos.google.cloud.dataplex.v1.IListJobsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listJobs(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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Job|Job} 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 `listJobsAsync()` + * 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. + */ + listJobsStream( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + 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['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.createStream( + this.innerApiCalls.listJobs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listJobs`, 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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of jobs to return. The service may return fewer + * than this value. If unspecified, at most 10 jobs will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListJobs` call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListJobs` must match the call that provided the page + * token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dataplex.v1.Job|Job}. 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/dataplex_service.list_jobs.js + * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async + */ + listJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListJobsRequest, + 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['listJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobs.asyncIterate( + this.innerApiCalls['listJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists environments under the given lake. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Environment|Environment}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listEnvironmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listEnvironments( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEnvironment[], + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest|null, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + ]>; + listEnvironments( + request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEnvironment>): void; + listEnvironments( + request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEnvironment>): void; + listEnvironments( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEnvironment>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEnvironment>): + Promise<[ + protos.google.cloud.dataplex.v1.IEnvironment[], + protos.google.cloud.dataplex.v1.IListEnvironmentsRequest|null, + protos.google.cloud.dataplex.v1.IListEnvironmentsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listEnvironments(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Environment|Environment} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listEnvironmentsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listEnvironmentsStream( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEnvironments`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent lake: + * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of environments to return. The service may return + * fewer than this value. If unspecified, at most 10 environments will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEnvironments` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListEnvironments` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields for the result. + * @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.dataplex.v1.Environment|Environment}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.list_environments.js + * region_tag:dataplex_v1_generated_DataplexService_ListEnvironments_async + */ + listEnvironmentsAsync( + request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists session resources in an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * + * mode = ADMIN | USER + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Session|Session}. + * 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 `listSessionsAsync()` + * 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. + */ + listSessions( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.ISession[], + protos.google.cloud.dataplex.v1.IListSessionsRequest|null, + protos.google.cloud.dataplex.v1.IListSessionsResponse + ]>; + listSessions( + request: protos.google.cloud.dataplex.v1.IListSessionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISession>): void; + listSessions( + request: protos.google.cloud.dataplex.v1.IListSessionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISession>): void; + listSessions( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISession>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListSessionsRequest, + protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.ISession>): + Promise<[ + protos.google.cloud.dataplex.v1.ISession[], + protos.google.cloud.dataplex.v1.IListSessionsRequest|null, + protos.google.cloud.dataplex.v1.IListSessionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listSessions(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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * + * mode = ADMIN | USER + * @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.dataplex.v1.Session|Session} 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 `listSessionsAsync()` + * 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. + */ + listSessionsStream( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, + 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['listSessions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSessions.createStream( + this.innerApiCalls.listSessions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listSessions`, 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 resource name of the parent environment: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of sessions to return. The service may return + * fewer than this value. If unspecified, at most 10 sessions will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListSessions` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListSessions` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. The following `mode` filter is supported to + * return only the sessions belonging to the requester when the mode is USER + * and return sessions of all the users when the mode is ADMIN. When no filter + * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester + * should have `dataplex.environments.listAllSessions` permission to list all + * sessions, in absence of the permission, the request fails. + * + * mode = ADMIN | USER + * @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.dataplex.v1.Session|Session}. 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/dataplex_service.list_sessions.js + * region_tag:dataplex_v1_generated_DataplexService_ListSessions_async + */ + listSessionsAsync( + request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, + 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['listSessions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSessions.asyncIterate( + this.innerApiCalls['listSessions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * 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 metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.dataplexServiceStub && !this._terminated) { + return this.dataplexServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json new file mode 100644 index 00000000000..c90740bba85 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json @@ -0,0 +1,201 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataplexService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteLake": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListLakes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetLake": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListLakeActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteZone": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListZones": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetZone": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListZoneActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAssetActions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTask": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "RunTask": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CancelJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListSessions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..a3c2ba6473e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json @@ -0,0 +1,1189 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "@google-cloud/dataplex", + "services": { + "CatalogService": { + "clients": { + "grpc": { + "libraryClient": "CatalogServiceClient", + "rpcs": { + "GetEntryType": { + "methods": [ + "getEntryType" + ] + }, + "GetAspectType": { + "methods": [ + "getAspectType" + ] + }, + "GetEntryGroup": { + "methods": [ + "getEntryGroup" + ] + }, + "CreateEntry": { + "methods": [ + "createEntry" + ] + }, + "UpdateEntry": { + "methods": [ + "updateEntry" + ] + }, + "DeleteEntry": { + "methods": [ + "deleteEntry" + ] + }, + "GetEntry": { + "methods": [ + "getEntry" + ] + }, + "LookupEntry": { + "methods": [ + "lookupEntry" + ] + }, + "GetMetadataJob": { + "methods": [ + "getMetadataJob" + ] + }, + "CancelMetadataJob": { + "methods": [ + "cancelMetadataJob" + ] + }, + "CreateEntryType": { + "methods": [ + "createEntryType" + ] + }, + "UpdateEntryType": { + "methods": [ + "updateEntryType" + ] + }, + "DeleteEntryType": { + "methods": [ + "deleteEntryType" + ] + }, + "CreateAspectType": { + "methods": [ + "createAspectType" + ] + }, + "UpdateAspectType": { + "methods": [ + "updateAspectType" + ] + }, + "DeleteAspectType": { + "methods": [ + "deleteAspectType" + ] + }, + "CreateEntryGroup": { + "methods": [ + "createEntryGroup" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "updateEntryGroup" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "deleteEntryGroup" + ] + }, + "CreateMetadataJob": { + "methods": [ + "createMetadataJob" + ] + }, + "ListEntryTypes": { + "methods": [ + "listEntryTypes", + "listEntryTypesStream", + "listEntryTypesAsync" + ] + }, + "ListAspectTypes": { + "methods": [ + "listAspectTypes", + "listAspectTypesStream", + "listAspectTypesAsync" + ] + }, + "ListEntryGroups": { + "methods": [ + "listEntryGroups", + "listEntryGroupsStream", + "listEntryGroupsAsync" + ] + }, + "ListEntries": { + "methods": [ + "listEntries", + "listEntriesStream", + "listEntriesAsync" + ] + }, + "SearchEntries": { + "methods": [ + "searchEntries", + "searchEntriesStream", + "searchEntriesAsync" + ] + }, + "ListMetadataJobs": { + "methods": [ + "listMetadataJobs", + "listMetadataJobsStream", + "listMetadataJobsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CatalogServiceClient", + "rpcs": { + "GetEntryType": { + "methods": [ + "getEntryType" + ] + }, + "GetAspectType": { + "methods": [ + "getAspectType" + ] + }, + "GetEntryGroup": { + "methods": [ + "getEntryGroup" + ] + }, + "CreateEntry": { + "methods": [ + "createEntry" + ] + }, + "UpdateEntry": { + "methods": [ + "updateEntry" + ] + }, + "DeleteEntry": { + "methods": [ + "deleteEntry" + ] + }, + "GetEntry": { + "methods": [ + "getEntry" + ] + }, + "LookupEntry": { + "methods": [ + "lookupEntry" + ] + }, + "GetMetadataJob": { + "methods": [ + "getMetadataJob" + ] + }, + "CancelMetadataJob": { + "methods": [ + "cancelMetadataJob" + ] + }, + "CreateEntryType": { + "methods": [ + "createEntryType" + ] + }, + "UpdateEntryType": { + "methods": [ + "updateEntryType" + ] + }, + "DeleteEntryType": { + "methods": [ + "deleteEntryType" + ] + }, + "CreateAspectType": { + "methods": [ + "createAspectType" + ] + }, + "UpdateAspectType": { + "methods": [ + "updateAspectType" + ] + }, + "DeleteAspectType": { + "methods": [ + "deleteAspectType" + ] + }, + "CreateEntryGroup": { + "methods": [ + "createEntryGroup" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "updateEntryGroup" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "deleteEntryGroup" + ] + }, + "CreateMetadataJob": { + "methods": [ + "createMetadataJob" + ] + }, + "ListEntryTypes": { + "methods": [ + "listEntryTypes", + "listEntryTypesStream", + "listEntryTypesAsync" + ] + }, + "ListAspectTypes": { + "methods": [ + "listAspectTypes", + "listAspectTypesStream", + "listAspectTypesAsync" + ] + }, + "ListEntryGroups": { + "methods": [ + "listEntryGroups", + "listEntryGroupsStream", + "listEntryGroupsAsync" + ] + }, + "ListEntries": { + "methods": [ + "listEntries", + "listEntriesStream", + "listEntriesAsync" + ] + }, + "SearchEntries": { + "methods": [ + "searchEntries", + "searchEntriesStream", + "searchEntriesAsync" + ] + }, + "ListMetadataJobs": { + "methods": [ + "listMetadataJobs", + "listMetadataJobsStream", + "listMetadataJobsAsync" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "CreateContent": { + "methods": [ + "createContent" + ] + }, + "UpdateContent": { + "methods": [ + "updateContent" + ] + }, + "DeleteContent": { + "methods": [ + "deleteContent" + ] + }, + "GetContent": { + "methods": [ + "getContent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContentServiceClient", + "rpcs": { + "CreateContent": { + "methods": [ + "createContent" + ] + }, + "UpdateContent": { + "methods": [ + "updateContent" + ] + }, + "DeleteContent": { + "methods": [ + "deleteContent" + ] + }, + "GetContent": { + "methods": [ + "getContent" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "ListContent": { + "methods": [ + "listContent", + "listContentStream", + "listContentAsync" + ] + } + } + } + } + }, + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "RunTask": { + "methods": [ + "runTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListSessions": { + "methods": [ + "listSessions", + "listSessionsStream", + "listSessionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataplexServiceClient", + "rpcs": { + "GetLake": { + "methods": [ + "getLake" + ] + }, + "GetZone": { + "methods": [ + "getZone" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "RunTask": { + "methods": [ + "runTask" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "CancelJob": { + "methods": [ + "cancelJob" + ] + }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "CreateLake": { + "methods": [ + "createLake" + ] + }, + "UpdateLake": { + "methods": [ + "updateLake" + ] + }, + "DeleteLake": { + "methods": [ + "deleteLake" + ] + }, + "CreateZone": { + "methods": [ + "createZone" + ] + }, + "UpdateZone": { + "methods": [ + "updateZone" + ] + }, + "DeleteZone": { + "methods": [ + "deleteZone" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "ListLakes": { + "methods": [ + "listLakes", + "listLakesStream", + "listLakesAsync" + ] + }, + "ListLakeActions": { + "methods": [ + "listLakeActions", + "listLakeActionsStream", + "listLakeActionsAsync" + ] + }, + "ListZones": { + "methods": [ + "listZones", + "listZonesStream", + "listZonesAsync" + ] + }, + "ListZoneActions": { + "methods": [ + "listZoneActions", + "listZoneActionsStream", + "listZoneActionsAsync" + ] + }, + "ListAssets": { + "methods": [ + "listAssets", + "listAssetsStream", + "listAssetsAsync" + ] + }, + "ListAssetActions": { + "methods": [ + "listAssetActions", + "listAssetActionsStream", + "listAssetActionsAsync" + ] + }, + "ListTasks": { + "methods": [ + "listTasks", + "listTasksStream", + "listTasksAsync" + ] + }, + "ListJobs": { + "methods": [ + "listJobs", + "listJobsStream", + "listJobsAsync" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListSessions": { + "methods": [ + "listSessions", + "listSessionsStream", + "listSessionsAsync" + ] + } + } + } + } + }, + "DataScanService": { + "clients": { + "grpc": { + "libraryClient": "DataScanServiceClient", + "rpcs": { + "GetDataScan": { + "methods": [ + "getDataScan" + ] + }, + "RunDataScan": { + "methods": [ + "runDataScan" + ] + }, + "GetDataScanJob": { + "methods": [ + "getDataScanJob" + ] + }, + "GenerateDataQualityRules": { + "methods": [ + "generateDataQualityRules" + ] + }, + "CreateDataScan": { + "methods": [ + "createDataScan" + ] + }, + "UpdateDataScan": { + "methods": [ + "updateDataScan" + ] + }, + "DeleteDataScan": { + "methods": [ + "deleteDataScan" + ] + }, + "ListDataScans": { + "methods": [ + "listDataScans", + "listDataScansStream", + "listDataScansAsync" + ] + }, + "ListDataScanJobs": { + "methods": [ + "listDataScanJobs", + "listDataScanJobsStream", + "listDataScanJobsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataScanServiceClient", + "rpcs": { + "GetDataScan": { + "methods": [ + "getDataScan" + ] + }, + "RunDataScan": { + "methods": [ + "runDataScan" + ] + }, + "GetDataScanJob": { + "methods": [ + "getDataScanJob" + ] + }, + "GenerateDataQualityRules": { + "methods": [ + "generateDataQualityRules" + ] + }, + "CreateDataScan": { + "methods": [ + "createDataScan" + ] + }, + "UpdateDataScan": { + "methods": [ + "updateDataScan" + ] + }, + "DeleteDataScan": { + "methods": [ + "deleteDataScan" + ] + }, + "ListDataScans": { + "methods": [ + "listDataScans", + "listDataScansStream", + "listDataScansAsync" + ] + }, + "ListDataScanJobs": { + "methods": [ + "listDataScanJobs", + "listDataScanJobsStream", + "listDataScanJobsAsync" + ] + } + } + } + } + }, + "DataTaxonomyService": { + "clients": { + "grpc": { + "libraryClient": "DataTaxonomyServiceClient", + "rpcs": { + "GetDataTaxonomy": { + "methods": [ + "getDataTaxonomy" + ] + }, + "GetDataAttributeBinding": { + "methods": [ + "getDataAttributeBinding" + ] + }, + "GetDataAttribute": { + "methods": [ + "getDataAttribute" + ] + }, + "CreateDataTaxonomy": { + "methods": [ + "createDataTaxonomy" + ] + }, + "UpdateDataTaxonomy": { + "methods": [ + "updateDataTaxonomy" + ] + }, + "DeleteDataTaxonomy": { + "methods": [ + "deleteDataTaxonomy" + ] + }, + "CreateDataAttributeBinding": { + "methods": [ + "createDataAttributeBinding" + ] + }, + "UpdateDataAttributeBinding": { + "methods": [ + "updateDataAttributeBinding" + ] + }, + "DeleteDataAttributeBinding": { + "methods": [ + "deleteDataAttributeBinding" + ] + }, + "CreateDataAttribute": { + "methods": [ + "createDataAttribute" + ] + }, + "UpdateDataAttribute": { + "methods": [ + "updateDataAttribute" + ] + }, + "DeleteDataAttribute": { + "methods": [ + "deleteDataAttribute" + ] + }, + "ListDataTaxonomies": { + "methods": [ + "listDataTaxonomies", + "listDataTaxonomiesStream", + "listDataTaxonomiesAsync" + ] + }, + "ListDataAttributeBindings": { + "methods": [ + "listDataAttributeBindings", + "listDataAttributeBindingsStream", + "listDataAttributeBindingsAsync" + ] + }, + "ListDataAttributes": { + "methods": [ + "listDataAttributes", + "listDataAttributesStream", + "listDataAttributesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataTaxonomyServiceClient", + "rpcs": { + "GetDataTaxonomy": { + "methods": [ + "getDataTaxonomy" + ] + }, + "GetDataAttributeBinding": { + "methods": [ + "getDataAttributeBinding" + ] + }, + "GetDataAttribute": { + "methods": [ + "getDataAttribute" + ] + }, + "CreateDataTaxonomy": { + "methods": [ + "createDataTaxonomy" + ] + }, + "UpdateDataTaxonomy": { + "methods": [ + "updateDataTaxonomy" + ] + }, + "DeleteDataTaxonomy": { + "methods": [ + "deleteDataTaxonomy" + ] + }, + "CreateDataAttributeBinding": { + "methods": [ + "createDataAttributeBinding" + ] + }, + "UpdateDataAttributeBinding": { + "methods": [ + "updateDataAttributeBinding" + ] + }, + "DeleteDataAttributeBinding": { + "methods": [ + "deleteDataAttributeBinding" + ] + }, + "CreateDataAttribute": { + "methods": [ + "createDataAttribute" + ] + }, + "UpdateDataAttribute": { + "methods": [ + "updateDataAttribute" + ] + }, + "DeleteDataAttribute": { + "methods": [ + "deleteDataAttribute" + ] + }, + "ListDataTaxonomies": { + "methods": [ + "listDataTaxonomies", + "listDataTaxonomiesStream", + "listDataTaxonomiesAsync" + ] + }, + "ListDataAttributeBindings": { + "methods": [ + "listDataAttributeBindings", + "listDataAttributeBindingsStream", + "listDataAttributeBindingsAsync" + ] + }, + "ListDataAttributes": { + "methods": [ + "listDataAttributes", + "listDataAttributesStream", + "listDataAttributesAsync" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "CreateEntity": { + "methods": [ + "createEntity" + ] + }, + "UpdateEntity": { + "methods": [ + "updateEntity" + ] + }, + "DeleteEntity": { + "methods": [ + "deleteEntity" + ] + }, + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "CreatePartition": { + "methods": [ + "createPartition" + ] + }, + "DeletePartition": { + "methods": [ + "deletePartition" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MetadataServiceClient", + "rpcs": { + "CreateEntity": { + "methods": [ + "createEntity" + ] + }, + "UpdateEntity": { + "methods": [ + "updateEntity" + ] + }, + "DeleteEntity": { + "methods": [ + "deleteEntity" + ] + }, + "GetEntity": { + "methods": [ + "getEntity" + ] + }, + "CreatePartition": { + "methods": [ + "createPartition" + ] + }, + "DeletePartition": { + "methods": [ + "deletePartition" + ] + }, + "GetPartition": { + "methods": [ + "getPartition" + ] + }, + "ListEntities": { + "methods": [ + "listEntities", + "listEntitiesStream", + "listEntitiesAsync" + ] + }, + "ListPartitions": { + "methods": [ + "listPartitions", + "listPartitionsStream", + "listPartitionsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts new file mode 100644 index 00000000000..99f0bc69c1d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts @@ -0,0 +1,24 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {CatalogServiceClient} from './catalog_service_client'; +export {ContentServiceClient} from './content_service_client'; +export {DataplexServiceClient} from './dataplex_service_client'; +export {DataScanServiceClient} from './data_scan_service_client'; +export {DataTaxonomyServiceClient} from './data_taxonomy_service_client'; +export {MetadataServiceClient} from './metadata_service_client'; diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts new file mode 100644 index 00000000000..8d7d39f0847 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts @@ -0,0 +1,3147 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/metadata_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './metadata_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Metadata service manages metadata resources such as tables, filesets and + * partitions. + * @class + * @memberof v1 + */ +export class MetadataServiceClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + metadataServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MetadataServiceClient. + * + * @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 MetadataServiceClient({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 MetadataServiceClient; + 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 = 'dataplex.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + aspectTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' + ), + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataAttributePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' + ), + dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + 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}' + ), + entryTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/entryTypes/{entry_type}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // 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 = { + listEntities: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entities'), + listPartitions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'partitions') + }; + + 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + + this.descriptors.longrunning = { + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.MetadataService', 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.metadataServiceStub) { + return this.metadataServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.MetadataService. + this.metadataServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.MetadataService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.MetadataService, + 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 metadataServiceStubMethods = + ['createEntity', 'updateEntity', 'deleteEntity', 'getEntity', 'listEntities', 'createPartition', 'deletePartition', 'getPartition', 'listPartitions']; + for (const methodName of metadataServiceStubMethods) { + const callPromise = this.metadataServiceStub.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.metadataServiceStub; + } + + /** + * 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 'dataplex.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 'dataplex.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 -- + // ------------------- +/** + * Create a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.Entity} request.entity + * Required. Entity resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. + * Please see the {@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/metadata_service.create_entity.js + * region_tag:dataplex_v1_generated_MetadataService_CreateEntity_async + */ + createEntity( + request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|undefined, {}|undefined + ]>; + createEntity( + request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, + {}|null|undefined>): void; + createEntity( + request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, + {}|null|undefined>): void; + createEntity( + request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.ICreateEntityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.createEntity(request, options, callback); + } +/** + * Update a metadata entity. Only supports full resource update. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.Entity} request.entity + * Required. Update description. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. + * Please see the {@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/metadata_service.update_entity.js + * region_tag:dataplex_v1_generated_MetadataService_UpdateEntity_async + */ + updateEntity( + request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|undefined, {}|undefined + ]>; + updateEntity( + request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, + {}|null|undefined>): void; + updateEntity( + request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, + {}|null|undefined>): void; + updateEntity( + request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IUpdateEntityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'entity.name': request.entity!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEntity(request, options, callback); + } +/** + * Delete a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {string} request.etag + * Required. The etag associated with the entity, which can be retrieved with + * a {@link protos.|GetEntity} 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 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/metadata_service.delete_entity.js + * region_tag:dataplex_v1_generated_MetadataService_DeleteEntity_async + */ + deleteEntity( + request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|undefined, {}|undefined + ]>; + deleteEntity( + request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, + {}|null|undefined>): void; + deleteEntity( + request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, + {}|null|undefined>): void; + deleteEntity( + request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeleteEntityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.deleteEntity(request, options, callback); + } +/** + * Get a metadata entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + * @param {google.cloud.dataplex.v1.GetEntityRequest.EntityView} [request.view] + * Optional. Used to select the subset of entity information to return. + * Defaults to `BASIC`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. + * Please see the {@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/metadata_service.get_entity.js + * region_tag:dataplex_v1_generated_MetadataService_GetEntity_async + */ + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|undefined, {}|undefined + ]>; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, + {}|null|undefined>): void; + getEntity( + request: protos.google.cloud.dataplex.v1.IGetEntityRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, + {}|null|undefined>): void; + getEntity( + request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity, + protos.google.cloud.dataplex.v1.IGetEntityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getEntity(request, options, callback); + } +/** + * Create a metadata partition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {google.cloud.dataplex.v1.Partition} request.partition + * Required. Partition resource. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition}. + * Please see the {@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/metadata_service.create_partition.js + * region_tag:dataplex_v1_generated_MetadataService_CreatePartition_async + */ + createPartition( + request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|undefined, {}|undefined + ]>; + createPartition( + request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, + {}|null|undefined>): void; + createPartition( + request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, + {}|null|undefined>): void; + createPartition( + request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.ICreatePartitionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.createPartition(request, options, callback); + } +/** + * Delete a metadata partition. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partition. + * format: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @param {string} [request.etag] + * Optional. The etag associated with the partition. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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/metadata_service.delete_partition.js + * region_tag:dataplex_v1_generated_MetadataService_DeletePartition_async + */ + deletePartition( + request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|undefined, {}|undefined + ]>; + deletePartition( + request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, + {}|null|undefined>): void; + deletePartition( + request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, + {}|null|undefined>): void; + deletePartition( + request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IDeletePartitionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.deletePartition(request, options, callback); + } +/** + * Get a metadata partition of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the partition: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + * The {partition_value_path} segment consists of an ordered sequence of + * partition values separated by "/". All values must be provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition}. + * Please see the {@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/metadata_service.get_partition.js + * region_tag:dataplex_v1_generated_MetadataService_GetPartition_async + */ + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|undefined, {}|undefined + ]>; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, + {}|null|undefined>): void; + getPartition( + request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, + {}|null|undefined>): void; + getPartition( + request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition, + protos.google.cloud.dataplex.v1.IGetPartitionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getPartition(request, options, callback); + } + + /** + * List metadata entities in a zone. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Entity|Entity}. + * 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 `listEntitiesAsync()` + * 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. + */ + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest|null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ]>; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntity>): void; + listEntities( + request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntity>): void; + listEntities( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntity>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntitiesRequest, + protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, + protos.google.cloud.dataplex.v1.IEntity>): + Promise<[ + protos.google.cloud.dataplex.v1.IEntity[], + protos.google.cloud.dataplex.v1.IListEntitiesRequest|null, + protos.google.cloud.dataplex.v1.IListEntitiesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listEntities(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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * @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.dataplex.v1.Entity|Entity} 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 `listEntitiesAsync()` + * 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. + */ + listEntitiesStream( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + 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['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.createStream( + this.innerApiCalls.listEntities as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEntities`, 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 resource name of the parent zone: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view + * Required. Specify the entity view to make a partial list request. + * @param {number} [request.pageSize] + * Optional. Maximum number of entities to return. The service may return + * fewer than this value. If unspecified, 100 entities will be returned by + * default. The maximum value is 500; larger values will will be truncated to + * 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntities` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListEntities` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. The following filter parameters can be added to the URL to limit + * the entities returned by the API: + * + * - Entity ID: ?filter="id=entityID" + * - Asset ID: ?filter="asset=assetID" + * - Data path ?filter="data_path=gs://my-bucket" + * - Is HIVE compatible: ?filter="hive_compatible=true" + * - Is BigQuery compatible: ?filter="bigquery_compatible=true" + * @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.dataplex.v1.Entity|Entity}. 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/metadata_service.list_entities.js + * region_tag:dataplex_v1_generated_MetadataService_ListEntities_async + */ + listEntitiesAsync( + request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, + 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['listEntities']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEntities.asyncIterate( + this.innerApiCalls['listEntities'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List metadata partitions of an entity. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Partition|Partition}. + * 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 `listPartitionsAsync()` + * 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. + */ + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest|null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ]>; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IPartition>): void; + listPartitions( + request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IPartition>): void; + listPartitions( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IPartition>, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListPartitionsRequest, + protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, + protos.google.cloud.dataplex.v1.IPartition>): + Promise<[ + protos.google.cloud.dataplex.v1.IPartition[], + protos.google.cloud.dataplex.v1.IListPartitionsRequest|null, + protos.google.cloud.dataplex.v1.IListPartitionsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listPartitions(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 resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition} 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 `listPartitionsAsync()` + * 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. + */ + listPartitionsStream( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + 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['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.createStream( + this.innerApiCalls.listPartitions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPartitions`, 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 resource name of the parent entity: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of partitions to return. The service may return + * fewer than this value. If unspecified, 100 partitions will be returned by + * default. The maximum page size is 500; larger values will will be truncated + * to 500. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListPartitions` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListPartitions` must match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter the partitions returned to the caller using a key value + * pair expression. Supported operators and syntax: + * + * - logic operators: AND, OR + * - comparison operators: <, >, >=, <= ,=, != + * - LIKE operators: + * - The right hand of a LIKE operator supports "." and + * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + * - parenthetical grouping: ( ) + * + * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + * + * **Notes:** + * + * - Keys to the left of operators are case insensitive. + * - Partition results are sorted first by creation time, then by + * lexicographic order. + * - Up to 20 key value filter pairs are allowed, but due to performance + * considerations, only the first 10 will be used as a filter. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.dataplex.v1.Partition|Partition}. 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/metadata_service.list_partitions.js + * region_tag:dataplex_v1_generated_MetadataService_ListPartitions_async + */ + listPartitionsAsync( + request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, + 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['listPartitions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPartitions.asyncIterate( + this.innerApiCalls['listPartitions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified aspectType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aspect_type + * @returns {string} Resource name string. + */ + aspectTypePath(project:string,location:string,aspectType:string) { + return this.pathTemplates.aspectTypePathTemplate.render({ + project: project, + location: location, + aspect_type: aspectType, + }); + } + + /** + * Parse the project from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; + } + + /** + * Parse the location from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; + } + + /** + * Parse the aspect_type from AspectType resource. + * + * @param {string} aspectTypeName + * A fully-qualified path representing AspectType resource. + * @returns {string} A string representing the aspect_type. + */ + matchAspectTypeFromAspectTypeName(aspectTypeName: string) { + return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; + } + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath(project:string,location:string,lake:string,zone:string,asset:string) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath(project:string,location:string,lake:string,content:string) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataAttribute resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataTaxonomy + * @param {string} data_attribute_id + * @returns {string} Resource name string. + */ + dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { + return this.pathTemplates.dataAttributePathTemplate.render({ + project: project, + location: location, + dataTaxonomy: dataTaxonomy, + data_attribute_id: dataAttributeId, + }); + } + + /** + * Parse the project from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; + } + + /** + * Parse the location from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; + } + + /** + * Parse the dataTaxonomy from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the dataTaxonomy. + */ + matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; + } + + /** + * Parse the data_attribute_id from DataAttribute resource. + * + * @param {string} dataAttributeName + * A fully-qualified path representing DataAttribute resource. + * @returns {string} A string representing the data_attribute_id. + */ + matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { + return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; + } + + /** + * Return a fully-qualified dataAttributeBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_attribute_binding_id + * @returns {string} Resource name string. + */ + dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.render({ + project: project, + location: location, + data_attribute_binding_id: dataAttributeBindingId, + }); + } + + /** + * Parse the project from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; + } + + /** + * Parse the location from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; + } + + /** + * Parse the data_attribute_binding_id from DataAttributeBinding resource. + * + * @param {string} dataAttributeBindingName + * A fully-qualified path representing DataAttributeBinding resource. + * @returns {string} A string representing the data_attribute_binding_id. + */ + matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { + return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project:string,location:string,dataScan:string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath(project:string,location:string,dataScan:string,job:string) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; + } + + /** + * Return a fully-qualified dataTaxonomy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_taxonomy_id + * @returns {string} Resource name string. + */ + dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { + return this.pathTemplates.dataTaxonomyPathTemplate.render({ + project: project, + location: location, + data_taxonomy_id: dataTaxonomyId, + }); + } + + /** + * Parse the project from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; + } + + /** + * Parse the location from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; + } + + /** + * Parse the data_taxonomy_id from DataTaxonomy resource. + * + * @param {string} dataTaxonomyName + * A fully-qualified path representing DataTaxonomy resource. + * @returns {string} A string representing the data_taxonomy_id. + */ + matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { + return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath(project:string,location:string,lake:string,zone:string,entity:string) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * 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 entryType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} entry_type + * @returns {string} Resource name string. + */ + entryTypePath(project:string,location:string,entryType:string) { + return this.pathTemplates.entryTypePathTemplate.render({ + project: project, + location: location, + entry_type: entryType, + }); + } + + /** + * Parse the project from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; + } + + /** + * Parse the location from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; + } + + /** + * Parse the entry_type from EntryType resource. + * + * @param {string} entryTypeName + * A fully-qualified path representing EntryType resource. + * @returns {string} A string representing the entry_type. + */ + matchEntryTypeFromEntryTypeName(entryTypeName: string) { + return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,lake:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,lake:string,task:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project:string,location:string,lake:string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project:string,location:string,metadataJob:string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath(project:string,location:string,lake:string,environment:string,session:string) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project:string,location:string,lake:string,task:string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project:string,location:string,lake:string,zone:string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * 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.metadataServiceStub && !this._terminated) { + return this.metadataServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json new file mode 100644 index 00000000000..f588dd54b21 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json @@ -0,0 +1,83 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.MetadataService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEntity": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEntity": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListEntities": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreatePartition": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePartition": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPartition": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPartitions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json new file mode 100644 index 00000000000..69e0b730c9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/catalog.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/security.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..1c5aac6a3e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,32 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const dataplex = require('@google-cloud/dataplex'); + +function main() { + const catalogServiceClient = new dataplex.CatalogServiceClient(); + const contentServiceClient = new dataplex.ContentServiceClient(); + const dataplexServiceClient = new dataplex.DataplexServiceClient(); + const dataScanServiceClient = new dataplex.DataScanServiceClient(); + const dataTaxonomyServiceClient = new dataplex.DataTaxonomyServiceClient(); + const metadataServiceClient = new dataplex.MetadataServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..3a56d307879 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient} from '@google-cloud/dataplex'; + +// check that the client class type name can be used +function doStuffWithCatalogServiceClient(client: CatalogServiceClient) { + client.close(); +} +function doStuffWithContentServiceClient(client: ContentServiceClient) { + client.close(); +} +function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { + client.close(); +} +function doStuffWithDataScanServiceClient(client: DataScanServiceClient) { + client.close(); +} +function doStuffWithDataTaxonomyServiceClient(client: DataTaxonomyServiceClient) { + client.close(); +} +function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const catalogServiceClient = new CatalogServiceClient(); + doStuffWithCatalogServiceClient(catalogServiceClient); + // check that the client instance can be created + const contentServiceClient = new ContentServiceClient(); + doStuffWithContentServiceClient(contentServiceClient); + // check that the client instance can be created + const dataplexServiceClient = new DataplexServiceClient(); + doStuffWithDataplexServiceClient(dataplexServiceClient); + // check that the client instance can be created + const dataScanServiceClient = new DataScanServiceClient(); + doStuffWithDataScanServiceClient(dataScanServiceClient); + // check that the client instance can be created + const dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); + doStuffWithDataTaxonomyServiceClient(dataTaxonomyServiceClient); + // check that the client instance can be created + const metadataServiceClient = new MetadataServiceClient(); + doStuffWithMetadataServiceClient(metadataServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts b/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts new file mode 100644 index 00000000000..02bce026bf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts @@ -0,0 +1,6095 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as catalogserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CatalogServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient(); + 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 = catalogserviceModule.v1.CatalogServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = catalogserviceModule.v1.CatalogServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = catalogserviceModule.v1.CatalogServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.catalogServiceStub, undefined); + await client.initialize(); + assert(client.catalogServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.catalogServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.catalogServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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 catalogserviceModule.v1.CatalogServiceClient({ + 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('getEntryType', () => { + it('invokes getEntryType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.EntryType() + ); + client.innerApiCalls.getEntryType = stubSimpleCall(expectedResponse); + const [response] = await client.getEntryType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntryType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.EntryType() + ); + client.innerApiCalls.getEntryType = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntryType( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntryType|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntryType with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEntryType = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEntryType(request), expectedError); + const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntryType with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEntryType(request), expectedError); + }); + }); + + describe('getAspectType', () => { + it('invokes getAspectType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.AspectType() + ); + client.innerApiCalls.getAspectType = stubSimpleCall(expectedResponse); + const [response] = await client.getAspectType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAspectType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.AspectType() + ); + client.innerApiCalls.getAspectType = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAspectType( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAspectType|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAspectType with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAspectType = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAspectType(request), expectedError); + const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAspectType with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAspectType(request), expectedError); + }); + }); + + describe('getEntryGroup', () => { + it('invokes getEntryGroup without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.EntryGroup() + ); + client.innerApiCalls.getEntryGroup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntryGroup( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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('createEntry', () => { + it('invokes createEntry without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.createEntry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEntry( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryRequest() + ); + request.entry ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryRequest', ['entry', 'name']); + request.entry.name = defaultValue1; + const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryRequest() + ); + request.entry ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryRequest', ['entry', 'name']); + request.entry.name = defaultValue1; + const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.updateEntry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEntry( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryRequest() + ); + request.entry ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryRequest() + ); + request.entry ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + 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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.deleteEntry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEntry( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntry|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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.getEntry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntry( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.LookupEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.lookupEntry = stubSimpleCall(expectedResponse); + const [response] = await client.lookupEntry(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupEntry without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.LookupEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entry() + ); + client.innerApiCalls.lookupEntry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.lookupEntry( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupEntry with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.LookupEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.lookupEntry = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.lookupEntry(request), expectedError); + const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupEntry with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.LookupEntryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.lookupEntry(request), expectedError); + }); + }); + + describe('getMetadataJob', () => { + it('invokes getMetadataJob without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.MetadataJob() + ); + client.innerApiCalls.getMetadataJob = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadataJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.MetadataJob() + ); + client.innerApiCalls.getMetadataJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadataJob( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IMetadataJob|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadataJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMetadataJob(request), expectedError); + const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getMetadataJob(request), expectedError); + }); + }); + + describe('cancelMetadataJob', () => { + it('invokes cancelMetadataJob without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelMetadataJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelMetadataJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelMetadataJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelMetadataJob( + 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.cancelMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelMetadataJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelMetadataJob(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelMetadataJob(request), expectedError); + }); + }); + + describe('createEntryType', () => { + it('invokes createEntryType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEntryType = stubLongRunningCall(expectedResponse); + const [operation] = await client.createEntryType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntryType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEntryType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEntryType( + 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.createEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntryType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntryType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createEntryType(request), expectedError); + const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntryType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntryType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createEntryType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateEntryTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateEntryTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEntryTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateEntryTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateEntryType', () => { + it('invokes updateEntryType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() + ); + request.entryType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); + request.entryType.name = defaultValue1; + const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEntryType = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEntryType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntryType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() + ); + request.entryType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); + request.entryType.name = defaultValue1; + const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEntryType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEntryType( + 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.updateEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntryType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() + ); + request.entryType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); + request.entryType.name = defaultValue1; + const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntryType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateEntryType(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntryType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() + ); + request.entryType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); + request.entryType.name = defaultValue1; + const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntryType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateEntryType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateEntryTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateEntryTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEntryTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateEntryTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteEntryType', () => { + it('invokes deleteEntryType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEntryType = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEntryType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntryType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEntryType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEntryType( + 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.deleteEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntryType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntryType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteEntryType(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntryType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntryType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteEntryType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteEntryTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteEntryTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEntryTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteEntryTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAspectType', () => { + it('invokes createAspectType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAspectType = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAspectType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAspectType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAspectType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAspectType( + 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.createAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAspectType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAspectType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAspectType(request), expectedError); + const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAspectType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAspectType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAspectType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAspectTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateAspectTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAspectTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateAspectTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAspectType', () => { + it('invokes updateAspectType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() + ); + request.aspectType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); + request.aspectType.name = defaultValue1; + const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAspectType = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAspectType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAspectType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() + ); + request.aspectType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); + request.aspectType.name = defaultValue1; + const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAspectType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAspectType( + 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.updateAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAspectType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() + ); + request.aspectType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); + request.aspectType.name = defaultValue1; + const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAspectType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAspectType(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAspectType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() + ); + request.aspectType ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); + request.aspectType.name = defaultValue1; + const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAspectType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAspectType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAspectTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateAspectTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAspectTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateAspectTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAspectType', () => { + it('invokes deleteAspectType without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAspectType = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAspectType(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAspectType without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAspectType = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAspectType( + 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.deleteAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAspectType with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAspectType = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAspectType(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAspectType with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAspectType = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAspectType(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAspectTypeProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteAspectTypeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAspectTypeProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteAspectTypeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createEntryGroup', () => { + it('invokes createEntryGroup without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEntryGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.createEntryGroup(request); + const [response] = await operation.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 without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEntryGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEntryGroup( + 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.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 call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntryGroup = stubLongRunningCall(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 LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createEntryGroup(request); + await assert.rejects(operation.promise(), 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 checkCreateEntryGroupProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateEntryGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEntryGroupProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateEntryGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateEntryGroup', () => { + it('invokes updateEntryGroup without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() + ); + request.entryGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); + request.entryGroup.name = defaultValue1; + const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEntryGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEntryGroup(request); + const [response] = await operation.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 without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() + ); + request.entryGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); + request.entryGroup.name = defaultValue1; + const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEntryGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEntryGroup( + 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.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 call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() + ); + request.entryGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); + request.entryGroup.name = defaultValue1; + const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntryGroup = stubLongRunningCall(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 LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() + ); + request.entryGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); + request.entryGroup.name = defaultValue1; + const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateEntryGroup(request); + await assert.rejects(operation.promise(), 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 checkUpdateEntryGroupProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateEntryGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEntryGroupProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkUpdateEntryGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteEntryGroup', () => { + it('invokes deleteEntryGroup without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEntryGroup(request); + const [response] = await operation.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 without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEntryGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEntryGroup( + 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.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 call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(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 LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteEntryGroup(request); + await assert.rejects(operation.promise(), 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 checkDeleteEntryGroupProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteEntryGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEntryGroupProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkDeleteEntryGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createMetadataJob', () => { + it('invokes createMetadataJob without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMetadataJob = stubLongRunningCall(expectedResponse); + const [operation] = await client.createMetadataJob(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMetadataJob without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMetadataJob = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMetadataJob( + 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.createMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMetadataJob with call error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMetadataJob = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createMetadataJob(request), expectedError); + const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMetadataJob with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMetadataJob = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createMetadataJob(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMetadataJobProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateMetadataJobProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMetadataJobProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateMetadataJobProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listEntryTypes', () => { + it('invokes listEntryTypes without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.innerApiCalls.listEntryTypes = stubSimpleCall(expectedResponse); + const [response] = await client.listEntryTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypes without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.innerApiCalls.listEntryTypes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntryTypes( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntryType[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypes with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEntryTypes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEntryTypes(request), expectedError); + const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypesStream without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.descriptors.page.listEntryTypes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEntryTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.EntryType[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.EntryType) => { + 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.listEntryTypes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEntryTypes, request)); + assert( + (client.descriptors.page.listEntryTypes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEntryTypesStream with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEntryTypes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEntryTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.EntryType[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.EntryType) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEntryTypes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEntryTypes, request)); + assert( + (client.descriptors.page.listEntryTypes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEntryTypes without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.descriptors.page.listEntryTypes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IEntryType[] = []; + const iterable = client.listEntryTypesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEntryTypes with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEntryTypes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEntryTypesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IEntryType[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAspectTypes', () => { + it('invokes listAspectTypes without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + ]; + client.innerApiCalls.listAspectTypes = stubSimpleCall(expectedResponse); + const [response] = await client.listAspectTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAspectTypes without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + ]; + client.innerApiCalls.listAspectTypes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAspectTypes( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAspectType[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAspectTypes with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAspectTypes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAspectTypes(request), expectedError); + const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAspectTypesStream without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + ]; + client.descriptors.page.listAspectTypes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAspectTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.AspectType[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.AspectType) => { + 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.listAspectTypes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAspectTypes, request)); + assert( + (client.descriptors.page.listAspectTypes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAspectTypesStream with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAspectTypes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAspectTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.AspectType[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.AspectType) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAspectTypes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAspectTypes, request)); + assert( + (client.descriptors.page.listAspectTypes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAspectTypes without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), + ]; + client.descriptors.page.listAspectTypes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAspectType[] = []; + const iterable = client.listAspectTypesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAspectTypes with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAspectTypes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAspectTypesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAspectType[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listEntryGroups', () => { + it('invokes listEntryGroups without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + ]; + client.innerApiCalls.listEntryGroups = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntryGroups( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.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.dataplex.v1.EntryGroup[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.v1.EntryGroup[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), + ]; + client.descriptors.page.listEntryGroups.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + ]; + client.innerApiCalls.listEntries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntries( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.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.dataplex.v1.Entry[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.v1.Entry[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + ]; + client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.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('searchEntries', () => { + it('invokes searchEntries without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + ]; + client.innerApiCalls.searchEntries = stubSimpleCall(expectedResponse); + const [response] = await client.searchEntries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntries without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + ]; + client.innerApiCalls.searchEntries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchEntries( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ISearchEntriesResult[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntries with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchEntries = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.searchEntries(request), expectedError); + const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntriesStream without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + ]; + client.descriptors.page.searchEntries.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.searchEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + 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.searchEntries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchEntries, request)); + assert( + (client.descriptors.page.searchEntries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchEntriesStream with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchEntries.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.searchEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.searchEntries.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.searchEntries, request)); + assert( + (client.descriptors.page.searchEntries.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchEntries without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), + ]; + client.descriptors.page.searchEntries.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = []; + const iterable = client.searchEntriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchEntries with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchEntries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchEntriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMetadataJobs', () => { + it('invokes listMetadataJobs without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + ]; + client.innerApiCalls.listMetadataJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listMetadataJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMetadataJobs without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + ]; + client.innerApiCalls.listMetadataJobs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMetadataJobs( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IMetadataJob[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMetadataJobs with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMetadataJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMetadataJobs(request), expectedError); + const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMetadataJobsStream without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + ]; + client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMetadataJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.MetadataJob) => { + 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.listMetadataJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMetadataJobs, request)); + assert( + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMetadataJobsStream with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMetadataJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.MetadataJob) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMetadataJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMetadataJobs, request)); + assert( + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMetadataJobs without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), + ]; + client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; + const iterable = client.listMetadataJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMetadataJobs with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMetadataJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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 catalogserviceModule.v1.CatalogServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts new file mode 100644 index 00000000000..9cea4fbab46 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts @@ -0,0 +1,2940 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as contentserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function 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.ContentServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + 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 = contentserviceModule.v1.ContentServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = contentserviceModule.v1.ContentServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new contentserviceModule.v1.ContentServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = contentserviceModule.v1.ContentServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new contentserviceModule.v1.ContentServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + await client.initialize(); + assert(client.contentServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.contentServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contentServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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('createContent', () => { + it('invokes createContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.createContent = stubSimpleCall(expectedResponse); + const [response] = await client.createContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.createContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createContent( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createContent(request), expectedError); + const actualRequest = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createContent(request), expectedError); + }); + }); + + describe('updateContent', () => { + it('invokes updateContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.updateContent = stubSimpleCall(expectedResponse); + const [response] = await client.updateContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.updateContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateContent( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); + request.content.name = defaultValue1; + const expectedHeaderRequestParams = `content.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateContent(request), expectedError); + const actualRequest = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateContentRequest() + ); + request.content ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); + request.content.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateContent(request), expectedError); + }); + }); + + describe('deleteContent', () => { + it('invokes deleteContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteContent = stubSimpleCall(expectedResponse); + const [response] = await client.deleteContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteContent( + 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.deleteContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteContent(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteContent(request), expectedError); + }); + }); + + describe('getContent', () => { + it('invokes getContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.getContent = stubSimpleCall(expectedResponse); + const [response] = await client.getContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Content() + ); + client.innerApiCalls.getContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContent( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContent(request), expectedError); + const actualRequest = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContent with closed client', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getContent(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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('listContent', () => { + it('invokes listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); + const [response] = await client.listContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.innerApiCalls.listContent = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContent( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContent = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContent(request), expectedError); + const actualRequest = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContentStream without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.descriptors.page.listContent.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Content[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Content) => { + 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.listContent.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContent, request)); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listContentStream with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listContentStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Content[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Content) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listContent, request)); + assert( + (client.descriptors.page.listContent.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContent without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), + ]; + client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IContent[] = []; + const iterable = client.listContentAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listContent with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListContentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listContentAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IContent[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listContent.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + 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 contentserviceModule.v1.ContentServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts new file mode 100644 index 00000000000..dbd7401ad74 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts @@ -0,0 +1,3377 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as datascanserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataScanServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient(); + 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 = datascanserviceModule.v1.DataScanServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datascanserviceModule.v1.DataScanServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datascanserviceModule.v1.DataScanServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataScanServiceStub, undefined); + await client.initialize(); + assert(client.dataScanServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataScanServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataScanServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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 datascanserviceModule.v1.DataScanServiceClient({ + 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('getDataScan', () => { + it('invokes getDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScan() + ); + client.innerApiCalls.getDataScan = stubSimpleCall(expectedResponse); + const [response] = await client.getDataScan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScan() + ); + client.innerApiCalls.getDataScan = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataScan( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScan|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataScan = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataScan(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataScan(request), expectedError); + }); + }); + + describe('runDataScan', () => { + it('invokes runDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanResponse() + ); + client.innerApiCalls.runDataScan = stubSimpleCall(expectedResponse); + const [response] = await client.runDataScan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanResponse() + ); + client.innerApiCalls.runDataScan = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runDataScan( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IRunDataScanResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runDataScan = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runDataScan(request), expectedError); + const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runDataScan(request), expectedError); + }); + }); + + describe('getDataScanJob', () => { + it('invokes getDataScanJob without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ); + client.innerApiCalls.getDataScanJob = stubSimpleCall(expectedResponse); + const [response] = await client.getDataScanJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ); + client.innerApiCalls.getDataScanJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataScanJob( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScanJob|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataScanJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataScanJob(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataScanJob(request), expectedError); + }); + }); + + describe('generateDataQualityRules', () => { + it('invokes generateDataQualityRules without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse() + ); + client.innerApiCalls.generateDataQualityRules = stubSimpleCall(expectedResponse); + const [response] = await client.generateDataQualityRules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateDataQualityRules without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse() + ); + client.innerApiCalls.generateDataQualityRules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateDataQualityRules( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateDataQualityRules with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateDataQualityRules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateDataQualityRules(request), expectedError); + const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateDataQualityRules with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateDataQualityRules(request), expectedError); + }); + }); + + describe('createDataScan', () => { + it('invokes createDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataScan = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataScan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataScan( + 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.createDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataScan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataScan(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataScan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkCreateDataScanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkCreateDataScanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataScan', () => { + it('invokes updateDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataScan = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataScan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataScan( + 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.updateDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataScan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataScan(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataScan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkUpdateDataScanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkUpdateDataScanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataScan', () => { + it('invokes deleteDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataScan = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataScan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataScan( + 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.deleteDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataScan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataScan(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataScan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkDeleteDataScanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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.checkDeleteDataScanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDataScans', () => { + it('invokes listDataScans without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.innerApiCalls.listDataScans = stubSimpleCall(expectedResponse); + const [response] = await client.listDataScans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScans without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.innerApiCalls.listDataScans = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataScans( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScan[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScans with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataScans = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataScans(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScansStream without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.descriptors.page.listDataScans.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataScansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScan) => { + 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.listDataScans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataScans, request)); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataScansStream with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScans.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataScansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScan) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataScans, request)); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScans without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.descriptors.page.listDataScans.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; + const iterable = client.listDataScansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScans with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataScansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataScanJobs', () => { + it('invokes listDataScanJobs without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + ]; + client.innerApiCalls.listDataScanJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listDataScanJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobs without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + ]; + client.innerApiCalls.listDataScanJobs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataScanJobs( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScanJob[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobs with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataScanJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataScanJobs(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobsStream without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + ]; + client.descriptors.page.listDataScanJobs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataScanJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScanJob) => { + 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.listDataScanJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataScanJobs, request)); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataScanJobsStream with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScanJobs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataScanJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScanJob) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataScanJobs, request)); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScanJobs without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), + ]; + client.descriptors.page.listDataScanJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; + const iterable = client.listDataScanJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScanJobs with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScanJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataScanJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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 datascanserviceModule.v1.DataScanServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + 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('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts new file mode 100644 index 00000000000..781c09dbc90 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts @@ -0,0 +1,4446 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as datataxonomyserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataTaxonomyServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); + 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 = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataTaxonomyServiceStub, undefined); + await client.initialize(); + assert(client.dataTaxonomyServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataTaxonomyServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataTaxonomyServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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('getDataTaxonomy', () => { + it('invokes getDataTaxonomy without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataTaxonomy() + ); + client.innerApiCalls.getDataTaxonomy = stubSimpleCall(expectedResponse); + const [response] = await client.getDataTaxonomy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTaxonomy without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataTaxonomy() + ); + client.innerApiCalls.getDataTaxonomy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataTaxonomy( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataTaxonomy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTaxonomy with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataTaxonomy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataTaxonomy(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataTaxonomy with closed client', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataTaxonomy(request), expectedError); + }); + }); + + describe('getDataAttributeBinding', () => { + it('invokes getDataAttributeBinding without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataAttributeBinding() + ); + client.innerApiCalls.getDataAttributeBinding = stubSimpleCall(expectedResponse); + const [response] = await client.getDataAttributeBinding(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttributeBinding without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataAttributeBinding() + ); + client.innerApiCalls.getDataAttributeBinding = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataAttributeBinding( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttributeBinding|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttributeBinding with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataAttributeBinding = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataAttributeBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttributeBinding with closed client', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataAttributeBinding(request), expectedError); + }); + }); + + describe('getDataAttribute', () => { + it('invokes getDataAttribute without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataAttribute() + ); + client.innerApiCalls.getDataAttribute = stubSimpleCall(expectedResponse); + const [response] = await client.getDataAttribute(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttribute without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataAttribute() + ); + client.innerApiCalls.getDataAttribute = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataAttribute( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttribute|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttribute with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataAttribute = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataAttribute(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataAttribute with closed client', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataAttribute(request), expectedError); + }); + }); + + describe('createDataTaxonomy', () => { + it('invokes createDataTaxonomy without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataTaxonomy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTaxonomy without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataTaxonomy( + 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.createDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTaxonomy with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataTaxonomy(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataTaxonomy with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataTaxonomy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataTaxonomyProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataTaxonomyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataTaxonomyProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataTaxonomyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataTaxonomy', () => { + it('invokes updateDataTaxonomy without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() + ); + request.dataTaxonomy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); + request.dataTaxonomy.name = defaultValue1; + const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataTaxonomy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTaxonomy without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() + ); + request.dataTaxonomy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); + request.dataTaxonomy.name = defaultValue1; + const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataTaxonomy( + 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.updateDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTaxonomy with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() + ); + request.dataTaxonomy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); + request.dataTaxonomy.name = defaultValue1; + const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataTaxonomy(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataTaxonomy with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() + ); + request.dataTaxonomy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); + request.dataTaxonomy.name = defaultValue1; + const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataTaxonomy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataTaxonomyProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataTaxonomyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataTaxonomyProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataTaxonomyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataTaxonomy', () => { + it('invokes deleteDataTaxonomy without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataTaxonomy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTaxonomy without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataTaxonomy( + 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.deleteDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTaxonomy with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataTaxonomy(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataTaxonomy with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataTaxonomy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataTaxonomyProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataTaxonomyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataTaxonomyProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataTaxonomyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createDataAttributeBinding', () => { + it('invokes createDataAttributeBinding without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataAttributeBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttributeBinding without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataAttributeBinding( + 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.createDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttributeBinding with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataAttributeBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttributeBinding with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataAttributeBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataAttributeBindingProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataAttributeBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataAttributeBindingProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataAttributeBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataAttributeBinding', () => { + it('invokes updateDataAttributeBinding without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() + ); + request.dataAttributeBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); + request.dataAttributeBinding.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataAttributeBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttributeBinding without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() + ); + request.dataAttributeBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); + request.dataAttributeBinding.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataAttributeBinding( + 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.updateDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttributeBinding with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() + ); + request.dataAttributeBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); + request.dataAttributeBinding.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataAttributeBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttributeBinding with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() + ); + request.dataAttributeBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); + request.dataAttributeBinding.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataAttributeBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataAttributeBindingProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataAttributeBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataAttributeBindingProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataAttributeBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataAttributeBinding', () => { + it('invokes deleteDataAttributeBinding without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataAttributeBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttributeBinding without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataAttributeBinding( + 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.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttributeBinding with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataAttributeBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttributeBinding with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataAttributeBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataAttributeBindingProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataAttributeBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataAttributeBindingProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataAttributeBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createDataAttribute', () => { + it('invokes createDataAttribute without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAttribute = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataAttribute(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttribute without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataAttribute = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataAttribute( + 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.createDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttribute with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAttribute = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDataAttribute(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataAttribute with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDataAttribute(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataAttributeProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataAttributeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataAttributeProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkCreateDataAttributeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataAttribute', () => { + it('invokes updateDataAttribute without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() + ); + request.dataAttribute ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); + request.dataAttribute.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAttribute = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataAttribute(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttribute without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() + ); + request.dataAttribute ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); + request.dataAttribute.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataAttribute = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataAttribute( + 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.updateDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttribute with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() + ); + request.dataAttribute ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); + request.dataAttribute.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAttribute = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataAttribute(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataAttribute with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() + ); + request.dataAttribute ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); + request.dataAttribute.name = defaultValue1; + const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataAttribute(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataAttributeProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataAttributeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataAttributeProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkUpdateDataAttributeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDataAttribute', () => { + it('invokes deleteDataAttribute without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataAttribute(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttribute without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataAttribute = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataAttribute( + 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.deleteDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttribute with call error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDataAttribute(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataAttribute with LRO error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDataAttribute(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataAttributeProgress without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataAttributeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataAttributeProgress with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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.checkDeleteDataAttributeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDataTaxonomies', () => { + it('invokes listDataTaxonomies without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + ]; + client.innerApiCalls.listDataTaxonomies = stubSimpleCall(expectedResponse); + const [response] = await client.listDataTaxonomies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTaxonomies without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + ]; + client.innerApiCalls.listDataTaxonomies = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataTaxonomies( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataTaxonomy[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTaxonomies with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataTaxonomies = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataTaxonomies(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataTaxonomiesStream without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + ]; + client.descriptors.page.listDataTaxonomies.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataTaxonomiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataTaxonomy[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataTaxonomy) => { + 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.listDataTaxonomies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTaxonomies, request)); + assert( + (client.descriptors.page.listDataTaxonomies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataTaxonomiesStream with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTaxonomies.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataTaxonomiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataTaxonomy[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataTaxonomy) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataTaxonomies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataTaxonomies, request)); + assert( + (client.descriptors.page.listDataTaxonomies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTaxonomies without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), + ]; + client.descriptors.page.listDataTaxonomies.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataTaxonomy[] = []; + const iterable = client.listDataTaxonomiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataTaxonomies with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataTaxonomies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataTaxonomiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataTaxonomy[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataAttributeBindings', () => { + it('invokes listDataAttributeBindings without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + ]; + client.innerApiCalls.listDataAttributeBindings = stubSimpleCall(expectedResponse); + const [response] = await client.listDataAttributeBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributeBindings without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + ]; + client.innerApiCalls.listDataAttributeBindings = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataAttributeBindings( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttributeBinding[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributeBindings with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataAttributeBindings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataAttributeBindings(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributeBindingsStream without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + ]; + client.descriptors.page.listDataAttributeBindings.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataAttributeBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataAttributeBinding[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttributeBinding) => { + 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.listDataAttributeBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAttributeBindings, request)); + assert( + (client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataAttributeBindingsStream with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAttributeBindings.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataAttributeBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataAttributeBinding[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttributeBinding) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAttributeBindings, request)); + assert( + (client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAttributeBindings without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), + ]; + client.descriptors.page.listDataAttributeBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataAttributeBinding[] = []; + const iterable = client.listDataAttributeBindingsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAttributeBindings with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAttributeBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataAttributeBindingsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataAttributeBinding[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataAttributes', () => { + it('invokes listDataAttributes without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + ]; + client.innerApiCalls.listDataAttributes = stubSimpleCall(expectedResponse); + const [response] = await client.listDataAttributes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributes without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + ]; + client.innerApiCalls.listDataAttributes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataAttributes( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttribute[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributes with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataAttributes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataAttributes(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataAttributesStream without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + ]; + client.descriptors.page.listDataAttributes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataAttributesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataAttribute[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttribute) => { + 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.listDataAttributes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAttributes, request)); + assert( + (client.descriptors.page.listDataAttributes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataAttributesStream with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAttributes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataAttributesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataAttribute[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttribute) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataAttributes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataAttributes, request)); + assert( + (client.descriptors.page.listDataAttributes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAttributes without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), + ]; + client.descriptors.page.listDataAttributes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataAttribute[] = []; + const iterable = client.listDataAttributesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataAttributes with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataAttributes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataAttributesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataAttribute[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + 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('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts new file mode 100644 index 00000000000..53c410aaff1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts @@ -0,0 +1,7633 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as dataplexserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataplexServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + 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 = dataplexserviceModule.v1.DataplexServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = dataplexserviceModule.v1.DataplexServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + await client.initialize(); + assert(client.dataplexServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataplexServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataplexServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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 dataplexserviceModule.v1.DataplexServiceClient({ + 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('getLake', () => { + it('invokes getLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = stubSimpleCall(expectedResponse); + const [response] = await client.getLake(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Lake() + ); + client.innerApiCalls.getLake = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLake( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ILake|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLake with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLake = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLake(request), expectedError); + const actualRequest = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLake with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLake(request), expectedError); + }); + }); + + describe('getZone', () => { + it('invokes getZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = stubSimpleCall(expectedResponse); + const [response] = await client.getZone(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Zone() + ); + client.innerApiCalls.getZone = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getZone( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IZone|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getZone with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getZone = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getZone(request), expectedError); + const actualRequest = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getZone with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getZone(request), expectedError); + }); + }); + + describe('getAsset', () => { + it('invokes getAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); + const [response] = await client.getAsset(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Asset() + ); + client.innerApiCalls.getAsset = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAsset( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAsset|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAsset(request), expectedError); + const actualRequest = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAsset with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAsset(request), expectedError); + }); + }); + + describe('getTask', () => { + it('invokes getTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = stubSimpleCall(expectedResponse); + const [response] = await client.getTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Task() + ); + client.innerApiCalls.getTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTask( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ITask|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTask with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTask(request), expectedError); + const actualRequest = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTask with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTask(request), expectedError); + }); + }); + + describe('runTask', () => { + it('invokes runTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskResponse() + ); + client.innerApiCalls.runTask = stubSimpleCall(expectedResponse); + const [response] = await client.runTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskResponse() + ); + client.innerApiCalls.runTask = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runTask( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IRunTaskResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runTask(request), expectedError); + const actualRequest = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runTask(request), expectedError); + }); + }); + + describe('getJob', () => { + it('invokes getJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); + const [response] = await client.getJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Job() + ); + client.innerApiCalls.getJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJob( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IJob|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJob(request), expectedError); + const actualRequest = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJob with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJob(request), expectedError); + }); + }); + + describe('cancelJob', () => { + it('invokes cancelJob without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelJob without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelJob( + 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.cancelJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelJob with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelJob(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelJob with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelJob(request), expectedError); + }); + }); + + describe('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEnvironment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); + }); + + describe('createLake', () => { + it('invokes createLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.createLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createLake = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createLake( + 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.createLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createLake(request), expectedError); + const actualRequest = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createLake = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createLake(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateLakeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateLake', () => { + it('invokes updateLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateLake = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateLake( + 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.updateLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateLake(request), expectedError); + const actualRequest = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateLakeRequest() + ); + request.lake ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); + request.lake.name = defaultValue1; + const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLake = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateLake(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateLakeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteLake', () => { + it('invokes deleteLake without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteLake(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLake without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteLake = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteLake( + 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.deleteLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLake with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteLake(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteLake with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteLakeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteLake = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteLake(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteLakeProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteLakeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteLakeProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteLakeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createZone', () => { + it('invokes createZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.createZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createZone = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createZone( + 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.createZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createZone(request), expectedError); + const actualRequest = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createZone = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createZone(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateZoneProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateZone', () => { + it('invokes updateZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateZone = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateZone( + 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.updateZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateZone(request), expectedError); + const actualRequest = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateZoneRequest() + ); + request.zone ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); + request.zone.name = defaultValue1; + const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateZone = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateZone(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateZoneProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteZone', () => { + it('invokes deleteZone without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteZone without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteZone = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteZone( + 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.deleteZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteZone with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteZone(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteZone with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteZone = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteZone(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteZoneProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteZoneProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteZoneProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAsset', () => { + it('invokes createAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAsset = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAsset( + 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.createAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAsset(request), expectedError); + const actualRequest = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAsset = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAsset(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateAssetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAsset', () => { + it('invokes updateAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAsset = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAsset( + 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.updateAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAsset(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateAssetRequest() + ); + request.asset ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); + request.asset.name = defaultValue1; + const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAsset = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAsset(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateAssetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAsset', () => { + it('invokes deleteAsset without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAsset(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAsset = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAsset( + 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.deleteAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAsset(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAsset with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteAssetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAsset = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAsset(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAssetProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteAssetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAssetProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteAssetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createTask', () => { + it('invokes createTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTask( + 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.createTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createTask(request), expectedError); + const actualRequest = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkCreateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateTask', () => { + it('invokes updateTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTask( + 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.updateTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateTask(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateTaskRequest() + ); + request.task ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); + request.task.name = defaultValue1; + const expectedHeaderRequestParams = `task.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkUpdateTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteTask', () => { + it('invokes deleteTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTask(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTask = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTask( + 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.deleteTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTask with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteTask(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTask with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteTaskRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTask = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteTask(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteTaskProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteTaskProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTaskProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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.checkDeleteTaskProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateEnvironmentProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() + ); + request.environment ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); + request.environment.name = defaultValue1; + const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listLakes', () => { + it('invokes listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); + const [response] = await client.listLakes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakes without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.innerApiCalls.listLakes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakes( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ILake[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLakes(request), expectedError); + const actualRequest = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + 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.listLakes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listLakes, request)); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listLakesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listLakesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Lake[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listLakes, request)); + assert( + (client.descriptors.page.listLakes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLakes without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), + ]; + client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + const iterable = client.listLakesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLakes with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLakesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ILake[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listLakes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listLakeActions', () => { + it('invokes listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); + const [response] = await client.listLakeActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakeActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listLakeActions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listLakeActions( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listLakeActions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listLakeActions(request), expectedError); + const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listLakeActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listLakeActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listLakeActions, request)); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listLakeActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listLakeActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listLakeActions, request)); + assert( + (client.descriptors.page.listLakeActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLakeActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listLakeActions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listLakeActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listLakeActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listLakeActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLakeActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listZones', () => { + it('invokes listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); + const [response] = await client.listZones(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZones without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.innerApiCalls.listZones = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZones( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IZone[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listZones(request), expectedError); + const actualRequest = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZonesStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + 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.listZones.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listZones, request)); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listZonesStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listZonesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Zone[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listZones, request)); + assert( + (client.descriptors.page.listZones.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listZones without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), + ]; + client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + const iterable = client.listZonesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listZones with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZonesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listZonesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IZone[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listZones.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listZoneActions', () => { + it('invokes listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); + const [response] = await client.listZoneActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZoneActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listZoneActions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listZoneActions( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listZoneActions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listZoneActions(request), expectedError); + const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listZoneActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listZoneActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listZoneActions, request)); + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listZoneActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listZoneActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listZoneActions, request)); + assert( + (client.descriptors.page.listZoneActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listZoneActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listZoneActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listZoneActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listZoneActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAssets', () => { + it('invokes listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); + const [response] = await client.listAssets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssets without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.innerApiCalls.listAssets = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssets( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAsset[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssets = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAssets(request), expectedError); + const actualRequest = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssetsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + 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.listAssets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAssets, request)); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAssetsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAssetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Asset[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAssets, request)); + assert( + (client.descriptors.page.listAssets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAssets without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), + ]; + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + const iterable = client.listAssetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAssets with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAssetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAssets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAssetActions', () => { + it('invokes listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); + const [response] = await client.listAssetActions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssetActions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.innerApiCalls.listAssetActions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAssetActions( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAssetActions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAssetActions(request), expectedError); + const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAssetActionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + 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.listAssetActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAssetActions, request)); + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAssetActionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAssetActionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Action[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAssetActions, request)); + assert( + (client.descriptors.page.listAssetActions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAssetActions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), + ]; + client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + const iterable = client.listAssetActionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAssetActions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAssetActionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IAction[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTasks', () => { + it('invokes listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); + const [response] = await client.listTasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTasks without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.innerApiCalls.listTasks = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTasks( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ITask[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTasks(request), expectedError); + const actualRequest = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTasksStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + 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.listTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTasks, request)); + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTasksStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Task[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTasks, request)); + assert( + (client.descriptors.page.listTasks.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTasks without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), + ]; + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + const iterable = client.listTasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTasks with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListTasksRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ITask[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTasks.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listJobs', () => { + it('invokes listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobs without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.innerApiCalls.listJobs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobs( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IJob[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobs(request), expectedError); + const actualRequest = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + 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.listJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listJobs, request)); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listJobsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Job[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listJobs, request)); + assert( + (client.descriptors.page.listJobs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobs without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), + ]; + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + const iterable = client.listJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobs with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListJobsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listJobs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEnvironments( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEnvironment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEnvironments(request), expectedError); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironmentsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + ]; + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Environment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEnvironmentsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Environment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), + ]; + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; + const iterable = client.listEnvironmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSessions', () => { + it('invokes listSessions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + ]; + client.innerApiCalls.listSessions = stubSimpleCall(expectedResponse); + const [response] = await client.listSessions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSessions without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + ]; + client.innerApiCalls.listSessions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSessions( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ISession[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSessions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSessions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSessions(request), expectedError); + const actualRequest = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSessionsStream without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + ]; + client.descriptors.page.listSessions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listSessionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Session[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Session) => { + 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.listSessions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSessions, request)); + assert( + (client.descriptors.page.listSessions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSessionsStream with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSessions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listSessionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Session[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Session) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listSessions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSessions, request)); + assert( + (client.descriptors.page.listSessions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSessions without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), + ]; + client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.ISession[] = []; + const iterable = client.listSessionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSessions with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListSessionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSessionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.ISession[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSessions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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 dataplexserviceModule.v1.DataplexServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + 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('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts new file mode 100644 index 00000000000..16c212f4f17 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts @@ -0,0 +1,3185 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as metadataserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function 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.MetadataServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + 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 = metadataserviceModule.v1.MetadataServiceClient.servicePath; + assert.strictEqual(servicePath, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = metadataserviceModule.v1.MetadataServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + await client.initialize(); + assert(client.metadataServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.metadataServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metadataServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + 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 metadataserviceModule.v1.MetadataServiceClient({ + 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('createEntity', () => { + it('invokes createEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.createEntity = stubSimpleCall(expectedResponse); + const [response] = await client.createEntity(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.createEntity = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEntity( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createEntity(request), expectedError); + const actualRequest = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createEntity(request), expectedError); + }); + }); + + describe('updateEntity', () => { + it('invokes updateEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.updateEntity = stubSimpleCall(expectedResponse); + const [response] = await client.updateEntity(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.updateEntity = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEntity( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); + request.entity.name = defaultValue1; + const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateEntity(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateEntityRequest() + ); + request.entity ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); + request.entity.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateEntity(request), expectedError); + }); + }); + + describe('deleteEntity', () => { + it('invokes deleteEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEntity = stubSimpleCall(expectedResponse); + const [response] = await client.deleteEntity(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEntity = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEntity( + 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.deleteEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteEntity(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteEntity(request), expectedError); + }); + }); + + describe('getEntity', () => { + it('invokes getEntity without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); + const [response] = await client.getEntity(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntity without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Entity() + ); + client.innerApiCalls.getEntity = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEntity( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntity with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEntity(request), expectedError); + const actualRequest = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEntity with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetEntityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEntity(request), expectedError); + }); + }); + + describe('createPartition', () => { + it('invokes createPartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.createPartition = stubSimpleCall(expectedResponse); + const [response] = await client.createPartition(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.createPartition = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPartition( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPartition = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createPartition(request), expectedError); + const actualRequest = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreatePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createPartition(request), expectedError); + }); + }); + + describe('deletePartition', () => { + it('invokes deletePartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePartition = stubSimpleCall(expectedResponse); + const [response] = await client.deletePartition(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deletePartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePartition = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePartition( + 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.deletePartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePartition = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deletePartition(request), expectedError); + const actualRequest = (client.innerApiCalls.deletePartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeletePartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deletePartition(request), expectedError); + }); + }); + + describe('getPartition', () => { + it('invokes getPartition without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = stubSimpleCall(expectedResponse); + const [response] = await client.getPartition(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPartition without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.Partition() + ); + client.innerApiCalls.getPartition = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPartition( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPartition with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPartition = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPartition(request), expectedError); + const actualRequest = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPartition with closed client', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetPartitionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPartition(request), expectedError); + }); + }); + + describe('listEntities', () => { + it('invokes listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = stubSimpleCall(expectedResponse); + const [response] = await client.listEntities(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntities without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.innerApiCalls.listEntities = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntities( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEntities = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEntities(request), expectedError); + const actualRequest = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntitiesStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Entity) => { + 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.listEntities.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEntities, request)); + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEntitiesStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Entity[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Entity) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEntities, request)); + assert( + (client.descriptors.page.listEntities.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEntities without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), + ]; + client.descriptors.page.listEntities.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + const iterable = client.listEntitiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEntities with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntitiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEntities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEntitiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEntities.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPartitions', () => { + it('invokes listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = stubSimpleCall(expectedResponse); + const [response] = await client.listPartitions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPartitions without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.innerApiCalls.listPartitions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPartitions( + request, + (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPartitions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPartitions(request), expectedError); + const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPartitionsStream without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Partition) => { + 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.listPartitions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPartitions, request)); + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPartitionsStream with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPartitionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.Partition[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.v1.Partition) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPartitions, request)); + assert( + (client.descriptors.page.listPartitions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPartitions without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), + ]; + client.descriptors.page.listPartitions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + const iterable = client.listPartitionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPartitions with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListPartitionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPartitions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPartitionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPartitions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('aspectType', () => { + const fakePath = "/rendered/path/aspectType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aspect_type: "aspectTypeValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.aspectTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.aspectTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('aspectTypePath', () => { + const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAspectTypeName', () => { + const result = client.matchProjectFromAspectTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAspectTypeName', () => { + const result = client.matchLocationFromAspectTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAspectTypeFromAspectTypeName', () => { + const result = client.matchAspectTypeFromAspectTypeName(fakePath); + assert.strictEqual(result, "aspectTypeValue"); + assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('asset', () => { + const fakePath = "/rendered/path/asset"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.assetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('content', () => { + const fakePath = "/rendered/path/content"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + content: "contentValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.contentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, "contentValue"); + assert((client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttribute', () => { + const fakePath = "/rendered/path/dataAttribute"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataTaxonomy: "dataTaxonomyValue", + data_attribute_id: "dataAttributeIdValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributePath', () => { + const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeName', () => { + const result = client.matchProjectFromDataAttributeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeName', () => { + const result = client.matchLocationFromDataAttributeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyFromDataAttributeName', () => { + const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataTaxonomyValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeIdFromDataAttributeName', () => { + const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); + assert.strictEqual(result, "dataAttributeIdValue"); + assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataAttributeBinding', () => { + const fakePath = "/rendered/path/dataAttributeBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_attribute_binding_id: "dataAttributeBindingIdValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataAttributeBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataAttributeBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataAttributeBindingPath', () => { + const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataAttributeBindingName', () => { + const result = client.matchProjectFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataAttributeBindingName', () => { + const result = client.matchLocationFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { + const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); + assert.strictEqual(result, "dataAttributeBindingIdValue"); + assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScan', () => { + const fakePath = "/rendered/path/dataScan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataScanJob', () => { + const fakePath = "/rendered/path/dataScanJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + dataScan: "dataScanValue", + job: "jobValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, "dataScanValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataTaxonomy', () => { + const fakePath = "/rendered/path/dataTaxonomy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_taxonomy_id: "dataTaxonomyIdValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataTaxonomyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataTaxonomyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataTaxonomyPath', () => { + const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataTaxonomyName', () => { + const result = client.matchProjectFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataTaxonomyName', () => { + const result = client.matchLocationFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataTaxonomyIdFromDataTaxonomyName', () => { + const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); + assert.strictEqual(result, "dataTaxonomyIdValue"); + assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entity', () => { + const fakePath = "/rendered/path/entity"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entityPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('entry', () => { + const fakePath = "/rendered/path/entry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_group: "entryGroupValue", + entry: "entryValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + 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 metadataserviceModule.v1.MetadataServiceClient({ + 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('entryType', () => { + const fakePath = "/rendered/path/entryType"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + entry_type: "entryTypeValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entryTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.entryTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('entryTypePath', () => { + const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEntryTypeName', () => { + const result = client.matchProjectFromEntryTypeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEntryTypeName', () => { + const result = client.matchLocationFromEntryTypeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntryTypeFromEntryTypeName', () => { + const result = client.matchEntryTypeFromEntryTypeName(fakePath); + assert.strictEqual(result, "entryTypeValue"); + assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + job: "jobValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('lake', () => { + const fakePath = "/rendered/path/lake"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.lakePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath("projectValue", "locationValue", "lakeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('metadataJob', () => { + const fakePath = "/rendered/path/metadataJob"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + metadataJob: "metadataJobValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, "metadataJobValue"); + assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('partition', () => { + const fakePath = "/rendered/path/partition"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + entity: "entityValue", + partition: "partitionValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, "entityValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, "partitionValue"); + assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = "/rendered/path/projectLocationLakeAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + action: "actionValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + action: "actionValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + asset: "assetValue", + action: "actionValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "assetValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, "actionValue"); + assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('session', () => { + const fakePath = "/rendered/path/session"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + environment: "environmentValue", + session: "sessionValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, "sessionValue"); + assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('task', () => { + const fakePath = "/rendered/path/task"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + task: "taskValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.taskPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, "taskValue"); + assert((client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('zone', () => { + const fakePath = "/rendered/path/zone"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + lake: "lakeValue", + zone: "zoneValue", + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.zonePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, "lakeValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, "zoneValue"); + assert((client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json b/owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/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-dataplex/v1/webpack.config.js b/owl-bot-staging/google-cloud-dataplex/v1/webpack.config.js new file mode 100644 index 00000000000..f2c58f2530c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex/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: 'CatalogService', + filename: './catalog-service.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 64cb0dda62c19eb3d4dbe71890bb505e7c0d2637 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 14 Nov 2024 22:39:44 +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-dataplex/v1/.eslintignore | 7 - .../google-cloud-dataplex/v1/.eslintrc.json | 3 - .../google-cloud-dataplex/v1/.gitignore | 14 - .../google-cloud-dataplex/v1/.jsdoc.js | 55 - .../google-cloud-dataplex/v1/.mocharc.js | 33 - .../google-cloud-dataplex/v1/.prettierrc.js | 22 - .../google-cloud-dataplex/v1/README.md | 1 - .../google-cloud-dataplex/v1/package.json | 63 - .../google/cloud/dataplex/v1/analyze.proto | 285 - .../google/cloud/dataplex/v1/catalog.proto | 1878 - .../google/cloud/dataplex/v1/content.proto | 269 - .../cloud/dataplex/v1/data_profile.proto | 285 - .../cloud/dataplex/v1/data_quality.proto | 488 - .../cloud/dataplex/v1/data_taxonomy.proto | 793 - .../google/cloud/dataplex/v1/datascans.proto | 642 - .../google/cloud/dataplex/v1/logs.proto | 786 - .../google/cloud/dataplex/v1/metadata.proto | 823 - .../google/cloud/dataplex/v1/processing.proto | 104 - .../google/cloud/dataplex/v1/resources.proto | 807 - .../google/cloud/dataplex/v1/security.proto | 53 - .../google/cloud/dataplex/v1/service.proto | 1120 - .../google/cloud/dataplex/v1/tasks.proto | 422 - .../v1/protos/protos.d.ts | 45377 ------ .../google-cloud-dataplex/v1/protos/protos.js | 114449 --------------- .../v1/protos/protos.json | 13622 -- .../v1/catalog_service.create_aspect_type.js | 79 - .../v1/catalog_service.create_entry.js | 87 - .../v1/catalog_service.create_entry_group.js | 79 - .../v1/catalog_service.create_entry_type.js | 79 - .../v1/catalog_service.delete_aspect_type.js | 69 - .../v1/catalog_service.delete_entry.js | 62 - .../v1/catalog_service.delete_entry_group.js | 69 - .../v1/catalog_service.delete_entry_type.js | 68 - .../v1/catalog_service.get_aspect_type.js | 62 - .../generated/v1/catalog_service.get_entry.js | 77 - .../v1/catalog_service.get_entry_group.js | 62 - .../v1/catalog_service.get_entry_type.js | 62 - .../v1/catalog_service.list_aspect_types.js | 93 - .../v1/catalog_service.list_entries.js | 94 - .../v1/catalog_service.list_entry_groups.js | 87 - .../v1/catalog_service.list_entry_types.js | 93 - .../v1/catalog_service.lookup_entry.js | 83 - .../v1/catalog_service.search_entries.js | 91 - .../v1/catalog_service.update_aspect_type.js | 72 - .../v1/catalog_service.update_entry.js | 97 - .../v1/catalog_service.update_entry_group.js | 72 - .../v1/catalog_service.update_entry_type.js | 72 - .../v1/content_service.create_content.js | 72 - .../v1/content_service.delete_content.js | 62 - .../v1/content_service.get_content.js | 66 - .../v1/content_service.get_iam_policy.js | 67 - .../v1/content_service.list_content.js | 87 - .../v1/content_service.set_iam_policy.js | 77 - .../content_service.test_iam_permissions.js | 70 - .../v1/content_service.update_content.js | 72 - .../v1/data_scan_service.create_data_scan.js | 85 - .../v1/data_scan_service.delete_data_scan.js | 65 - ...can_service.generate_data_quality_rules.js | 65 - .../v1/data_scan_service.get_data_scan.js | 68 - .../v1/data_scan_service.get_data_scan_job.js | 68 - .../data_scan_service.list_data_scan_jobs.js | 95 - .../v1/data_scan_service.list_data_scans.js | 88 - .../v1/data_scan_service.run_data_scan.js | 65 - .../v1/data_scan_service.update_data_scan.js | 73 - ..._taxonomy_service.create_data_attribute.js | 83 - ...y_service.create_data_attribute_binding.js | 83 - ...a_taxonomy_service.create_data_taxonomy.js | 84 - ..._taxonomy_service.delete_data_attribute.js | 68 - ...y_service.delete_data_attribute_binding.js | 71 - ...a_taxonomy_service.delete_data_taxonomy.js | 68 - ...ata_taxonomy_service.get_data_attribute.js | 62 - ...nomy_service.get_data_attribute_binding.js | 62 - ...data_taxonomy_service.get_data_taxonomy.js | 62 - ...my_service.list_data_attribute_bindings.js | 90 - ...a_taxonomy_service.list_data_attributes.js | 86 - ...a_taxonomy_service.list_data_taxonomies.js | 87 - ..._taxonomy_service.update_data_attribute.js | 72 - ...y_service.update_data_attribute_binding.js | 72 - ...a_taxonomy_service.update_data_taxonomy.js | 72 - .../v1/dataplex_service.cancel_job.js | 62 - .../v1/dataplex_service.create_asset.js | 85 - .../v1/dataplex_service.create_environment.js | 83 - .../v1/dataplex_service.create_lake.js | 86 - .../v1/dataplex_service.create_task.js | 78 - .../v1/dataplex_service.create_zone.js | 86 - .../v1/dataplex_service.delete_asset.js | 63 - .../v1/dataplex_service.delete_environment.js | 63 - .../v1/dataplex_service.delete_lake.js | 63 - .../v1/dataplex_service.delete_task.js | 63 - .../v1/dataplex_service.delete_zone.js | 63 - .../v1/dataplex_service.get_asset.js | 62 - .../v1/dataplex_service.get_environment.js | 62 - .../generated/v1/dataplex_service.get_job.js | 62 - .../generated/v1/dataplex_service.get_lake.js | 62 - .../generated/v1/dataplex_service.get_task.js | 62 - .../generated/v1/dataplex_service.get_zone.js | 62 - .../v1/dataplex_service.list_asset_actions.js | 77 - .../v1/dataplex_service.list_assets.js | 85 - .../v1/dataplex_service.list_environments.js | 86 - .../v1/dataplex_service.list_jobs.js | 77 - .../v1/dataplex_service.list_lake_actions.js | 77 - .../v1/dataplex_service.list_lakes.js | 85 - .../v1/dataplex_service.list_sessions.js | 88 - .../v1/dataplex_service.list_tasks.js | 84 - .../v1/dataplex_service.list_zone_actions.js | 77 - .../v1/dataplex_service.list_zones.js | 84 - .../generated/v1/dataplex_service.run_task.js | 82 - .../v1/dataplex_service.update_asset.js | 73 - .../v1/dataplex_service.update_environment.js | 73 - .../v1/dataplex_service.update_lake.js | 73 - .../v1/dataplex_service.update_task.js | 73 - .../v1/dataplex_service.update_zone.js | 73 - .../v1/metadata_service.create_entity.js | 72 - .../v1/metadata_service.create_partition.js | 72 - .../v1/metadata_service.delete_entity.js | 68 - .../v1/metadata_service.delete_partition.js | 69 - .../v1/metadata_service.get_entity.js | 67 - .../v1/metadata_service.get_partition.js | 64 - .../v1/metadata_service.list_entities.js | 93 - .../v1/metadata_service.list_partitions.js | 96 - .../v1/metadata_service.update_entity.js | 66 - ...pet_metadata_google.cloud.dataplex.v1.json | 4763 - .../google-cloud-dataplex/v1/src/index.ts | 35 - .../v1/src/v1/catalog_service_client.ts | 5390 - .../src/v1/catalog_service_client_config.json | 165 - .../v1/src/v1/catalog_service_proto_list.json | 17 - .../v1/src/v1/content_service_client.ts | 2911 - .../src/v1/content_service_client_config.json | 78 - .../v1/src/v1/content_service_proto_list.json | 17 - .../v1/src/v1/data_scan_service_client.ts | 3271 - .../v1/data_scan_service_client_config.json | 62 - .../src/v1/data_scan_service_proto_list.json | 17 - .../v1/src/v1/data_taxonomy_service_client.ts | 3974 - .../data_taxonomy_service_client_config.json | 86 - .../v1/data_taxonomy_service_proto_list.json | 17 - .../v1/src/v1/dataplex_service_client.ts | 6322 - .../v1/dataplex_service_client_config.json | 201 - .../src/v1/dataplex_service_proto_list.json | 17 - .../v1/src/v1/gapic_metadata.json | 1189 - .../google-cloud-dataplex/v1/src/v1/index.ts | 24 - .../v1/src/v1/metadata_service_client.ts | 3147 - .../v1/metadata_service_client_config.json | 83 - .../src/v1/metadata_service_proto_list.json | 17 - .../system-test/fixtures/sample/src/index.js | 32 - .../system-test/fixtures/sample/src/index.ts | 62 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_catalog_service_v1.ts | 6095 - .../v1/test/gapic_content_service_v1.ts | 2940 - .../v1/test/gapic_data_scan_service_v1.ts | 3377 - .../v1/test/gapic_data_taxonomy_service_v1.ts | 4446 - .../v1/test/gapic_dataplex_service_v1.ts | 7633 - .../v1/test/gapic_metadata_service_v1.ts | 3185 - .../google-cloud-dataplex/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - packages/google-cloud-dataplex/README.md | 8 +- .../google/cloud/dataplex/v1/catalog.proto | 1064 +- .../cloud/dataplex/v1/data_discovery.proto | 0 .../cloud/dataplex/v1/data_profile.proto | 8 +- .../cloud/dataplex/v1/data_quality.proto | 9 +- .../google/cloud/dataplex/v1/datascans.proto | 56 +- .../google/cloud/dataplex/v1/logs.proto | 49 +- .../google/cloud/dataplex/v1/tasks.proto | 7 +- .../google-cloud-dataplex/protos/protos.d.ts | 3736 +- .../google-cloud-dataplex/protos/protos.js | 29069 ++-- .../google-cloud-dataplex/protos/protos.json | 843 +- .../google-cloud-dataplex/samples/README.md | 72 + .../v1/catalog_service.cancel_metadata_job.js | 0 .../v1/catalog_service.create_aspect_type.js | 8 +- .../v1/catalog_service.create_entry.js | 17 +- .../v1/catalog_service.create_entry_group.js | 6 +- .../v1/catalog_service.create_entry_type.js | 8 +- .../v1/catalog_service.create_metadata_job.js | 0 .../v1/catalog_service.delete_aspect_type.js | 3 +- .../v1/catalog_service.delete_entry_group.js | 3 +- .../v1/catalog_service.delete_entry_type.js | 2 +- .../generated/v1/catalog_service.get_entry.js | 7 +- .../v1/catalog_service.get_metadata_job.js | 0 .../v1/catalog_service.list_aspect_types.js | 24 +- .../v1/catalog_service.list_entries.js | 36 +- .../v1/catalog_service.list_entry_groups.js | 12 +- .../v1/catalog_service.list_entry_types.js | 22 +- .../v1/catalog_service.list_metadata_jobs.js | 0 .../v1/catalog_service.lookup_entry.js | 7 +- .../v1/catalog_service.search_entries.js | 16 +- .../v1/catalog_service.update_entry.js | 37 +- .../v1/catalog_service.update_entry_group.js | 6 +- .../v1/catalog_service.update_entry_type.js | 6 +- ...pet_metadata_google.cloud.dataplex.v1.json | 236 +- .../src/v1/catalog_service_client.ts | 1314 +- .../src/v1/catalog_service_client_config.json | 16 + .../src/v1/catalog_service_proto_list.json | 1 + .../src/v1/content_service_client.ts | 125 + .../src/v1/content_service_proto_list.json | 1 + .../src/v1/data_scan_service_client.ts | 125 + .../src/v1/data_scan_service_proto_list.json | 1 + .../src/v1/data_taxonomy_service_client.ts | 125 + .../v1/data_taxonomy_service_proto_list.json | 1 + .../src/v1/dataplex_service_client.ts | 125 + .../src/v1/dataplex_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 44 + .../src/v1/metadata_service_client.ts | 125 + .../src/v1/metadata_service_proto_list.json | 1 + .../test/gapic_catalog_service_v1.ts | 1189 +- .../test/gapic_content_service_v1.ts | 64 + .../test/gapic_data_scan_service_v1.ts | 64 + .../test/gapic_data_taxonomy_service_v1.ts | 66 + .../test/gapic_dataplex_service_v1.ts | 64 + .../test/gapic_metadata_service_v1.ts | 64 + 208 files changed, 26014 insertions(+), 262162 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-dataplex/v1/webpack.config.js rename {owl-bot-staging/google-cloud-dataplex/v1 => packages/google-cloud-dataplex}/protos/google/cloud/dataplex/v1/data_discovery.proto (100%) rename {owl-bot-staging/google-cloud-dataplex/v1 => packages/google-cloud-dataplex}/samples/generated/v1/catalog_service.cancel_metadata_job.js (100%) rename {owl-bot-staging/google-cloud-dataplex/v1 => packages/google-cloud-dataplex}/samples/generated/v1/catalog_service.create_metadata_job.js (100%) rename {owl-bot-staging/google-cloud-dataplex/v1 => packages/google-cloud-dataplex}/samples/generated/v1/catalog_service.get_metadata_job.js (100%) rename {owl-bot-staging/google-cloud-dataplex/v1 => packages/google-cloud-dataplex}/samples/generated/v1/catalog_service.list_metadata_jobs.js (100%) diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.eslintignore b/owl-bot-staging/google-cloud-dataplex/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/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-dataplex/v1/.eslintrc.json b/owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.gitignore b/owl-bot-staging/google-cloud-dataplex/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/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-dataplex/v1/.jsdoc.js b/owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js deleted file mode 100644 index cbdd5356520..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/dataplex', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js b/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js b/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/README.md b/owl-bot-staging/google-cloud-dataplex/v1/README.md deleted file mode 100644 index a80d54e484e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Dataplex: Nodejs Client diff --git a/owl-bot-staging/google-cloud-dataplex/v1/package.json b/owl-bot-staging/google-cloud-dataplex/v1/package.json deleted file mode 100644 index d9195f670ef..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@google-cloud/dataplex", - "version": "0.1.0", - "description": "Dataplex client for Node.js", - "repository": "googleapis/nodejs-dataplex", - "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 dataplex", - "dataplex", - "catalog service", - "content service", - "dataplex service", - "data scan service", - "data taxonomy service", - "metadata service" - ], - "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-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto deleted file mode 100644 index 912e3c9e615..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/analyze.proto +++ /dev/null @@ -1,285 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataplex/v1/resources.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "AnalyzeProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// Environment represents a user-visible compute infrastructure for analytics -// within a lake. -message Environment { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Environment" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" - }; - - // Configuration for the underlying infrastructure used to run workloads. - message InfrastructureSpec { - // Compute resources associated with the analyze interactive workloads. - message ComputeResources { - // Optional. Size in GB of the disk. Default is 100 GB. - int32 disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Total number of nodes in the sessions created for this - // environment. - int32 node_count = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Max configurable nodes. - // If max_node_count > node_count, then auto-scaling is enabled. - int32 max_node_count = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Software Runtime Configuration to run Analyze. - message OsImageRuntime { - // Required. Dataplex Image version. - string image_version = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. List of Java jars to be included in the runtime environment. - // Valid input includes Cloud Storage URIs to Jar binaries. - // For example, gs://bucket-name/my/path/to/file.jar - repeated string java_libraries = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of python packages to be installed. - // Valid formats include Cloud Storage URI to a PIP installable library. - // For example, gs://bucket-name/my/path/to/lib.tar.gz - repeated string python_packages = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Spark properties to provide configuration for use in sessions - // created for this environment. The properties to set on daemon config - // files. Property keys are specified in `prefix:property` format. The - // prefix must be "spark". - map properties = 4 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Hardware config - oneof resources { - // Optional. Compute resources needed for analyze interactive workloads. - ComputeResources compute = 50 [(google.api.field_behavior) = OPTIONAL]; - } - - // Software config - oneof runtime { - // Required. Software Runtime Configuration for analyze interactive - // workloads. - OsImageRuntime os_image = 100 [(google.api.field_behavior) = REQUIRED]; - } - } - - // Configuration for sessions created for this environment. - message SessionSpec { - // Optional. The idle time configuration of the session. The session will be - // auto-terminated at the end of this period. - google.protobuf.Duration max_idle_duration = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If True, this causes sessions to be pre-created and available - // for faster startup to enable interactive exploration use-cases. This - // defaults to False to avoid additional billed charges. These can only be - // set to True for the environment with name set to "default", and with - // default configuration. - bool enable_fast_startup = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Status of sessions created for this environment. - message SessionStatus { - // Output only. Queries over sessions to mark whether the environment is - // currently active or not - bool active = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // URI Endpoints to access sessions associated with the Environment. - message Endpoints { - // Output only. URI to serve notebook APIs - string notebooks = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. URI to serve SQL APIs - string sql = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The relative resource name of the environment, of the form: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Environment" - } - ]; - - // Optional. User friendly display name. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. System generated globally unique ID for the environment. This - // ID will be different if the environment is deleted and re-created with the - // same name. - string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Environment creation time. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the environment was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User defined labels for the environment. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the environment. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the environment. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Infrastructure specification for the Environment. - InfrastructureSpec infrastructure_spec = 100 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Configuration for sessions created for this environment. - SessionSpec session_spec = 101 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Status of sessions created for this environment. - SessionStatus session_status = 102 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. URI Endpoints to access sessions associated with the - // Environment. - Endpoints endpoints = 200 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Content represents a user-visible notebook or a sql script -message Content { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Content" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" - }; - - // Configuration for the Sql Script content. - message SqlScript { - // Query Engine Type of the SQL Script. - enum QueryEngine { - // Value was unspecified. - QUERY_ENGINE_UNSPECIFIED = 0; - - // Spark SQL Query. - SPARK = 2; - } - - // Required. Query Engine to be used for the Sql Query. - QueryEngine engine = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Configuration for Notebook content. - message Notebook { - // Kernel Type of the Jupyter notebook. - enum KernelType { - // Kernel Type unspecified. - KERNEL_TYPE_UNSPECIFIED = 0; - - // Python 3 Kernel. - PYTHON3 = 1; - } - - // Required. Kernel Type of the notebook. - KernelType kernel_type = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Output only. The relative resource name of the content, of the form: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Content" - } - ]; - - // Output only. System generated globally unique ID for the content. This ID - // will be different if the content is deleted and re-created with the same - // name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The path for the Content file, represented as directory - // structure. Unique within a lake. Limited to alphanumerics, hyphens, - // underscores, dots and slashes. - string path = 3 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Content creation time. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the content was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User defined labels for the content. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the content. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Only returned in `GetContent` requests and not in `ListContent` request. - oneof data { - // Required. Content data in string format. - string data_text = 9 [(google.api.field_behavior) = REQUIRED]; - } - - // Types of content - oneof content { - // Sql Script related configurations. - SqlScript sql_script = 100; - - // Notebook related configurations. - Notebook notebook = 101; - } -} - -// Represents an active analyze session running for a user. -message Session { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Session" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" - }; - - // Output only. The relative resource name of the content, of the form: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Session" - } - ]; - - // Output only. Email of user running the session. - string user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Session start time. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State of Session - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto deleted file mode 100644 index 76bf4dda7a6..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/catalog.proto +++ /dev/null @@ -1,1878 +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.dataplex.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataplex/v1/service.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Dataplex.V1"; -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "CatalogProto"; -option java_package = "com.google.cloud.dataplex.v1"; -option php_namespace = "Google\\Cloud\\Dataplex\\V1"; -option ruby_package = "Google::Cloud::Dataplex::V1"; - -// The primary resources offered by this service are EntryGroups, EntryTypes, -// AspectTypes, and Entries. They collectively let data administrators organize, -// manage, secure, and catalog data located across cloud projects in their -// organization in a variety of storage systems, including Cloud Storage and -// BigQuery. -service CatalogService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates an EntryType. - rpc CreateEntryType(CreateEntryTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/entryTypes" - body: "entry_type" - }; - option (google.api.method_signature) = "parent,entry_type,entry_type_id"; - option (google.longrunning.operation_info) = { - response_type: "EntryType" - metadata_type: "OperationMetadata" - }; - } - - // Updates an EntryType. - rpc UpdateEntryType(UpdateEntryTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}" - body: "entry_type" - }; - option (google.api.method_signature) = "entry_type,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "EntryType" - metadata_type: "OperationMetadata" - }; - } - - // Deletes an EntryType. - rpc DeleteEntryType(DeleteEntryTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryTypes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists EntryType resources in a project and location. - rpc ListEntryTypes(ListEntryTypesRequest) returns (ListEntryTypesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/entryTypes" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an EntryType. - rpc GetEntryType(GetEntryTypeRequest) returns (EntryType) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryTypes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an AspectType. - rpc CreateAspectType(CreateAspectTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/aspectTypes" - body: "aspect_type" - }; - option (google.api.method_signature) = "parent,aspect_type,aspect_type_id"; - option (google.longrunning.operation_info) = { - response_type: "AspectType" - metadata_type: "OperationMetadata" - }; - } - - // Updates an AspectType. - rpc UpdateAspectType(UpdateAspectTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}" - body: "aspect_type" - }; - option (google.api.method_signature) = "aspect_type,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AspectType" - metadata_type: "OperationMetadata" - }; - } - - // Deletes an AspectType. - rpc DeleteAspectType(DeleteAspectTypeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/aspectTypes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists AspectType resources in a project and location. - rpc ListAspectTypes(ListAspectTypesRequest) - returns (ListAspectTypesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/aspectTypes" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an AspectType. - rpc GetAspectType(GetAspectTypeRequest) returns (AspectType) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/aspectTypes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an EntryGroup. - rpc CreateEntryGroup(CreateEntryGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/entryGroups" - body: "entry_group" - }; - option (google.api.method_signature) = "parent,entry_group,entry_group_id"; - option (google.longrunning.operation_info) = { - response_type: "EntryGroup" - metadata_type: "OperationMetadata" - }; - } - - // Updates an EntryGroup. - rpc UpdateEntryGroup(UpdateEntryGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" - body: "entry_group" - }; - option (google.api.method_signature) = "entry_group,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "EntryGroup" - metadata_type: "OperationMetadata" - }; - } - - // Deletes an EntryGroup. - rpc DeleteEntryGroup(DeleteEntryGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists EntryGroup resources in a project and location. - rpc ListEntryGroups(ListEntryGroupsRequest) - returns (ListEntryGroupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/entryGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an EntryGroup. - rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates an Entry. - 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,entry_id"; - } - - // Updates an Entry. - 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,update_mask"; - } - - // Deletes an Entry. - rpc DeleteEntry(DeleteEntryRequest) returns (Entry) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Entries within an EntryGroup. - rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an Entry. - // - // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is - // changing. For more information, see [Changes to BigQuery metadata stored in - // Dataplex - // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). - rpc GetEntry(GetEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Looks up a single Entry by name using the permission on the source system. - // - // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is - // changing. For more information, see [Changes to BigQuery metadata stored in - // Dataplex - // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). - rpc LookupEntry(LookupEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*}:lookupEntry" - }; - } - - // Searches for Entries matching the given query and scope. - rpc SearchEntries(SearchEntriesRequest) returns (SearchEntriesResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*}:searchEntries" - }; - option (google.api.method_signature) = "name,query"; - } - - // Creates a metadata job. For example, use a metadata job to import Dataplex - // Catalog entries and aspects from a third-party system into Dataplex. - rpc CreateMetadataJob(CreateMetadataJobRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/metadataJobs" - body: "metadata_job" - }; - option (google.api.method_signature) = - "parent,metadata_job,metadata_job_id"; - option (google.longrunning.operation_info) = { - response_type: "MetadataJob" - metadata_type: "OperationMetadata" - }; - } - - // Gets a metadata job. - rpc GetMetadataJob(GetMetadataJobRequest) returns (MetadataJob) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/metadataJobs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists metadata jobs. - rpc ListMetadataJobs(ListMetadataJobsRequest) - returns (ListMetadataJobsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/metadataJobs" - }; - option (google.api.method_signature) = "parent"; - } - - // Cancels a metadata job. - // - // If you cancel a metadata import job that is in progress, the changes in the - // job might be partially applied. We recommend that you reset the state of - // the entry groups in your project by running another metadata job that - // reverts the changes from the canceled job. - rpc CancelMetadataJob(CancelMetadataJobRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } -} - -// AspectType is a template for creating Aspects, and represents the -// JSON-schema for a given Entry, for example, BigQuery Table Schema. -message AspectType { - option (google.api.resource) = { - type: "dataplex.googleapis.com/AspectType" - pattern: "projects/{project}/locations/{location}/aspectTypes/{aspect_type}" - plural: "aspectTypes" - singular: "aspectType" - }; - - // Autorization for an AspectType. - message Authorization { - // Immutable. The IAM permission grantable on the EntryGroup to allow access - // to instantiate Aspects of Dataplex owned AspectTypes, only settable for - // Dataplex owned Types. - string alternate_use_permission = 1 - [(google.api.field_behavior) = IMMUTABLE]; - } - - // MetadataTemplate definition for an AspectType. - message MetadataTemplate { - // Definition of Enumvalue, to be used for enum fields. - message EnumValue { - // Required. Index for the enum value. It can't be modified. - int32 index = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the enumvalue. This is the actual value that the - // aspect can contain. - string name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. You can set this message if you need to deprecate an enum - // value. - string deprecated = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Definition of the constraints of a field. - message Constraints { - // Optional. Marks this field as optional or required. - bool required = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Definition of the annotations of a field. - message Annotations { - // Optional. Marks a field as deprecated. You can include a deprecation - // message. - string deprecated = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Display name for a field. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description for a field. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Display order for a field. You can use this to reorder where - // a field is rendered. - int32 display_order = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. You can use String Type annotations to specify special - // meaning to string fields. The following values are supported: - // - // * richText: The field must be interpreted as a rich text field. - // * url: A fully qualified URL link. - // * resource: A service qualified resource reference. - string string_type = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Suggested hints for string fields. You can use them to - // suggest values to users through console. - repeated string string_values = 7 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Index is used to encode Template messages. The value of index - // can range between 1 and 2,147,483,647. Index must be unique within all - // fields in a Template. (Nested Templates can reuse indexes). Once a - // Template is defined, the index cannot be changed, because it identifies - // the field in the actual storage format. Index is a mandatory field, but - // it is optional for top level fields, and map/array "values" definitions. - int32 index = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The name of the field. - string name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The datatype of this field. The following values are supported: - // - // Primitive types: - // - // * string - // * integer - // * boolean - // * double - // * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: - // "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). - // - // Complex types: - // - // * enum - // * array - // * map - // * record - string type = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Field definition. You must specify it if the type is record. It - // defines the nested fields. - repeated MetadataTemplate record_fields = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of values for an enum type. You must define it if the - // type is enum. - repeated EnumValue enum_values = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If the type is map, set map_items. map_items can refer to a - // primitive field or a complex (record only) field. To specify a primitive - // field, you only need to set name and type in the nested - // MetadataTemplate. The recommended value for the name field is item, as - // this isn't used in the actual payload. - MetadataTemplate map_items = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If the type is array, set array_items. array_items can refer - // to a primitive field or a complex (record only) field. To specify a - // primitive field, you only need to set name and type in the nested - // MetadataTemplate. The recommended value for the name field is item, as - // this isn't used in the actual payload. - MetadataTemplate array_items = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. You can use type id if this definition of the field needs to be - // reused later. The type id must be unique across the entire template. You - // can only specify it if the field type is record. - string type_id = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A reference to another field definition (not an inline - // definition). The value must be equal to the value of an id field defined - // elsewhere in the MetadataTemplate. Only fields with record type can - // refer to other fields. - string type_ref = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the constraints on this field. - Constraints constraints = 50 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies annotations on this field. - Annotations annotations = 51 [(google.api.field_behavior) = OPTIONAL]; - } - - // Output only. The relative resource name of the AspectType, of the form: - // projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/AspectType" - } - ]; - - // Output only. System generated globally unique ID for the AspectType. - // If you delete and recreate the AspectType with the same name, then this ID - // will be different. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the AspectType was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the AspectType was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the AspectType. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the AspectType. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // The service computes this checksum. The client may send it on update and - // delete requests to ensure it has an up-to-date value before proceeding. - string etag = 8; - - // Immutable. Defines the Authorization for this type. - Authorization authorization = 52 [(google.api.field_behavior) = IMMUTABLE]; - - // Required. MetadataTemplate of the aspect. - MetadataTemplate metadata_template = 53 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. Denotes the transfer status of the Aspect Type. It is - // unspecified for Aspect Types created from Dataplex API. - TransferStatus transfer_status = 202 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// An Entry Group represents a logical grouping of one or more Entries. -message EntryGroup { - option (google.api.resource) = { - type: "dataplex.googleapis.com/EntryGroup" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" - plural: "entryGroups" - singular: "entryGroup" - }; - - // Output only. The relative resource name of the EntryGroup, in the format - // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; - - // Output only. System generated globally unique ID for the EntryGroup. If you - // delete and recreate the EntryGroup with the same name, this ID will be - // different. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the EntryGroup was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the EntryGroup was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the EntryGroup. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the EntryGroup. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // This checksum is computed by the service, and might be sent on update and - // delete requests to ensure the client has an up-to-date value before - // proceeding. - string etag = 8; - - // Output only. Denotes the transfer status of the Entry Group. It is - // unspecified for Entry Group created from Dataplex API. - TransferStatus transfer_status = 202 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Entry Type is a template for creating Entries. -message EntryType { - option (google.api.resource) = { - type: "dataplex.googleapis.com/EntryType" - pattern: "projects/{project}/locations/{location}/entryTypes/{entry_type}" - plural: "entryTypes" - singular: "entryType" - }; - - message AspectInfo { - // Required aspect type for the entry type. - string type = 1 [(google.api.resource_reference) = { - type: "dataplex.googleapis.com/AspectType" - }]; - } - - // Authorization for an Entry Type. - message Authorization { - // Immutable. The IAM permission grantable on the Entry Group to allow - // access to instantiate Entries of Dataplex owned Entry Types, only - // settable for Dataplex owned Types. - string alternate_use_permission = 1 - [(google.api.field_behavior) = IMMUTABLE]; - } - - // Output only. The relative resource name of the EntryType, of the form: - // projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryType" - } - ]; - - // Output only. System generated globally unique ID for the EntryType. This ID - // will be different if the EntryType is deleted and re-created with the same - // name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the EntryType was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the EntryType was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the EntryType. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the EntryType. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This checksum is computed by the service, and might be sent on - // update and delete requests to ensure the client has an up-to-date value - // before proceeding. - string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates the classes this Entry Type belongs to, for example, - // TABLE, DATABASE, MODEL. - repeated string type_aliases = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The platform that Entries of this type belongs to. - string platform = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The system that Entries of this type belongs to. Examples include - // CloudSQL, MariaDB etc - string system = 11 [(google.api.field_behavior) = OPTIONAL]; - - // AspectInfo for the entry type. - repeated AspectInfo required_aspects = 50; - - // Immutable. Authorization defined for this type. - Authorization authorization = 51 [(google.api.field_behavior) = IMMUTABLE]; -} - -// An aspect is a single piece of metadata describing an entry. -message Aspect { - // Output only. The resource name of the type used to create this Aspect. - string aspect_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The path in the entry under which the aspect is attached. - string path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the Aspect was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the Aspect was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The content of the aspect, according to its aspect type schema. - // The maximum size of the field is 120KB (encoded as UTF-8). - google.protobuf.Struct data = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Information related to the source system of the aspect. - AspectSource aspect_source = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// Information related to the source system of the aspect. -message AspectSource { - // The time the aspect was created in the source system. - google.protobuf.Timestamp create_time = 10; - - // The time the aspect was last updated in the source system. - google.protobuf.Timestamp update_time = 11; - - // The version of the data format used to produce this data. This field is - // used to indicated when the underlying data format changes (e.g., schema - // modifications, changes to the source URL format definition, etc). - string data_version = 12; -} - -// An entry is a representation of a data resource that can be described by -// various metadata. -message Entry { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Entry" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - plural: "entries" - singular: "entry" - }; - - // Identifier. The relative resource name of the entry, in the format - // `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. Immutable. The relative resource name of the entry type that was - // used to create this entry, in the format - // `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - string entry_type = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Output only. The time when the entry was created in Dataplex. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the entry was last updated in Dataplex. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The aspects that are attached to the entry. Depending on how the - // aspect is attached to the entry, the format of the aspect key can be one of - // the following: - // - // * If the aspect is attached directly to the entry: - // `{project_id_or_number}.{location_id}.{aspect_type_id}` - // * If the aspect is attached to an entry's path: - // `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}` - map aspects = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Immutable. The resource name of the parent entry. - string parent_entry = 10 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. A name for the entry that can be referenced by an external - // system. For more information, see [Fully qualified - // names](https://cloud.google.com/data-catalog/docs/fully-qualified-names). - // The maximum size of the field is 4000 characters. - string fully_qualified_name = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Information related to the source system of the data resource - // that is represented by the entry. - EntrySource entry_source = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// Information related to the source system of the data resource that is -// represented by the entry. -message EntrySource { - // Information about individual items in the hierarchy that is associated with - // the data resource. - message Ancestor { - // Optional. The name of the ancestor resource. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of the ancestor resource. - string type = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // The name of the resource in the source system. - // Maximum length is 4,000 characters. - string resource = 1; - - // The name of the source system. - // Maximum length is 64 characters. - string system = 2; - - // The platform containing the source system. - // Maximum length is 64 characters. - string platform = 3; - - // A user-friendly display name. - // Maximum length is 500 characters. - string display_name = 5; - - // A description of the data resource. - // Maximum length is 2,000 characters. - string description = 6; - - // User-defined labels. - // The maximum size of keys and values is 128 characters each. - map labels = 7; - - // Immutable. The entries representing the ancestors of the data resource in - // the source system. - repeated Ancestor ancestors = 9 [(google.api.field_behavior) = IMMUTABLE]; - - // The time when the resource was created in the source system. - google.protobuf.Timestamp create_time = 10; - - // The time when the resource was last updated in the source system. If the - // entry exists in the system and its `EntrySource` has `update_time` - // populated, further updates to the `EntrySource` of the entry must provide - // incremental updates to its `update_time`. - google.protobuf.Timestamp update_time = 11; - - // Output only. Location of the resource in the source system. You can search - // the entry by this location. By default, this should match the location of - // the entry group containing this entry. A different value allows capturing - // the source location for data external to Google Cloud. - string location = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Create EntryGroup Request. -message CreateEntryGroupRequest { - // Required. The resource name of the entryGroup, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. EntryGroup identifier. - string entry_group_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. EntryGroup Resource. - EntryGroup entry_group = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The service validates the request without performing any - // mutations. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update EntryGroup Request. -message UpdateEntryGroupRequest { - // Required. EntryGroup Resource. - EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The service validates the request, without performing any - // mutations. The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete EntryGroup Request. -message DeleteEntryGroupRequest { - // Required. The resource name of the EntryGroup: - // `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; - - // Optional. If the client provided etag value does not match the current etag - // value, the DeleteEntryGroupRequest method returns an ABORTED error - // response. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List entryGroups request. -message ListEntryGroupsRequest { - // Required. The resource name of the entryGroup location, of the form: - // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a Google Cloud region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of EntryGroups to return. The service may return - // fewer than this value. If unspecified, the service returns at most 10 - // EntryGroups. The maximum value is 1000; values above 1000 will be coerced - // to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListEntryGroups` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters you provide to `ListEntryGroups` must match the call that - // provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List entry groups response. -message ListEntryGroupsResponse { - // Entry groups under the given parent location. - repeated EntryGroup entry_groups = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that the service couldn't reach. - repeated string unreachable_locations = 3; -} - -// Get EntryGroup request. -message GetEntryGroupRequest { - // Required. The resource name of the EntryGroup: - // `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; -} - -// Create EntryType Request. -message CreateEntryTypeRequest { - // Required. The resource name of the EntryType, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a Google Cloud region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. EntryType identifier. - string entry_type_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. EntryType Resource. - EntryType entry_type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The service validates the request without performing any - // mutations. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update EntryType Request. -message UpdateEntryTypeRequest { - // Required. EntryType Resource. - EntryType entry_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The service validates the request without performing any - // mutations. The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delele EntryType Request. -message DeleteEntryTypeRequest { - // Required. The resource name of the EntryType: - // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryType" - } - ]; - - // Optional. If the client provided etag value does not match the current etag - // value, the DeleteEntryTypeRequest method returns an ABORTED error response. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List EntryTypes request -message ListEntryTypesRequest { - // Required. The resource name of the EntryType location, of the form: - // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a Google Cloud region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of EntryTypes to return. The service may return - // fewer than this value. If unspecified, the service returns at most 10 - // EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListEntryTypes` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters you provided to `ListEntryTypes` must match the call that - // provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. Filters are case-sensitive. - // The service supports the following formats: - // - // * labels.key1 = "value1" - // * labels:key1 - // * name = "value" - // - // These restrictions can be conjoined with AND, OR, and NOT conjunctions. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Orders the result by `name` or `create_time` fields. - // If not specified, the ordering is undefined. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List EntryTypes response. -message ListEntryTypesResponse { - // EntryTypes under the given parent location. - repeated EntryType entry_types = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that the service couldn't reach. - repeated string unreachable_locations = 3; -} - -// Get EntryType request. -message GetEntryTypeRequest { - // Required. The resource name of the EntryType: - // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryType" - } - ]; -} - -// Create AspectType Request. -message CreateAspectTypeRequest { - // Required. The resource name of the AspectType, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a Google Cloud region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. AspectType identifier. - string aspect_type_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. AspectType Resource. - AspectType aspect_type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The service validates the request without performing any - // mutations. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update AspectType Request -message UpdateAspectTypeRequest { - // Required. AspectType Resource - AspectType aspect_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delele AspectType Request. -message DeleteAspectTypeRequest { - // Required. The resource name of the AspectType: - // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/AspectType" - } - ]; - - // Optional. If the client provided etag value does not match the current etag - // value, the DeleteAspectTypeRequest method returns an ABORTED error - // response. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List AspectTypes request. -message ListAspectTypesRequest { - // Required. The resource name of the AspectType location, of the form: - // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a Google Cloud region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of AspectTypes to return. The service may return - // fewer than this value. If unspecified, the service returns at most 10 - // AspectTypes. The maximum value is 1000; values above 1000 will be coerced - // to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListAspectTypes` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters you provide to `ListAspectTypes` must match the call that - // provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. Filters are case-sensitive. - // The service supports the following formats: - // - // * labels.key1 = "value1" - // * labels:key1 - // * name = "value" - // - // These restrictions can be conjoined with AND, OR, and NOT conjunctions. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Orders the result by `name` or `create_time` fields. - // If not specified, the ordering is undefined. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List AspectTypes response. -message ListAspectTypesResponse { - // AspectTypes under the given parent location. - repeated AspectType aspect_types = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that the service couldn't reach. - repeated string unreachable_locations = 3; -} - -// Get AspectType request. -message GetAspectTypeRequest { - // Required. The resource name of the AspectType: - // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/AspectType" - } - ]; -} - -// Create Entry request. -message CreateEntryRequest { - // Required. The resource name of the parent Entry Group: - // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; - - // Required. Entry identifier. It has to be unique within an Entry Group. - // - // Entries corresponding to Google Cloud resources use an Entry ID format - // based on [full resource - // names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - // The format is a full resource name of the resource without the - // prefix double slashes in the API service name part of the full resource - // name. This allows retrieval of entries using their associated resource - // name. - // - // For example, if the full resource name of a resource is - // `//library.googleapis.com/shelves/shelf1/books/book2`, - // then the suggested entry_id is - // `library.googleapis.com/shelves/shelf1/books/book2`. - // - // It is also suggested to follow the same convention for entries - // corresponding to resources from providers or systems other than Google - // Cloud. - // - // The maximum size of the field is 4000 characters. - string entry_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Entry resource. - Entry entry = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Update Entry request. -message UpdateEntryRequest { - // Required. Entry resource. - Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Mask of fields to update. To update Aspects, the update_mask must - // contain the value "aspects". - // - // If the update_mask is empty, the service will update all modifiable fields - // present in the request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true and the entry doesn't exist, the service will - // create it. - bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true and the aspect_keys specify aspect ranges, the - // service deletes any existing aspects from that range that weren't provided - // in the request. - bool delete_missing_aspects = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The map keys of the Aspects which the service should modify. It - // supports the following syntaxes: - // - // * `` - matches an aspect of the given type and empty - // path. - // * `@path` - matches an aspect of the given type and - // specified path. For example, to attach an aspect to a field that is - // specified by the `schema` aspect, the path should have the format - // `Schema.`. - // * `*` - matches aspects of the given type for all - // paths. - // * `*@path` - matches aspects of all types on the given path. - // - // The service will not remove existing aspects matching the syntax unless - // `delete_missing_aspects` is set to true. - // - // If this field is left empty, the service treats it as specifying - // exactly those Aspects present in the request. - repeated string aspect_keys = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete Entry request. -message DeleteEntryRequest { - // Required. The resource name of the Entry: - // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } - ]; -} - -// List Entries request. -message ListEntriesRequest { - // Required. The resource name of the parent Entry Group: - // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; - - // Optional. Number of items to return per page. If there are remaining - // results, the service returns a next_page_token. If unspecified, the service - // returns at most 10 Entries. The maximum value is 100; values above 100 will - // be coerced to 100. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListEntries` call. Provide - // this to retrieve the subsequent page. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A filter on the entries to return. Filters are case-sensitive. - // You can filter the request by the following fields: - // - // * entry_type - // * entry_source.display_name - // - // The comparison operators are =, !=, <, >, <=, >=. The service compares - // strings according to lexical order. - // - // You can use the logical operators AND, OR, NOT in the filter. - // - // You can use Wildcard "*", but for entry_type you need to provide the - // full project id or number. - // - // Example filter expressions: - // - // * "entry_source.display_name=AnExampleDisplayName" - // * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - // * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - // entry_type=projects/another-project/locations/*" - // * "NOT entry_source.display_name=AnotherExampleDisplayName" - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// List Entries response. -message ListEntriesResponse { - // The list of entries under the given parent location. - repeated Entry entries = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Get Entry request. -message GetEntryRequest { - // Required. The resource name of the Entry: - // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } - ]; - - // Optional. View to control which parts of an entry the service should - // return. - EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Limits the aspects returned to the provided aspect types. - // It only works for CUSTOM view. - repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Limits the aspects returned to those associated with the provided - // paths within the Entry. It only works for CUSTOM view. - repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Lookup Entry request using permissions in the source system. -message LookupEntryRequest { - // Required. The project to which the request should be attributed in the - // following form: `projects/{project}/locations/{location}`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. View to control which parts of an entry the service should - // return. - EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Limits the aspects returned to the provided aspect types. - // It only works for CUSTOM view. - repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Limits the aspects returned to those associated with the provided - // paths within the Entry. It only works for CUSTOM view. - repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The resource name of the Entry: - // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - string entry = 5 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } - ]; -} - -message SearchEntriesRequest { - // Required. The project to which the request should be attributed in the - // following form: `projects/{project}/locations/{location}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The query against which entries in scope should be matched. - string query = 2 [(google.api.field_behavior) = REQUIRED]; - - // 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 = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `SearchEntries` call. Provide - // this to retrieve the subsequent page. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the ordering of results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The scope under which the search should be operating. It must - // either be `organizations/` or `projects/`. If it is - // unspecified, it defaults to the organization where the project provided in - // `name` is located. - string scope = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// A single result of a SearchEntries request. -message SearchEntriesResult { - // Snippets for the entry, contains HTML-style highlighting for - // matched tokens, will be used in UI. - message Snippets { - option deprecated = true; - - // Entry - Entry dataplex_entry = 1 [deprecated = true]; - } - - // Linked resource name. - string linked_resource = 8 [deprecated = true]; - - Entry dataplex_entry = 9; - - // Snippets. - Snippets snippets = 12 [deprecated = true]; -} - -message SearchEntriesResponse { - // The results matching the search query. - repeated SearchEntriesResult results = 1; - - // The estimated total number of matching entries. This number isn't - // guaranteed to be accurate. - int32 total_size = 2; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 3; - - // Locations that the service couldn't reach. Search results don't include - // data from these locations. - repeated string unreachable = 4; -} - -// An object that describes the values that you want to set for an entry and its -// attached aspects when you import metadata. Used when you run a metadata -// import job. See -// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]. -// -// You provide a collection of import items in a metadata import file. For more -// information about how to create a metadata import file, see [Metadata import -// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). -message ImportItem { - // Information about an entry and its attached aspects. - Entry entry = 1; - - // The fields to update, in paths that are relative to the `Entry` resource. - // Separate each field with a comma. - // - // In `FULL` entry sync mode, Dataplex includes the paths of all of the fields - // for an entry that can be modified, including aspects. This means that - // Dataplex replaces the existing entry with the entry in the metadata import - // file. All modifiable fields are updated, regardless of the fields that are - // listed in the update mask, and regardless of whether a field is present - // in the `entry` object. - // - // - // The `update_mask` field is ignored when an entry is created or re-created. - // - // Dataplex also determines which entries and aspects to modify by comparing - // the values and timestamps that you provide in the metadata import file with - // the values and timestamps that exist in your project. For more information, - // see [Comparison - // logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). - google.protobuf.FieldMask update_mask = 2; - - // The aspects to modify. Supports the following syntaxes: - // - // * `{aspect_type_reference}`: matches aspects that belong to the specified - // aspect type and are attached directly to the entry. - // * `{aspect_type_reference}@{path}`: matches aspects that belong to the - // specified aspect type and path. - // * `{aspect_type_reference}@*`: matches aspects that belong to the specified - // aspect type for all paths. - // - // Replace `{aspect_type_reference}` with a reference to the aspect type, in - // the format - // `{project_id_or_number}.{location_id}.{aspect_type_id}`. - // - // If you leave this field empty, it is treated as specifying exactly those - // aspects that are present within the specified entry. - // - // In `FULL` entry sync mode, Dataplex implicitly adds the keys for all of the - // required aspects of an entry. - repeated string aspect_keys = 3; -} - -// Create metadata job request. -message CreateMetadataJobRequest { - // Required. The resource name of the parent location, in the format - // `projects/{project_id_or_number}/locations/{location_id}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The metadata job resource. - MetadataJob metadata_job = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The metadata job ID. If not provided, a unique ID is generated - // with the prefix `metadata-job-`. - string metadata_job_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The service validates the request without performing any - // mutations. The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get metadata job request. -message GetMetadataJobRequest { - // Required. The resource name of the metadata job, in the format - // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/MetadataJob" - } - ]; -} - -// List metadata jobs request. -message ListMetadataJobsRequest { - // Required. The resource name of the parent location, in the format - // `projects/{project_id_or_number}/locations/{location_id}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. The maximum number of metadata jobs to return. The service might - // return fewer jobs than this value. If unspecified, at most 10 jobs are - // returned. The maximum value is 1,000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page token received from a previous `ListMetadataJobs` call. - // Provide this token to retrieve the subsequent page of results. When - // paginating, all other parameters that are provided to the - // `ListMetadataJobs` request must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. Filters are case-sensitive. - // The service supports the following formats: - // - // * `labels.key1 = "value1"` - // * `labels:key1` - // * `name = "value"` - // - // You can combine filters with `AND`, `OR`, and `NOT` operators. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The field to sort the results by, either `name` or `create_time`. - // If not specified, the ordering is undefined. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List metadata jobs response. -message ListMetadataJobsResponse { - // Metadata jobs under the specified parent location. - repeated MetadataJob metadata_jobs = 1; - - // A token to retrieve the next page of results. If there are no more results - // in the list, the value is empty. - string next_page_token = 2; - - // Locations that the service couldn't reach. - repeated string unreachable_locations = 3; -} - -// Cancel metadata job request. -message CancelMetadataJobRequest { - // Required. The resource name of the job, in the format - // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/MetadataJob" - } - ]; -} - -// A metadata job resource. -message MetadataJob { - option (google.api.resource) = { - type: "dataplex.googleapis.com/MetadataJob" - pattern: "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" - }; - - // Results from a metadata import job. - message ImportJobResult { - // Output only. The total number of entries that were deleted. - int64 deleted_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of entries that were updated. - int64 updated_entries = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of entries that were created. - int64 created_entries = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of entries that were unchanged. - int64 unchanged_entries = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The total number of entries that were recreated. - int64 recreated_entries = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the status was updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Job specification for a metadata import job - message ImportJobSpec { - // Specifies how the entries and aspects in a metadata job are updated. - enum SyncMode { - // Sync mode unspecified. - SYNC_MODE_UNSPECIFIED = 0; - - // All resources in the job's scope are modified. If a resource exists in - // Dataplex but isn't included in the metadata import file, the resource - // is deleted when you run the metadata job. Use this mode to perform a - // full sync of the set of entries in the job scope. - FULL = 1; - - // Only the entries and aspects that are explicitly included in the - // metadata import file are modified. Use this mode to modify a subset of - // resources while leaving unreferenced resources unchanged. - INCREMENTAL = 2; - } - - // The level of logs to write to Cloud Logging for this job. - enum LogLevel { - // Log level unspecified. - LOG_LEVEL_UNSPECIFIED = 0; - - // Debug-level logging. Captures detailed logs for each import item. Use - // debug-level logging to troubleshoot issues with specific import items. - // For example, use debug-level logging to identify resources that are - // missing from the job scope, entries or aspects that don't conform to - // the associated entry type or aspect type, or other misconfigurations - // with the metadata import file. - // - // Depending on the size of your metadata job and the number of logs that - // are generated, debug-level logging might incur - // [additional costs](https://cloud.google.com/stackdriver/pricing). - DEBUG = 1; - - // Info-level logging. Captures logs at the overall job level. Includes - // aggregate logs about import items, but doesn't specify which import - // item has an error. - INFO = 2; - } - - // A boundary on the scope of impact that the metadata import job can have. - message ImportJobScope { - // Required. The entry group that is in scope for the import job, - // specified as a relative resource name in the format - // `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`. - // Only entries that belong to the specified entry group are affected by - // the job. - // - // Must contain exactly one element. The entry group and the job - // must be in the same location. - repeated string entry_groups = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryGroup" - } - ]; - - // Required. The entry types that are in scope for the import job, - // specified as relative resource names in the format - // `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`. - // The job modifies only the entries that belong to these entry types. - // - // If the metadata import file attempts to modify an entry whose type - // isn't included in this list, the import job is halted before modifying - // any entries or aspects. - // - // The location of an entry type must either match the location of the - // job, or the entry type must be global. - repeated string entry_types = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/EntryType" - } - ]; - - // Optional. The aspect types that are in scope for the import job, - // specified as relative resource names in the format - // `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - // The job modifies only the aspects that belong to these aspect types. - // - // If the metadata import file attempts to modify an aspect whose type - // isn't included in this list, the import job is halted before modifying - // any entries or aspects. - // - // The location of an aspect type must either match the location of the - // job, or the aspect type must be global. - repeated string aspect_types = 3 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/AspectType" - } - ]; - } - - // Optional. The URI of a Cloud Storage bucket or folder (beginning with - // `gs://` and ending with `/`) that contains the metadata import files for - // this job. - // - // A metadata import file defines the values to set for each of the entries - // and aspects in a metadata job. For more information about how to create a - // metadata import file and the file requirements, see [Metadata import - // file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). - // - // You can provide multiple metadata import files in the same metadata job. - // The bucket or folder must contain at least one metadata import file, in - // JSON Lines format (either `.json` or `.jsonl` file extension). - // - // In `FULL` entry sync mode, don't save the metadata import file in a - // folder named `SOURCE_STORAGE_URI/deletions/`. - // - // **Caution**: If the metadata import file contains no data, all entries - // and aspects that belong to the job's scope are deleted. - string source_storage_uri = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The time when the process that created the metadata import - // files began. - google.protobuf.Timestamp source_create_time = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. A boundary on the scope of impact that the metadata import job - // can have. - ImportJobScope scope = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The sync mode for entries. - // Only `FULL` mode is supported for entries. All entries in the job's scope - // are modified. If an entry exists in Dataplex but isn't included in the - // metadata import file, the entry is deleted when you run the metadata job. - SyncMode entry_sync_mode = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The sync mode for aspects. - // Only `INCREMENTAL` mode is supported for aspects. An aspect is modified - // only if the metadata import file includes a reference to the aspect in - // the `update_mask` field and the `aspect_keys` field. - SyncMode aspect_sync_mode = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The level of logs to write to Cloud Logging for this job. - // - // Debug-level logs provide highly-detailed information for - // troubleshooting, but their increased verbosity could incur [additional - // costs](https://cloud.google.com/stackdriver/pricing) that might not be - // merited for all jobs. - // - // If unspecified, defaults to `INFO`. - LogLevel log_level = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Metadata job type. - enum Type { - // Unspecified. - TYPE_UNSPECIFIED = 0; - - // Import job. - IMPORT = 1; - } - - // Metadata job status. - message Status { - // State of a metadata job. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // The job is queued. - QUEUED = 1; - - // The job is running. - RUNNING = 2; - - // The job is being canceled. - CANCELING = 3; - - // The job is canceled. - CANCELED = 4; - - // The job succeeded. - SUCCEEDED = 5; - - // The job failed. - FAILED = 6; - - // The job completed with some errors. - SUCCEEDED_WITH_ERRORS = 7; - } - - // Output only. State of the metadata job. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Message relating to the progression of a metadata job. - string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Progress tracking. - int32 completion_percent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the status was updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Identifier. The name of the resource that the configuration is - // applied to, in the format - // `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Output only. A system-generated, globally unique ID for the metadata job. - // If the metadata job is deleted and then re-created with the same name, this - // ID is different. - string uid = 2 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Output only. The time when the metadata job was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the metadata job was updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined labels. - map labels = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Metadata job type. - Type type = 6 [(google.api.field_behavior) = REQUIRED]; - - oneof spec { - // Import job specification. - ImportJobSpec import_spec = 100; - } - - oneof result { - // Output only. Import job result. - ImportJobResult import_result = 200 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Metadata job status. - Status status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// View for controlling which parts of an entry are to be returned. -enum EntryView { - // Unspecified EntryView. Defaults to FULL. - ENTRY_VIEW_UNSPECIFIED = 0; - - // Returns entry only, without aspects. - BASIC = 1; - - // Returns all required aspects as well as the keys of all non-required - // aspects. - FULL = 2; - - // Returns aspects matching custom fields in GetEntryRequest. If the number of - // aspects exceeds 100, the first 100 will be returned. - CUSTOM = 3; - - // Returns all aspects. If the number of aspects exceeds 100, the first - // 100 will be returned. - ALL = 4; -} - -// Denotes the transfer status of a resource. It is unspecified for resources -// created from Dataplex API. -enum TransferStatus { - // The default value. It is set for resources that were not subject for - // migration from Data Catalog service. - TRANSFER_STATUS_UNSPECIFIED = 0; - - // Indicates that a resource was migrated from Data Catalog service but it - // hasn't been transferred yet. In particular the resource cannot be updated - // from Dataplex API. - TRANSFER_STATUS_MIGRATED = 1; - - // Indicates that a resource was transferred from Data Catalog service. The - // resource can only be updated from Dataplex API. - TRANSFER_STATUS_TRANSFERRED = 2; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto deleted file mode 100644 index be39025ec20..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/content.proto +++ /dev/null @@ -1,269 +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.dataplex.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/dataplex/v1/analyze.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 go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "ContentProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// ContentService manages Notebook and SQL Scripts for Dataplex. -service ContentService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Create a content. - rpc CreateContent(CreateContentRequest) returns (Content) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" - body: "content" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/lakes/*}/content" - body: "content" - } - }; - option (google.api.method_signature) = "parent,content"; - } - - // Update a content. Only supports full resource update. - rpc UpdateContent(UpdateContentRequest) returns (Content) { - option (google.api.http) = { - patch: "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}" - body: "content" - additional_bindings { - patch: "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}" - body: "content" - } - }; - option (google.api.method_signature) = "content,update_mask"; - } - - // Delete a content. - rpc DeleteContent(DeleteContentRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Get a content resource. - rpc GetContent(GetContentRequest) returns (Content) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}" - additional_bindings { - get: "/v1/{name=projects/*/locations/*/lakes/*/content/**}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Gets the access control policy for a contentitem 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. - // - // Caller must have Google IAM `dataplex.content.getIamPolicy` permission - // on the resource. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - get: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy" - additional_bindings { - get: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Sets the access control policy on the specified contentitem resource. - // Replaces any existing policy. - // - // Caller must have Google IAM `dataplex.content.setIamPolicy` permission - // on the resource. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy" - body: "*" - } - }; - } - - // Returns the caller's permissions on a resource. - // If the resource does not exist, an empty set of - // permissions is returned (a `NOT_FOUND` error is not returned). - // - // A caller is not required to have Google IAM permission to make this - // request. - // - // Note: This operation is designed to be used for building permission-aware - // UIs and command-line tools, not for authorization checking. This operation - // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions" - body: "*" - } - }; - } - - // List content. - rpc ListContent(ListContentRequest) returns (ListContentResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/content" - } - }; - option (google.api.method_signature) = "parent"; - } -} - -// Create content request. -message CreateContentRequest { - // Required. The resource name of the parent lake: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Required. Content resource. - Content content = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update content request. -message UpdateContentRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Content content = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete content request. -message DeleteContentRequest { - // Required. The resource name of the content: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Content" - } - ]; -} - -// List content request. Returns the BASIC Content view. -message ListContentRequest { - // Required. The resource name of the parent lake: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. Maximum number of content to return. The service may return fewer - // than this value. If unspecified, at most 10 content will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListContent` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListContent` must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. Filters are case-sensitive. - // The following formats are supported: - // - // labels.key1 = "value1" - // labels:key1 - // type = "NOTEBOOK" - // type = "SQL_SCRIPT" - // - // These restrictions can be coinjoined with AND, OR and NOT conjunctions. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// List content response. -message ListContentResponse { - // Content under the given parent lake. - repeated Content content = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Get content request. -message GetContentRequest { - // Specifies whether the request should return the full or the partial - // representation. - enum ContentView { - // Content view not specified. Defaults to BASIC. - // The API will default to the BASIC view. - CONTENT_VIEW_UNSPECIFIED = 0; - - // Will not return the `data_text` field. - BASIC = 1; - - // Returns the complete proto. - FULL = 2; - } - - // Required. The resource name of the content: - // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Content" - } - ]; - - // Optional. Specify content view to make a partial request. - ContentView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto deleted file mode 100644 index 701a18262a9..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_profile.proto +++ /dev/null @@ -1,285 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/dataplex/v1/processing.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "DataProfileProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// DataProfileScan related setting. -message DataProfileSpec { - // The configuration of post scan actions of DataProfileScan job. - message PostScanActions { - // The configuration of BigQuery export post scan action. - message BigQueryExport { - // Optional. The BigQuery table to export DataProfileScan results to. - // Format: - // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - string results_table = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. If set, results will be exported to the provided BigQuery - // table. - BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // The specification for fields to include or exclude in data profile scan. - message SelectedFields { - // Optional. Expected input is a list of fully qualified names of fields as - // in the schema. - // - // Only top-level field names for nested fields are supported. - // For instance, if 'x' is of nested field type, listing 'x' is supported - // but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - // 'x'. - repeated string field_names = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The percentage of the records to be selected from the dataset for - // DataScan. - // - // * Value can range between 0.0 and 100.0 with up to 3 significant decimal - // digits. - // * Sampling is not applied if `sampling_percent` is not specified, 0 or - // 100. - float sampling_percent = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A filter applied to all rows in a single DataScan job. - // The filter needs to be a valid SQL expression for a WHERE clause in - // BigQuery standard SQL syntax. - // Example: col1 >= 0 AND col2 < 10 - string row_filter = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Actions to take upon job completion.. - PostScanActions post_scan_actions = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The fields to include in data profile. - // - // If not specified, all fields at the time of profile scan job execution are - // included, except for ones listed in `exclude_fields`. - SelectedFields include_fields = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The fields to exclude from data profile. - // - // If specified, the fields will be excluded from data profile, regardless of - // `include_fields` value. - SelectedFields exclude_fields = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// DataProfileResult defines the output of DataProfileScan. Each field of the -// table will have field type specific profile result. -message DataProfileResult { - // Contains name, type, mode and field type specific profile information. - message Profile { - // A field within a table. - message Field { - // The profile information for each field type. - message ProfileInfo { - // The profile information for a string type field. - message StringFieldInfo { - // Minimum length of non-null values in the scanned data. - int64 min_length = 1; - - // Maximum length of non-null values in the scanned data. - int64 max_length = 2; - - // Average length of non-null values in the scanned data. - double average_length = 3; - } - - // The profile information for an integer type field. - message IntegerFieldInfo { - // Average of non-null values in the scanned data. NaN, if the field - // has a NaN. - double average = 1; - - // Standard deviation of non-null values in the scanned data. NaN, if - // the field has a NaN. - double standard_deviation = 3; - - // Minimum of non-null values in the scanned data. NaN, if the field - // has a NaN. - int64 min = 4; - - // A quartile divides the number of data points into four parts, or - // quarters, of more-or-less equal size. Three main quartiles used - // are: The first quartile (Q1) splits off the lowest 25% of data from - // the highest 75%. It is also known as the lower or 25th empirical - // quartile, as 25% of the data is below this point. The second - // quartile (Q2) is the median of a data set. So, 50% of the data lies - // below this point. The third quartile (Q3) splits off the highest - // 25% of data from the lowest 75%. It is known as the upper or 75th - // empirical quartile, as 75% of the data lies below this point. - // Here, the quartiles is provided as an ordered list of approximate - // quartile values for the scanned data, occurring in order Q1, - // median, Q3. - repeated int64 quartiles = 6; - - // Maximum of non-null values in the scanned data. NaN, if the field - // has a NaN. - int64 max = 5; - } - - // The profile information for a double type field. - message DoubleFieldInfo { - // Average of non-null values in the scanned data. NaN, if the field - // has a NaN. - double average = 1; - - // Standard deviation of non-null values in the scanned data. NaN, if - // the field has a NaN. - double standard_deviation = 3; - - // Minimum of non-null values in the scanned data. NaN, if the field - // has a NaN. - double min = 4; - - // A quartile divides the number of data points into four parts, or - // quarters, of more-or-less equal size. Three main quartiles used - // are: The first quartile (Q1) splits off the lowest 25% of data from - // the highest 75%. It is also known as the lower or 25th empirical - // quartile, as 25% of the data is below this point. The second - // quartile (Q2) is the median of a data set. So, 50% of the data lies - // below this point. The third quartile (Q3) splits off the highest - // 25% of data from the lowest 75%. It is known as the upper or 75th - // empirical quartile, as 75% of the data lies below this point. - // Here, the quartiles is provided as an ordered list of quartile - // values for the scanned data, occurring in order Q1, median, Q3. - repeated double quartiles = 6; - - // Maximum of non-null values in the scanned data. NaN, if the field - // has a NaN. - double max = 5; - } - - // Top N non-null values in the scanned data. - message TopNValue { - // String value of a top N non-null value. - string value = 1; - - // Count of the corresponding value in the scanned data. - int64 count = 2; - - // Ratio of the corresponding value in the field against the total - // number of rows in the scanned data. - double ratio = 3; - } - - // Ratio of rows with null value against total scanned rows. - double null_ratio = 2; - - // Ratio of rows with distinct values against total scanned rows. - // Not available for complex non-groupable field type, including RECORD, - // ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. - double distinct_ratio = 3; - - // The list of top N non-null values, frequency and ratio with which - // they occur in the scanned data. N is 10 or equal to the number of - // distinct values in the field, whichever is smaller. Not available for - // complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, - // and JSON, as well as fields with REPEATABLE mode. - repeated TopNValue top_n_values = 4; - - // Structural and profile information for specific field type. Not - // available, if mode is REPEATABLE. - oneof field_info { - // String type field information. - StringFieldInfo string_profile = 101; - - // Integer type field information. - IntegerFieldInfo integer_profile = 102; - - // Double type field information. - DoubleFieldInfo double_profile = 103; - } - } - - // The name of the field. - string name = 1; - - // The data type retrieved from the schema of the data source. For - // instance, for a BigQuery native table, it is the [BigQuery Table - // Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - // For a Dataplex Entity, it is the [Entity - // Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - string type = 2; - - // The mode of the field. Possible values include: - // - // * REQUIRED, if it is a required field. - // * NULLABLE, if it is an optional field. - // * REPEATED, if it is a repeated field. - string mode = 3; - - // Profile information for the corresponding field. - ProfileInfo profile = 4; - } - - // List of fields with structural and profile information for each field. - repeated Field fields = 2; - } - - // The result of post scan actions of DataProfileScan job. - message PostScanActionsResult { - // The result of BigQuery export post scan action. - message BigQueryExportResult { - // Execution state for the exporting. - enum State { - // The exporting state is unspecified. - STATE_UNSPECIFIED = 0; - - // The exporting completed successfully. - SUCCEEDED = 1; - - // The exporting is no longer running due to an error. - FAILED = 2; - - // The exporting is skipped due to no valid scan result to export - // (usually caused by scan failed). - SKIPPED = 3; - } - - // Output only. Execution state for the BigQuery exporting. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the BigQuery exporting. - string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The result of BigQuery export post scan action. - BigQueryExportResult bigquery_export_result = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The count of rows scanned. - int64 row_count = 3; - - // The profile information per field. - Profile profile = 4; - - // The data scanned for this result. - ScannedData scanned_data = 5; - - // Output only. The result of post scan actions. - PostScanActionsResult post_scan_actions_result = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto deleted file mode 100644 index aadc9b2747b..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_quality.proto +++ /dev/null @@ -1,488 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataplex/v1/processing.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "DataQualityProto"; -option java_package = "com.google.cloud.dataplex.v1"; -option (google.api.resource_definition) = { - type: "bigquery.googleapis.com/Table" - pattern: "projects/{project}/datasets/{dataset}/tables/{table}" -}; - -// DataQualityScan related setting. -message DataQualitySpec { - // The configuration of post scan actions of DataQualityScan. - message PostScanActions { - // The configuration of BigQuery export post scan action. - message BigQueryExport { - // Optional. The BigQuery table to export DataQualityScan results to. - // Format: - // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - string results_table = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // The individuals or groups who are designated to receive notifications - // upon triggers. - message Recipients { - // Optional. The email recipients who will receive the DataQualityScan - // results report. - repeated string emails = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // This trigger is triggered when the DQ score in the job result is less - // than a specified input score. - message ScoreThresholdTrigger { - // Optional. The score range is in [0,100]. - float score_threshold = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // This trigger is triggered when the scan job itself fails, regardless of - // the result. - message JobFailureTrigger {} - - // This trigger is triggered whenever a scan job run ends, regardless - // of the result. - message JobEndTrigger {} - - // The configuration of notification report post scan action. - message NotificationReport { - // Required. The recipients who will receive the notification report. - Recipients recipients = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. If set, report will be sent when score threshold is met. - ScoreThresholdTrigger score_threshold_trigger = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, report will be sent when a scan job fails. - JobFailureTrigger job_failure_trigger = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, report will be sent when a scan job ends. - JobEndTrigger job_end_trigger = 5 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. If set, results will be exported to the provided BigQuery - // table. - BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, results will be sent to the provided notification - // receipts upon triggers. - NotificationReport notification_report = 2 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. The list of rules to evaluate against a data source. At least one - // rule is required. - repeated DataQualityRule rules = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The percentage of the records to be selected from the dataset for - // DataScan. - // - // * Value can range between 0.0 and 100.0 with up to 3 significant decimal - // digits. - // * Sampling is not applied if `sampling_percent` is not specified, 0 or - // 100. - float sampling_percent = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A filter applied to all rows in a single DataScan job. - // The filter needs to be a valid SQL expression for a WHERE clause in - // BigQuery standard SQL syntax. - // Example: col1 >= 0 AND col2 < 10 - string row_filter = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Actions to take upon job completion. - PostScanActions post_scan_actions = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The output of a DataQualityScan. -message DataQualityResult { - // The result of post scan actions of DataQualityScan job. - message PostScanActionsResult { - // The result of BigQuery export post scan action. - message BigQueryExportResult { - // Execution state for the exporting. - enum State { - // The exporting state is unspecified. - STATE_UNSPECIFIED = 0; - - // The exporting completed successfully. - SUCCEEDED = 1; - - // The exporting is no longer running due to an error. - FAILED = 2; - - // The exporting is skipped due to no valid scan result to export - // (usually caused by scan failed). - SKIPPED = 3; - } - - // Output only. Execution state for the BigQuery exporting. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the BigQuery exporting. - string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The result of BigQuery export post scan action. - BigQueryExportResult bigquery_export_result = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Overall data quality result -- `true` if all rules passed. - bool passed = 5; - - // Output only. The overall data quality score. - // - // The score ranges between [0, 100] (up to two decimal points). - optional float score = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A list of results at the dimension level. - // - // A dimension will have a corresponding `DataQualityDimensionResult` if and - // only if there is at least one rule with the 'dimension' field set to it. - repeated DataQualityDimensionResult dimensions = 2; - - // Output only. A list of results at the column level. - // - // A column will have a corresponding `DataQualityColumnResult` if and only if - // there is at least one rule with the 'column' field set to it. - repeated DataQualityColumnResult columns = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A list of all the rules in a job, and their results. - repeated DataQualityRuleResult rules = 3; - - // The count of rows processed. - int64 row_count = 4; - - // The data scanned for this result. - ScannedData scanned_data = 7; - - // Output only. The result of post scan actions. - PostScanActionsResult post_scan_actions_result = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// DataQualityRuleResult provides a more detailed, per-rule view of the results. -message DataQualityRuleResult { - // The rule specified in the DataQualitySpec, as is. - DataQualityRule rule = 1; - - // Whether the rule passed or failed. - bool passed = 7; - - // The number of rows a rule was evaluated against. - // - // This field is only valid for row-level type rules. - // - // Evaluated count can be configured to either - // - // * include all rows (default) - with `null` rows automatically failing rule - // evaluation, or - // * exclude `null` rows from the `evaluated_count`, by setting - // `ignore_nulls = true`. - int64 evaluated_count = 9; - - // The number of rows which passed a rule evaluation. - // - // This field is only valid for row-level type rules. - int64 passed_count = 8; - - // The number of rows with null values in the specified column. - int64 null_count = 5; - - // The ratio of **passed_count / evaluated_count**. - // - // This field is only valid for row-level type rules. - double pass_ratio = 6; - - // The query to find rows that did not pass this rule. - // - // This field is only valid for row-level type rules. - string failing_rows_query = 10; - - // Output only. The number of rows returned by the SQL statement in a SQL - // assertion rule. - // - // This field is only valid for SQL assertion rules. - int64 assertion_row_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// DataQualityDimensionResult provides a more detailed, per-dimension view of -// the results. -message DataQualityDimensionResult { - // Output only. The dimension config specified in the DataQualitySpec, as is. - DataQualityDimension dimension = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether the dimension passed or failed. - bool passed = 3; - - // Output only. The dimension-level data quality score for this data scan job - // if and only if the 'dimension' field is set. - // - // The score ranges between [0, 100] (up to two decimal - // points). - optional float score = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A dimension captures data quality intent about a defined subset of the rules -// specified. -message DataQualityDimension { - // The dimension name a rule belongs to. Supported dimensions are - // ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - // "FRESHNESS", "VOLUME"] - string name = 1; -} - -// A rule captures data quality intent about a data source. -message DataQualityRule { - // Evaluates whether each column value lies between a specified range. - message RangeExpectation { - // Optional. The minimum column value allowed for a row to pass this - // validation. At least one of `min_value` and `max_value` need to be - // provided. - string min_value = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum column value allowed for a row to pass this - // validation. At least one of `min_value` and `max_value` need to be - // provided. - string max_value = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether each value needs to be strictly greater than ('>') the - // minimum, or if equality is allowed. - // - // Only relevant if a `min_value` has been defined. Default = false. - bool strict_min_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether each value needs to be strictly lesser than ('<') the - // maximum, or if equality is allowed. - // - // Only relevant if a `max_value` has been defined. Default = false. - bool strict_max_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Evaluates whether each column value is null. - message NonNullExpectation {} - - // Evaluates whether each column value is contained by a specified set. - message SetExpectation { - // Optional. Expected values for the column value. - repeated string values = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Evaluates whether each column value matches a specified regex. - message RegexExpectation { - // Optional. A regular expression the column value is expected to match. - string regex = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Evaluates whether the column has duplicates. - message UniquenessExpectation {} - - // Evaluates whether the column aggregate statistic lies between a specified - // range. - message StatisticRangeExpectation { - // The list of aggregate metrics a rule can be evaluated against. - enum ColumnStatistic { - // Unspecified statistic type - STATISTIC_UNDEFINED = 0; - - // Evaluate the column mean - MEAN = 1; - - // Evaluate the column min - MIN = 2; - - // Evaluate the column max - MAX = 3; - } - - // Optional. The aggregate metric to evaluate. - ColumnStatistic statistic = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The minimum column statistic value allowed for a row to pass - // this validation. - // - // At least one of `min_value` and `max_value` need to be provided. - string min_value = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum column statistic value allowed for a row to pass - // this validation. - // - // At least one of `min_value` and `max_value` need to be provided. - string max_value = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether column statistic needs to be strictly greater than - // ('>') the minimum, or if equality is allowed. - // - // Only relevant if a `min_value` has been defined. Default = false. - bool strict_min_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether column statistic needs to be strictly lesser than ('<') - // the maximum, or if equality is allowed. - // - // Only relevant if a `max_value` has been defined. Default = false. - bool strict_max_enabled = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Evaluates whether each row passes the specified condition. - // - // The SQL expression needs to use BigQuery standard SQL syntax and should - // produce a boolean value per row as the result. - // - // Example: col1 >= 0 AND col2 < 10 - message RowConditionExpectation { - // Optional. The SQL expression. - string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Evaluates whether the provided expression is true. - // - // The SQL expression needs to use BigQuery standard SQL syntax and should - // produce a scalar boolean result. - // - // Example: MIN(col1) >= 0 - message TableConditionExpectation { - // Optional. The SQL expression. - string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // A SQL statement that is evaluated to return rows that match an invalid - // state. If any rows are are returned, this rule fails. - // - // The SQL statement must use BigQuery standard SQL syntax, and must not - // contain any semicolons. - // - // You can use the data reference parameter `${data()}` to reference the - // source table with all of its precondition filters applied. Examples of - // precondition filters include row filters, incremental data filters, and - // sampling. For more information, see [Data reference - // parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter). - // - // Example: `SELECT * FROM ${data()} WHERE price < 0` - message SqlAssertion { - // Optional. The SQL statement. - string sql_statement = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // The rule-specific configuration. - oneof rule_type { - // Row-level rule which evaluates whether each column value lies between a - // specified range. - RangeExpectation range_expectation = 1; - - // Row-level rule which evaluates whether each column value is null. - NonNullExpectation non_null_expectation = 2; - - // Row-level rule which evaluates whether each column value is contained by - // a specified set. - SetExpectation set_expectation = 3; - - // Row-level rule which evaluates whether each column value matches a - // specified regex. - RegexExpectation regex_expectation = 4; - - // Row-level rule which evaluates whether each column value is unique. - UniquenessExpectation uniqueness_expectation = 100; - - // Aggregate rule which evaluates whether the column aggregate - // statistic lies between a specified range. - StatisticRangeExpectation statistic_range_expectation = 101; - - // Row-level rule which evaluates whether each row in a table passes the - // specified condition. - RowConditionExpectation row_condition_expectation = 200; - - // Aggregate rule which evaluates whether the provided expression is true - // for a table. - TableConditionExpectation table_condition_expectation = 201; - - // Aggregate rule which evaluates the number of rows returned for the - // provided statement. If any rows are returned, this rule fails. - SqlAssertion sql_assertion = 202; - } - - // Optional. The unnested column which this rule is evaluated against. - string column = 500 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Rows with `null` values will automatically fail a rule, unless - // `ignore_null` is `true`. In that case, such `null` rows are trivially - // considered passing. - // - // This field is only valid for the following type of rules: - // - // * RangeExpectation - // * RegexExpectation - // * SetExpectation - // * UniquenessExpectation - bool ignore_null = 501 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The dimension a rule belongs to. Results are also aggregated at - // the dimension level. Supported dimensions are **["COMPLETENESS", - // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", - // "VOLUME"]** - string dimension = 502 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The minimum ratio of **passing_rows / total_rows** required to - // pass this rule, with a range of [0.0, 1.0]. - // - // 0 indicates default value (i.e. 1.0). - // - // This field is only valid for row-level type rules. - double threshold = 503 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mutable name for the rule. - // - // * The name must contain only letters (a-z, A-Z), numbers (0-9), or - // hyphens (-). - // * The maximum length is 63 characters. - // * Must start with a letter. - // * Must end with a number or a letter. - string name = 504 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the rule. - // - // * The maximum length is 1,024 characters. - string description = 505 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether the Rule is active or suspended. - // Default is false. - bool suspended = 506 [(google.api.field_behavior) = OPTIONAL]; -} - -// DataQualityColumnResult provides a more detailed, per-column view of -// the results. -message DataQualityColumnResult { - // Output only. The column specified in the DataQualityRule. - string column = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The column-level data quality score for this data scan job if - // and only if the 'column' field is set. - // - // The score ranges between between [0, 100] (up to two decimal - // points). - optional float score = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto deleted file mode 100644 index fdd21e8d32c..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_taxonomy.proto +++ /dev/null @@ -1,793 +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.dataplex.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/dataplex/v1/security.proto"; -import "google/cloud/dataplex/v1/service.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "DataTaxonomyProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// DataTaxonomyService enables attribute-based governance. The resources -// currently offered include DataTaxonomy and DataAttribute. -service DataTaxonomyService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Create a DataTaxonomy resource. - rpc CreateDataTaxonomy(CreateDataTaxonomyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" - body: "data_taxonomy" - }; - option (google.api.method_signature) = - "parent,data_taxonomy,data_taxonomy_id"; - option (google.longrunning.operation_info) = { - response_type: "DataTaxonomy" - metadata_type: "OperationMetadata" - }; - } - - // Updates a DataTaxonomy resource. - rpc UpdateDataTaxonomy(UpdateDataTaxonomyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}" - body: "data_taxonomy" - }; - option (google.api.method_signature) = "data_taxonomy,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataTaxonomy" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - // must be deleted before the DataTaxonomy can be deleted. - rpc DeleteDataTaxonomy(DeleteDataTaxonomyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists DataTaxonomy resources in a project and location. - rpc ListDataTaxonomies(ListDataTaxonomiesRequest) - returns (ListDataTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a DataTaxonomy resource. - rpc GetDataTaxonomy(GetDataTaxonomyRequest) returns (DataTaxonomy) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Create a DataAttributeBinding resource. - rpc CreateDataAttributeBinding(CreateDataAttributeBindingRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" - body: "data_attribute_binding" - }; - option (google.api.method_signature) = - "parent,data_attribute_binding,data_attribute_binding_id"; - option (google.longrunning.operation_info) = { - response_type: "DataAttributeBinding" - metadata_type: "OperationMetadata" - }; - } - - // Updates a DataAttributeBinding resource. - rpc UpdateDataAttributeBinding(UpdateDataAttributeBindingRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}" - body: "data_attribute_binding" - }; - option (google.api.method_signature) = "data_attribute_binding,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataAttributeBinding" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a DataAttributeBinding resource. All attributes within the - // DataAttributeBinding must be deleted before the DataAttributeBinding can be - // deleted. - rpc DeleteDataAttributeBinding(DeleteDataAttributeBindingRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists DataAttributeBinding resources in a project and location. - rpc ListDataAttributeBindings(ListDataAttributeBindingsRequest) - returns (ListDataAttributeBindingsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a DataAttributeBinding resource. - rpc GetDataAttributeBinding(GetDataAttributeBindingRequest) - returns (DataAttributeBinding) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Create a DataAttribute resource. - rpc CreateDataAttribute(CreateDataAttributeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" - body: "data_attribute" - }; - option (google.api.method_signature) = - "parent,data_attribute,data_attribute_id"; - option (google.longrunning.operation_info) = { - response_type: "DataAttribute" - metadata_type: "OperationMetadata" - }; - } - - // Updates a DataAttribute resource. - rpc UpdateDataAttribute(UpdateDataAttributeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" - body: "data_attribute" - }; - option (google.api.method_signature) = "data_attribute,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataAttribute" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a Data Attribute resource. - rpc DeleteDataAttribute(DeleteDataAttributeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists Data Attribute resources in a DataTaxonomy. - rpc ListDataAttributes(ListDataAttributesRequest) - returns (ListDataAttributesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a Data Attribute resource. - rpc GetDataAttribute(GetDataAttributeRequest) returns (DataAttribute) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// DataTaxonomy represents a set of hierarchical DataAttributes resources, -// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes -// to manage PII data. It is defined at project level. -message DataTaxonomy { - option (google.api.resource) = { - type: "dataplex.googleapis.com/DataTaxonomy" - pattern: "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}" - }; - - // Output only. The relative resource name of the DataTaxonomy, of the form: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataTaxonomy" - } - ]; - - // Output only. System generated globally unique ID for the dataTaxonomy. This - // ID will be different if the DataTaxonomy is deleted and re-created with the - // same name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataTaxonomy was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataTaxonomy was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the DataTaxonomy. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the DataTaxonomy. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The number of attributes in the DataTaxonomy. - int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 10; - - // Output only. The number of classes in the DataTaxonomy. - int32 class_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Denotes one dataAttribute in a dataTaxonomy, for example, PII. -// DataAttribute resources can be defined in a hierarchy. -// A single dataAttribute resource can contain specs of multiple types -// -// ``` -// PII -// - ResourceAccessSpec : -// - readers :foo@bar.com -// - DataAccessSpec : -// - readers :bar@foo.com -// ``` -message DataAttribute { - option (google.api.resource) = { - type: "dataplex.googleapis.com/DataAttribute" - pattern: "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}" - }; - - // Output only. The relative resource name of the dataAttribute, of the form: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; - - // Output only. System generated globally unique ID for the DataAttribute. - // This ID will be different if the DataAttribute is deleted and re-created - // with the same name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataAttribute was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataAttribute was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the DataAttribute. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the DataAttribute. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The ID of the parent DataAttribute resource, should belong to the - // same data taxonomy. Circular dependency in parent chain is not valid. - // Maximum depth of the hierarchy allowed is 4. - // [a -> b -> c -> d -> e, depth = 4] - string parent_id = 8 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; - - // Output only. The number of child attributes present for this attribute. - int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 10; - - // Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - // BigQuery dataset, BigQuery table). - ResourceAccessSpec resource_access_spec = 100 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specified when applied to data stored on the resource (eg: rows, - // columns in BigQuery Tables). - DataAccessSpec data_access_spec = 101 - [(google.api.field_behavior) = OPTIONAL]; -} - -// DataAttributeBinding represents binding of attributes to resources. Eg: Bind -// 'CustomerInfo' entity with 'PII' attribute. -message DataAttributeBinding { - option (google.api.resource) = { - type: "dataplex.googleapis.com/DataAttributeBinding" - pattern: "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}" - }; - - // Represents a subresource of the given resource, and associated bindings - // with it. Currently supported subresources are column and partition schema - // fields within a table. - message Path { - // Required. The name identifier of the path. - // Nested columns should be of the form: 'address.city'. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. List of attributes to be associated with the path of the - // resource, provided in the form: - // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - repeated string attributes = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; - } - - // Output only. The relative resource name of the Data Attribute Binding, of - // the form: - // projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttributeBinding" - } - ]; - - // Output only. System generated globally unique ID for the - // DataAttributeBinding. This ID will be different if the DataAttributeBinding - // is deleted and re-created with the same name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataAttributeBinding was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataAttributeBinding was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the DataAttributeBinding. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the DataAttributeBinding. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - // Etags must be used when calling the DeleteDataAttributeBinding and the - // UpdateDataAttributeBinding method. - string etag = 8; - - // The reference to the resource that is associated to attributes, or - // the query to match resources and associate attributes. - oneof resource_reference { - // Optional. Immutable. The resource name of the resource that is associated - // to attributes. Presently, only entity resource is supported in the form: - // projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - // Must belong in the same project and region as the attribute binding, and - // there can only exist one active binding for a resource. - string resource = 100 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = IMMUTABLE - ]; - } - - // Optional. List of attributes to be associated with the resource, provided - // in the form: - // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - repeated string attributes = 110 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; - - // Optional. The list of paths for items within the associated resource (eg. - // columns and partitions within a table) along with attribute bindings. - repeated Path paths = 120 [(google.api.field_behavior) = OPTIONAL]; -} - -// Create DataTaxonomy request. -message CreateDataTaxonomyRequest { - // Required. The resource name of the data taxonomy location, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. DataTaxonomy identifier. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must be between 1-63 characters. - // * Must end with a number or a letter. - // * Must be unique within the Project. - string data_taxonomy_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. DataTaxonomy resource. - DataTaxonomy data_taxonomy = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update DataTaxonomy request. -message UpdateDataTaxonomyRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in `update_mask` are updated. - DataTaxonomy data_taxonomy = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get DataTaxonomy request. -message GetDataTaxonomyRequest { - // Required. The resource name of the DataTaxonomy: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataTaxonomy" - } - ]; -} - -// List DataTaxonomies request. -message ListDataTaxonomiesRequest { - // Required. The resource name of the DataTaxonomy location, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of DataTaxonomies to return. The service may - // return fewer than this value. If unspecified, at most 10 DataTaxonomies - // will be returned. The maximum value is 1000; values above 1000 will be - // coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous ` ListDataTaxonomies` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to ` ListDataTaxonomies` must match the call that - // provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List DataTaxonomies response. -message ListDataTaxonomiesResponse { - // DataTaxonomies under the given parent location. - repeated DataTaxonomy data_taxonomies = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable_locations = 3; -} - -// Delete DataTaxonomy request. -message DeleteDataTaxonomyRequest { - // Required. The resource name of the DataTaxonomy: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataTaxonomy" - } - ]; - - // Optional. If the client provided etag value does not match the current etag - // value,the DeleteDataTaxonomy method returns an ABORTED error. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Create DataAttribute request. -message CreateDataAttributeRequest { - // Required. The resource name of the parent data taxonomy - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataTaxonomy" - } - ]; - - // Required. DataAttribute identifier. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must be between 1-63 characters. - // * Must end with a number or a letter. - // * Must be unique within the DataTaxonomy. - string data_attribute_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. DataAttribute resource. - DataAttribute data_attribute = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update DataAttribute request. -message UpdateDataAttributeRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in `update_mask` are updated. - DataAttribute data_attribute = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get DataAttribute request. -message GetDataAttributeRequest { - // Required. The resource name of the dataAttribute: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; -} - -// List DataAttributes request. -message ListDataAttributesRequest { - // Required. The resource name of the DataTaxonomy: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataTaxonomy" - } - ]; - - // Optional. Maximum number of DataAttributes to return. The service may - // return fewer than this value. If unspecified, at most 10 dataAttributes - // will be returned. The maximum value is 1000; values above 1000 will be - // coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListDataAttributes` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListDataAttributes` must match the call that - // provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List DataAttributes response. -message ListDataAttributesResponse { - // DataAttributes under the given parent DataTaxonomy. - repeated DataAttribute data_attributes = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable_locations = 3; -} - -// Delete DataAttribute request. -message DeleteDataAttributeRequest { - // Required. The resource name of the DataAttribute: - // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttribute" - } - ]; - - // Optional. If the client provided etag value does not match the current etag - // value, the DeleteDataAttribute method returns an ABORTED error response. - string etag = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Create DataAttributeBinding request. -message CreateDataAttributeBindingRequest { - // Required. The resource name of the parent data taxonomy - // projects/{project_number}/locations/{location_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. DataAttributeBinding identifier. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must be between 1-63 characters. - // * Must end with a number or a letter. - // * Must be unique within the Location. - string data_attribute_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. DataAttributeBinding resource. - DataAttributeBinding data_attribute_binding = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update DataAttributeBinding request. -message UpdateDataAttributeBindingRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in `update_mask` are updated. - DataAttributeBinding data_attribute_binding = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get DataAttributeBinding request. -message GetDataAttributeBindingRequest { - // Required. The resource name of the DataAttributeBinding: - // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttributeBinding" - } - ]; -} - -// List DataAttributeBindings request. -message ListDataAttributeBindingsRequest { - // Required. The resource name of the Location: - // projects/{project_number}/locations/{location_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of DataAttributeBindings to return. The service - // may return fewer than this value. If unspecified, at most 10 - // DataAttributeBindings will be returned. The maximum value is 1000; values - // above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListDataAttributeBindings` - // call. Provide this to retrieve the subsequent page. When paginating, all - // other parameters provided to `ListDataAttributeBindings` must match the - // call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - // Filter using resource: filter=resource:"resource-name" - // Filter using attribute: filter=attributes:"attribute-name" - // Filter using attribute in paths list: - // filter=paths.attributes:"attribute-name" - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List DataAttributeBindings response. -message ListDataAttributeBindingsResponse { - // DataAttributeBindings under the given parent Location. - repeated DataAttributeBinding data_attribute_bindings = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable_locations = 3; -} - -// Delete DataAttributeBinding request. -message DeleteDataAttributeBindingRequest { - // Required. The resource name of the DataAttributeBinding: - // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataAttributeBinding" - } - ]; - - // Required. If the client provided etag value does not match the current etag - // value, the DeleteDataAttributeBindingRequest method returns an ABORTED - // error response. Etags must be used when calling the - // DeleteDataAttributeBinding. - string etag = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto deleted file mode 100644 index 54a6aca13bc..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/datascans.proto +++ /dev/null @@ -1,642 +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.dataplex.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/dataplex/v1/data_discovery.proto"; -import "google/cloud/dataplex/v1/data_profile.proto"; -import "google/cloud/dataplex/v1/data_quality.proto"; -import "google/cloud/dataplex/v1/processing.proto"; -import "google/cloud/dataplex/v1/resources.proto"; -import "google/cloud/dataplex/v1/service.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "DataScansProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// DataScanService manages DataScan resources which can be configured to run -// various types of data scanning workload and generate enriched metadata (e.g. -// Data Profile, Data Quality) for the data source. -service DataScanService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a DataScan resource. - rpc CreateDataScan(CreateDataScanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/dataScans" - body: "data_scan" - }; - option (google.api.method_signature) = "parent,data_scan,data_scan_id"; - option (google.longrunning.operation_info) = { - response_type: "DataScan" - metadata_type: "OperationMetadata" - }; - } - - // Updates a DataScan resource. - rpc UpdateDataScan(UpdateDataScanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}" - body: "data_scan" - }; - option (google.api.method_signature) = "data_scan,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataScan" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a DataScan resource. - rpc DeleteDataScan(DeleteDataScanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/dataScans/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Gets a DataScan resource. - rpc GetDataScan(GetDataScanRequest) returns (DataScan) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataScans/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists DataScans. - rpc ListDataScans(ListDataScansRequest) returns (ListDataScansResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/dataScans" - }; - option (google.api.method_signature) = "parent"; - } - - // Runs an on-demand execution of a DataScan - rpc RunDataScan(RunDataScanRequest) returns (RunDataScanResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/dataScans/*}:run" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets a DataScanJob resource. - rpc GetDataScanJob(GetDataScanJobRequest) returns (DataScanJob) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists DataScanJobs under the given DataScan. - rpc ListDataScanJobs(ListDataScanJobsRequest) - returns (ListDataScanJobsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" - }; - option (google.api.method_signature) = "parent"; - } - - // Generates recommended data quality rules based on the results of a data - // profiling scan. - // - // Use the recommendations to build rules for a data quality scan. - rpc GenerateDataQualityRules(GenerateDataQualityRulesRequest) - returns (GenerateDataQualityRulesResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules" - body: "*" - additional_bindings { - post: "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules" - body: "*" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Create dataScan request. -message CreateDataScanRequest { - // Required. The resource name of the parent location: - // `projects/{project}/locations/{location_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. DataScan resource. - DataScan data_scan = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. DataScan identifier. - // - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must end with a number or a letter. - // * Must be between 1-63 characters. - // * Must be unique within the customer project / location. - string data_scan_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is `false`. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update dataScan request. -message UpdateDataScanRequest { - // Required. DataScan resource to be updated. - // - // Only fields specified in `update_mask` are updated. - DataScan data_scan = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is `false`. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete dataScan request. -message DeleteDataScanRequest { - // Required. The resource name of the dataScan: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataScan" - } - ]; -} - -// Get dataScan request. -message GetDataScanRequest { - // DataScan view options. - enum DataScanView { - // The API will default to the `BASIC` view. - DATA_SCAN_VIEW_UNSPECIFIED = 0; - - // Basic view that does not include *spec* and *result*. - BASIC = 1; - - // Include everything. - FULL = 10; - } - - // Required. The resource name of the dataScan: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataScan" - } - ]; - - // Optional. Select the DataScan view to return. Defaults to `BASIC`. - DataScanView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List dataScans request. -message ListDataScansRequest { - // Required. The resource name of the parent location: - // `projects/{project}/locations/{location_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of dataScans to return. The service may return - // fewer than this value. If unspecified, at most 500 scans will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListDataScans` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListDataScans` must match the call that provided the - // page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields (`name` or `create_time`) for the result. - // If not specified, the ordering is undefined. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List dataScans response. -message ListDataScansResponse { - // DataScans (`BASIC` view only) under the given parent location. - repeated DataScan data_scans = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Run DataScan Request -message RunDataScanRequest { - // Required. The resource name of the DataScan: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - // - // Only **OnDemand** data scans are allowed. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataScan" - } - ]; -} - -// Run DataScan Response. -message RunDataScanResponse { - // DataScanJob created by RunDataScan request. - DataScanJob job = 1; -} - -// Get DataScanJob request. -message GetDataScanJobRequest { - // DataScanJob view options. - enum DataScanJobView { - // The API will default to the `BASIC` view. - DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; - - // Basic view that does not include *spec* and *result*. - BASIC = 1; - - // Include everything. - FULL = 10; - } - - // Required. The resource name of the DataScanJob: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataScanJob" - } - ]; - - // Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - DataScanJobView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List DataScanJobs request. -message ListDataScanJobsRequest { - // Required. The resource name of the parent environment: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/DataScan" - } - ]; - - // Optional. Maximum number of DataScanJobs to return. The service may return - // fewer than this value. If unspecified, at most 10 DataScanJobs will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListDataScanJobs` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListDataScanJobs` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An expression for filtering the results of the ListDataScanJobs - // request. - // - // If unspecified, all datascan jobs will be returned. Multiple filters can be - // applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - // - // Allowed fields are: - // - // - `start_time` - // - `end_time` - // - // `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - // 2018-10-08T18:30:00-07:00). - // - // For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - // 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - // specified start and end times. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// List DataScanJobs response. -message ListDataScanJobsResponse { - // DataScanJobs (`BASIC` view only) under a given dataScan. - repeated DataScanJob data_scan_jobs = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request details for generating data quality rule recommendations. -message GenerateDataQualityRulesRequest { - // Required. The name must be one of the following: - // - // * The name of a data scan with at least one successful, completed data - // profiling job - // * The name of a successful, completed data profiling job (a data scan job - // where the job type is data profiling) - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response details for data quality rule recommendations. -message GenerateDataQualityRulesResponse { - // The data quality rules that Dataplex generates based on the results - // of a data profiling scan. - repeated DataQualityRule rule = 1; -} - -// Represents a user-visible job which provides the insights for the related -// data source. -// -// For example: -// -// * Data Quality: generates queries based on the rules and runs against the -// data to get data quality check results. -// * Data Profile: analyzes the data in table(s) and generates insights about -// the structure, content and relationships (such as null percent, -// cardinality, min/max/mean, etc). -message DataScan { - option (google.api.resource) = { - type: "dataplex.googleapis.com/DataScan" - pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}" - }; - - // DataScan execution settings. - message ExecutionSpec { - // Optional. Spec related to how often and when a scan should be triggered. - // - // If not specified, the default is `OnDemand`, which means the scan will - // not run until the user calls `RunDataScan` API. - Trigger trigger = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Spec related to incremental scan of the data - // - // When an option is selected for incremental scan, it cannot be unset or - // changed. If not specified, a data scan will run for all data in the - // table. - oneof incremental { - // Immutable. The unnested field (of type *Date* or *Timestamp*) that - // contains values which monotonically increase over time. - // - // If not specified, a data scan will run for all data in the table. - string field = 100 [(google.api.field_behavior) = IMMUTABLE]; - } - } - - // Status of the data scan execution. - message ExecutionStatus { - // The time when the latest DataScanJob started. - google.protobuf.Timestamp latest_job_start_time = 4; - - // The time when the latest DataScanJob ended. - google.protobuf.Timestamp latest_job_end_time = 5; - - // Optional. The time when the DataScanJob execution was created. - google.protobuf.Timestamp latest_job_create_time = 6 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Output only. The relative resource name of the scan, of the form: - // `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. System generated globally unique ID for the scan. This ID will - // be different if the scan is deleted and re-created with the same name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the scan. - // - // * Must be between 1-1024 characters. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - // - // * Must be between 1-256 characters. - string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User-defined labels for the scan. - map labels = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the DataScan. - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the scan was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the scan was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The data source for DataScan. - DataSource data = 9 [(google.api.field_behavior) = REQUIRED]; - - // Optional. DataScan execution settings. - // - // If not specified, the fields in it will use their default values. - ExecutionSpec execution_spec = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Status of the data scan execution. - ExecutionStatus execution_status = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of DataScan. - DataScanType type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Data scan related setting. - // The settings are required and immutable. After you configure the settings - // for one type of data scan, you can't change the data scan to a different - // type of data scan. - oneof spec { - // Settings for a data quality scan. - DataQualitySpec data_quality_spec = 100; - - // Settings for a data profile scan. - DataProfileSpec data_profile_spec = 101; - - // Settings for a data discovery scan. - DataDiscoverySpec data_discovery_spec = 102; - } - - // The result of the data scan. - oneof result { - // Output only. The result of a data quality scan. - DataQualityResult data_quality_result = 200 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The result of a data profile scan. - DataProfileResult data_profile_result = 201 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The result of a data discovery scan. - DataDiscoveryResult data_discovery_result = 202 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// A DataScanJob represents an instance of DataScan execution. -message DataScanJob { - option (google.api.resource) = { - type: "dataplex.googleapis.com/DataScanJob" - pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" - }; - - // Execution state for the DataScanJob. - enum State { - // The DataScanJob state is unspecified. - STATE_UNSPECIFIED = 0; - - // The DataScanJob is running. - RUNNING = 1; - - // The DataScanJob is canceling. - CANCELING = 2; - - // The DataScanJob cancellation was successful. - CANCELLED = 3; - - // The DataScanJob completed successfully. - SUCCEEDED = 4; - - // The DataScanJob is no longer running due to an error. - FAILED = 5; - - // The DataScanJob has been created but not started to run yet. - PENDING = 7; - } - - // Output only. The relative resource name of the DataScanJob, of the form: - // `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - // where `project` refers to a *project_id* or *project_number* and - // `location_id` refers to a GCP region. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. System generated globally unique ID for the DataScanJob. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataScanJob was created. - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataScanJob was started. - google.protobuf.Timestamp start_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the DataScanJob ended. - google.protobuf.Timestamp end_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Execution state for the DataScanJob. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state. - string message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The type of the parent DataScan. - DataScanType type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Data scan related setting. - oneof spec { - // Output only. Settings for a data quality scan. - DataQualitySpec data_quality_spec = 100 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Settings for a data profile scan. - DataProfileSpec data_profile_spec = 101 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Settings for a data discovery scan. - DataDiscoverySpec data_discovery_spec = 102 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The result of the data scan. - oneof result { - // Output only. The result of a data quality scan. - DataQualityResult data_quality_result = 200 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The result of a data profile scan. - DataProfileResult data_profile_result = 201 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The result of a data discovery scan. - DataDiscoveryResult data_discovery_result = 202 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// The type of data scan. -enum DataScanType { - // The data scan type is unspecified. - DATA_SCAN_TYPE_UNSPECIFIED = 0; - - // Data quality scan. - DATA_QUALITY = 1; - - // Data profile scan. - DATA_PROFILE = 2; - - // Data discovery scan. - DATA_DISCOVERY = 3; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto deleted file mode 100644 index c6e0f37b00b..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/logs.proto +++ /dev/null @@ -1,786 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "LogsProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// The payload associated with Discovery data processing. -message DiscoveryEvent { - // The type of the event. - enum EventType { - // An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0; - - // An event representing discovery configuration in effect. - CONFIG = 1; - - // An event representing a metadata entity being created. - ENTITY_CREATED = 2; - - // An event representing a metadata entity being updated. - ENTITY_UPDATED = 3; - - // An event representing a metadata entity being deleted. - ENTITY_DELETED = 4; - - // An event representing a partition being created. - PARTITION_CREATED = 5; - - // An event representing a partition being updated. - PARTITION_UPDATED = 6; - - // An event representing a partition being deleted. - PARTITION_DELETED = 7; - - // An event representing a table being published. - TABLE_PUBLISHED = 10; - - // An event representing a table being updated. - TABLE_UPDATED = 11; - - // An event representing a table being skipped in publishing. - TABLE_IGNORED = 12; - - // An event representing a table being deleted. - TABLE_DELETED = 13; - } - - // The type of the entity. - enum EntityType { - // An unspecified event type. - ENTITY_TYPE_UNSPECIFIED = 0; - - // Entities representing structured data. - TABLE = 1; - - // Entities representing unstructured data. - FILESET = 2; - } - - // The type of the published table. - enum TableType { - // An unspecified table type. - TABLE_TYPE_UNSPECIFIED = 0; - - // External table type. - EXTERNAL_TABLE = 1; - - // BigLake table type. - BIGLAKE_TABLE = 2; - - // Object table type for unstructured data. - OBJECT_TABLE = 3; - } - - // Details about configuration events. - message ConfigDetails { - // A list of discovery configuration parameters in effect. - // The keys are the field paths within DiscoverySpec. - // Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - // etc. - map parameters = 1; - } - - // Details about the entity. - message EntityDetails { - // The name of the entity resource. - // The name is the fully-qualified resource name. - string entity = 1; - - // The type of the entity resource. - EntityType type = 2; - } - - // Details about the published table. - message TableDetails { - // The fully-qualified resource name of the table resource. - string table = 1; - - // The type of the table resource. - TableType type = 2; - } - - // Details about the partition. - message PartitionDetails { - // The name to the partition resource. - // The name is the fully-qualified resource name. - string partition = 1; - - // The name to the containing entity resource. - // The name is the fully-qualified resource name. - string entity = 2; - - // The type of the containing entity resource. - EntityType type = 3; - - // The locations of the data items (e.g., a Cloud Storage objects) sampled - // for metadata inference. - repeated string sampled_data_locations = 4; - } - - // Details about the action. - message ActionDetails { - // The type of action. - // Eg. IncompatibleDataSchema, InvalidDataFormat - string type = 1; - - // The human readable issue associated with the action. - string issue = 2; - } - - // The log message. - string message = 1; - - // The id of the associated lake. - string lake_id = 2; - - // The id of the associated zone. - string zone_id = 3; - - // The id of the associated asset. - string asset_id = 4; - - // The data location associated with the event. - string data_location = 5; - - // The id of the associated datascan for standalone discovery. - string datascan_id = 6; - - // The type of the event being logged. - EventType type = 10; - - // Additional details about the event. - oneof details { - // Details about discovery configuration in effect. - ConfigDetails config = 20; - - // Details about the entity associated with the event. - EntityDetails entity = 21; - - // Details about the partition associated with the event. - PartitionDetails partition = 22; - - // Details about the action associated with the event. - ActionDetails action = 23; - - // Details about the BigQuery table publishing associated with the event. - TableDetails table = 24; - } -} - -// The payload associated with Job logs that contains events describing jobs -// that have run within a Lake. -message JobEvent { - // The type of the job. - enum Type { - // Unspecified job type. - TYPE_UNSPECIFIED = 0; - - // Spark jobs. - SPARK = 1; - - // Notebook jobs. - NOTEBOOK = 2; - } - - // The completion status of the job. - enum State { - // Unspecified job state. - STATE_UNSPECIFIED = 0; - - // Job successfully completed. - SUCCEEDED = 1; - - // Job was unsuccessful. - FAILED = 2; - - // Job was cancelled by the user. - CANCELLED = 3; - - // Job was cancelled or aborted via the service executing the job. - ABORTED = 4; - } - - // The service used to execute the job. - enum Service { - // Unspecified service. - SERVICE_UNSPECIFIED = 0; - - // Cloud Dataproc. - DATAPROC = 1; - } - - // Job Execution trigger. - enum ExecutionTrigger { - // The job execution trigger is unspecified. - EXECUTION_TRIGGER_UNSPECIFIED = 0; - - // The job was triggered by Dataplex based on trigger spec from task - // definition. - TASK_CONFIG = 1; - - // The job was triggered by the explicit call of Task API. - RUN_REQUEST = 2; - } - - // The log message. - string message = 1; - - // The unique id identifying the job. - string job_id = 2; - - // The time when the job started running. - google.protobuf.Timestamp start_time = 3; - - // The time when the job ended running. - google.protobuf.Timestamp end_time = 4; - - // The job state on completion. - State state = 5; - - // The number of retries. - int32 retries = 6; - - // The type of the job. - Type type = 7; - - // The service used to execute the job. - Service service = 8; - - // The reference to the job within the service. - string service_job = 9; - - // Job execution trigger. - ExecutionTrigger execution_trigger = 11; -} - -// These messages contain information about sessions within an environment. -// The monitored resource is 'Environment'. -message SessionEvent { - // The type of the event. - enum EventType { - // An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0; - - // Event when the session is assigned to a user. - START = 1; - - // Event for stop of a session. - STOP = 2; - - // Query events in the session. - QUERY = 3; - - // Event for creation of a cluster. It is not yet assigned to a user. - // This comes before START in the sequence - CREATE = 4; - } - - // Execution details of the query. - message QueryDetail { - // Query Execution engine. - enum Engine { - // An unspecified Engine type. - ENGINE_UNSPECIFIED = 0; - - // Spark-sql engine is specified in Query. - SPARK_SQL = 1; - - // BigQuery engine is specified in Query. - BIGQUERY = 2; - } - - // The unique Query id identifying the query. - string query_id = 1; - - // The query text executed. - string query_text = 2; - - // Query Execution engine. - Engine engine = 3; - - // Time taken for execution of the query. - google.protobuf.Duration duration = 4; - - // The size of results the query produced. - int64 result_size_bytes = 5; - - // The data processed by the query. - int64 data_processed_bytes = 6; - } - - // The log message. - string message = 1; - - // The information about the user that created the session. It will be the - // email address of the user. - string user_id = 2; - - // Unique identifier for the session. - string session_id = 3; - - // The type of the event. - EventType type = 4; - - // Additional information about the Query metadata. - oneof detail { - // The execution details of the query. - QueryDetail query = 5; - } - - // The status of the event. - bool event_succeeded = 6; - - // If the session is associated with an environment with fast startup enabled, - // and was created before being assigned to a user. - bool fast_startup_enabled = 7; - - // The idle duration of a warm pooled session before it is assigned to user. - google.protobuf.Duration unassigned_duration = 8; -} - -// Payload associated with Governance related log events. -message GovernanceEvent { - // Information about Entity resource that the log event is associated with. - message Entity { - // Type of entity. - enum EntityType { - // An unspecified Entity type. - ENTITY_TYPE_UNSPECIFIED = 0; - - // Table entity type. - TABLE = 1; - - // Fileset entity type. - FILESET = 2; - } - - // The Entity resource the log event is associated with. - // Format: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - string entity = 1 [(google.api.resource_reference) = { - type: "dataplex.googleapis.com/Entity" - }]; - - // Type of entity. - EntityType entity_type = 2; - } - - // Type of governance log event. - enum EventType { - // An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0; - - // Resource IAM policy update event. - RESOURCE_IAM_POLICY_UPDATE = 1; - - // BigQuery table create event. - BIGQUERY_TABLE_CREATE = 2; - - // BigQuery table update event. - BIGQUERY_TABLE_UPDATE = 3; - - // BigQuery table delete event. - BIGQUERY_TABLE_DELETE = 4; - - // BigQuery connection create event. - BIGQUERY_CONNECTION_CREATE = 5; - - // BigQuery connection update event. - BIGQUERY_CONNECTION_UPDATE = 6; - - // BigQuery connection delete event. - BIGQUERY_CONNECTION_DELETE = 7; - - // BigQuery taxonomy created. - BIGQUERY_TAXONOMY_CREATE = 10; - - // BigQuery policy tag created. - BIGQUERY_POLICY_TAG_CREATE = 11; - - // BigQuery policy tag deleted. - BIGQUERY_POLICY_TAG_DELETE = 12; - - // BigQuery set iam policy for policy tag. - BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; - - // Access policy update event. - ACCESS_POLICY_UPDATE = 14; - - // Number of resources matched with particular Query. - GOVERNANCE_RULE_MATCHED_RESOURCES = 15; - - // Rule processing exceeds the allowed limit. - GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; - - // Rule processing errors. - GOVERNANCE_RULE_ERRORS = 17; - - // Governance rule processing Event. - GOVERNANCE_RULE_PROCESSING = 18; - } - - // The log message. - string message = 1; - - // The type of the event. - EventType event_type = 2; - - // Entity resource information if the log event is associated with a - // specific entity. - optional Entity entity = 3; -} - -// These messages contain information about the execution of a datascan. -// The monitored resource is 'DataScan' -message DataScanEvent { - // The type of the data scan. - enum ScanType { - // An unspecified data scan type. - SCAN_TYPE_UNSPECIFIED = 0; - - // Data scan for data profile. - DATA_PROFILE = 1; - - // Data scan for data quality. - DATA_QUALITY = 2; - - // Data scan for data discovery. - DATA_DISCOVERY = 4; - } - - // The job state of the data scan. - enum State { - // Unspecified job state. - STATE_UNSPECIFIED = 0; - - // Data scan job started. - STARTED = 1; - - // Data scan job successfully completed. - SUCCEEDED = 2; - - // Data scan job was unsuccessful. - FAILED = 3; - - // Data scan job was cancelled. - CANCELLED = 4; - - // Data scan job was createed. - CREATED = 5; - } - - // The trigger type for the data scan. - enum Trigger { - // An unspecified trigger type. - TRIGGER_UNSPECIFIED = 0; - - // Data scan triggers on demand. - ON_DEMAND = 1; - - // Data scan triggers as per schedule. - SCHEDULE = 2; - } - - // The scope of job for the data scan. - enum Scope { - // An unspecified scope type. - SCOPE_UNSPECIFIED = 0; - - // Data scan runs on all of the data. - FULL = 1; - - // Data scan runs on incremental data. - INCREMENTAL = 2; - } - - // Data profile result for data scan job. - message DataProfileResult { - // The count of rows processed in the data scan job. - int64 row_count = 1; - } - - // Data quality result for data scan job. - message DataQualityResult { - // The count of rows processed in the data scan job. - int64 row_count = 1; - - // Whether the data quality result was `pass` or not. - bool passed = 2; - - // The result of each dimension for data quality result. - // The key of the map is the name of the dimension. - // The value is the bool value depicting whether the dimension result was - // `pass` or not. - map dimension_passed = 3; - - // The table-level data quality score for the data scan job. - // - // The data quality score ranges between [0, 100] (up to two decimal - // points). - float score = 4; - - // The score of each dimension for data quality result. - // The key of the map is the name of the dimension. - // The value is the data quality score for the dimension. - // - // The score ranges between [0, 100] (up to two decimal - // points). - map dimension_score = 5; - - // The score of each column scanned in the data scan job. - // The key of the map is the name of the column. - // The value is the data quality score for the column. - // - // The score ranges between [0, 100] (up to two decimal - // points). - map column_score = 6; - } - - // Applied configs for data profile type data scan job. - message DataProfileAppliedConfigs { - // The percentage of the records selected from the dataset for DataScan. - // - // * Value ranges between 0.0 and 100.0. - // * Value 0.0 or 100.0 imply that sampling was not applied. - float sampling_percent = 1; - - // Boolean indicating whether a row filter was applied in the DataScan job. - bool row_filter_applied = 2; - - // Boolean indicating whether a column filter was applied in the DataScan - // job. - bool column_filter_applied = 3; - } - - // Applied configs for data quality type data scan job. - message DataQualityAppliedConfigs { - // The percentage of the records selected from the dataset for DataScan. - // - // * Value ranges between 0.0 and 100.0. - // * Value 0.0 or 100.0 imply that sampling was not applied. - float sampling_percent = 1; - - // Boolean indicating whether a row filter was applied in the DataScan job. - bool row_filter_applied = 2; - } - - // Post scan actions result for data scan job. - message PostScanActionsResult { - // The result of BigQuery export post scan action. - message BigQueryExportResult { - // Execution state for the exporting. - enum State { - // The exporting state is unspecified. - STATE_UNSPECIFIED = 0; - - // The exporting completed successfully. - SUCCEEDED = 1; - - // The exporting is no longer running due to an error. - FAILED = 2; - - // The exporting is skipped due to no valid scan result to export - // (usually caused by scan failed). - SKIPPED = 3; - } - - // Execution state for the BigQuery exporting. - State state = 1; - - // Additional information about the BigQuery exporting. - string message = 2; - } - - // The result of BigQuery export post scan action. - BigQueryExportResult bigquery_export_result = 1; - } - - // The data source of the data scan - string data_source = 1; - - // The identifier of the specific data scan job this log entry is for. - string job_id = 2; - - // The time when the data scan job was created. - google.protobuf.Timestamp create_time = 12; - - // The time when the data scan job started to run. - google.protobuf.Timestamp start_time = 3; - - // The time when the data scan job finished. - google.protobuf.Timestamp end_time = 4; - - // The type of the data scan. - ScanType type = 5; - - // The status of the data scan job. - State state = 6; - - // The message describing the data scan job event. - string message = 7; - - // A version identifier of the spec which was used to execute this job. - string spec_version = 8; - - // The trigger type of the data scan job. - Trigger trigger = 9; - - // The scope of the data scan (e.g. full, incremental). - Scope scope = 10; - - // The result of the data scan job. - oneof result { - // Data profile result for data profile type data scan. - DataProfileResult data_profile = 101; - - // Data quality result for data quality type data scan. - DataQualityResult data_quality = 102; - } - - // The applied configs in the data scan job. - oneof appliedConfigs { - // Applied configs for data profile type data scan. - DataProfileAppliedConfigs data_profile_configs = 201; - - // Applied configs for data quality type data scan. - DataQualityAppliedConfigs data_quality_configs = 202; - } - - // The result of post scan actions. - PostScanActionsResult post_scan_actions_result = 11; -} - -// Information about the result of a data quality rule for data quality scan. -// The monitored resource is 'DataScan'. -message DataQualityScanRuleResult { - // The type of the data quality rule. - enum RuleType { - // An unspecified rule type. - RULE_TYPE_UNSPECIFIED = 0; - - // See - // [DataQualityRule.NonNullExpectation][google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation]. - NON_NULL_EXPECTATION = 1; - - // See - // [DataQualityRule.RangeExpectation][google.cloud.dataplex.v1.DataQualityRule.RangeExpectation]. - RANGE_EXPECTATION = 2; - - // See - // [DataQualityRule.RegexExpectation][google.cloud.dataplex.v1.DataQualityRule.RegexExpectation]. - REGEX_EXPECTATION = 3; - - // See - // [DataQualityRule.RowConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation]. - ROW_CONDITION_EXPECTATION = 4; - - // See - // [DataQualityRule.SetExpectation][google.cloud.dataplex.v1.DataQualityRule.SetExpectation]. - SET_EXPECTATION = 5; - - // See - // [DataQualityRule.StatisticRangeExpectation][google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation]. - STATISTIC_RANGE_EXPECTATION = 6; - - // See - // [DataQualityRule.TableConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation]. - TABLE_CONDITION_EXPECTATION = 7; - - // See - // [DataQualityRule.UniquenessExpectation][google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation]. - UNIQUENESS_EXPECTATION = 8; - - // See - // [DataQualityRule.SqlAssertion][google.cloud.dataplex.v1.DataQualityRule.SqlAssertion]. - SQL_ASSERTION = 9; - } - - // The evaluation type of the data quality rule. - enum EvaluationType { - // An unspecified evaluation type. - EVALUATION_TYPE_UNSPECIFIED = 0; - - // The rule evaluation is done at per row level. - PER_ROW = 1; - - // The rule evaluation is done for an aggregate of rows. - AGGREGATE = 2; - } - - // Whether the data quality rule passed or failed. - enum Result { - // An unspecified result. - RESULT_UNSPECIFIED = 0; - - // The data quality rule passed. - PASSED = 1; - - // The data quality rule failed. - FAILED = 2; - } - - // Identifier of the specific data scan job this log entry is for. - string job_id = 1; - - // The data source of the data scan (e.g. BigQuery table name). - string data_source = 2; - - // The column which this rule is evaluated against. - string column = 3; - - // The name of the data quality rule. - string rule_name = 4; - - // The type of the data quality rule. - RuleType rule_type = 5; - - // The evaluation type of the data quality rule. - EvaluationType evalution_type = 6; - - // The dimension of the data quality rule. - string rule_dimension = 7; - - // The passing threshold ([0.0, 100.0]) of the data quality rule. - double threshold_percent = 8; - - // The result of the data quality rule. - Result result = 9; - - // The number of rows evaluated against the data quality rule. - // This field is only valid for rules of PER_ROW evaluation type. - int64 evaluated_row_count = 10; - - // The number of rows which passed a rule evaluation. - // This field is only valid for rules of PER_ROW evaluation type. - int64 passed_row_count = 11; - - // The number of rows with null values in the specified column. - int64 null_row_count = 12; - - // The number of rows returned by the SQL statement in a SQL assertion rule. - // This field is only valid for SQL assertion rules. - int64 assertion_row_count = 13; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto deleted file mode 100644 index be51a2c85cc..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/metadata.proto +++ /dev/null @@ -1,823 +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.dataplex.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "MetadataProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// Metadata service manages metadata resources such as tables, filesets and -// partitions. -service MetadataService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Create a metadata entity. - rpc CreateEntity(CreateEntityRequest) returns (Entity) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" - body: "entity" - }; - option (google.api.method_signature) = "parent,entity"; - } - - // Update a metadata entity. Only supports full resource update. - rpc UpdateEntity(UpdateEntityRequest) returns (Entity) { - option (google.api.http) = { - put: "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - body: "entity" - }; - } - - // Delete a metadata entity. - rpc DeleteEntity(DeleteEntityRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get a metadata entity. - rpc GetEntity(GetEntityRequest) returns (Entity) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - }; - option (google.api.method_signature) = "name"; - } - - // List metadata entities in a zone. - rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" - }; - option (google.api.method_signature) = "parent"; - } - - // Create a metadata partition. - rpc CreatePartition(CreatePartitionRequest) returns (Partition) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" - body: "partition" - }; - option (google.api.method_signature) = "parent,partition"; - } - - // Delete a metadata partition. - rpc DeletePartition(DeletePartitionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Get a metadata partition of an entity. - rpc GetPartition(GetPartitionRequest) returns (Partition) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" - }; - option (google.api.method_signature) = "name"; - } - - // List metadata partitions of an entity. - rpc ListPartitions(ListPartitionsRequest) returns (ListPartitionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Create a metadata entity request. -message CreateEntityRequest { - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Required. Entity resource. - Entity entity = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update a metadata entity request. -// The exiting entity will be fully replaced by the entity in the request. -// The entity ID is mutable. To modify the ID, use the current entity ID in the -// request URL and specify the new ID in the request body. -message UpdateEntityRequest { - // Required. Update description. - Entity entity = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete a metadata entity request. -message DeleteEntityRequest { - // Required. The resource name of the entity: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } - ]; - - // Required. The etag associated with the entity, which can be retrieved with - // a [GetEntity][] request. - string etag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// List metadata entities request. -message ListEntitiesRequest { - // Entity views. - enum EntityView { - // The default unset value. Return both table and fileset entities - // if unspecified. - ENTITY_VIEW_UNSPECIFIED = 0; - - // Only list table entities. - TABLES = 1; - - // Only list fileset entities. - FILESETS = 2; - } - - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Required. Specify the entity view to make a partial list request. - EntityView view = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Maximum number of entities to return. The service may return - // fewer than this value. If unspecified, 100 entities will be returned by - // default. The maximum value is 500; larger values will will be truncated to - // 500. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListEntities` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListEntities` must match the call that provided the - // page token. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The following filter parameters can be added to the URL to limit - // the entities returned by the API: - // - // - Entity ID: ?filter="id=entityID" - // - Asset ID: ?filter="asset=assetID" - // - Data path ?filter="data_path=gs://my-bucket" - // - Is HIVE compatible: ?filter="hive_compatible=true" - // - Is BigQuery compatible: ?filter="bigquery_compatible=true" - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List metadata entities response. -message ListEntitiesResponse { - // Entities in the specified parent zone. - repeated Entity entities = 1; - - // Token to retrieve the next page of results, or empty if there are no - // remaining results in the list. - string next_page_token = 2; -} - -// Get metadata entity request. -message GetEntityRequest { - // Entity views for get entity partial result. - enum EntityView { - // The API will default to the `BASIC` view. - ENTITY_VIEW_UNSPECIFIED = 0; - - // Minimal view that does not include the schema. - BASIC = 1; - - // Include basic information and schema. - SCHEMA = 2; - - // Include everything. Currently, this is the same as the SCHEMA view. - FULL = 4; - } - - // Required. The resource name of the entity: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } - ]; - - // Optional. Used to select the subset of entity information to return. - // Defaults to `BASIC`. - EntityView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// List metadata partitions request. -message ListPartitionsRequest { - // Required. The resource name of the parent entity: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } - ]; - - // Optional. Maximum number of partitions to return. The service may return - // fewer than this value. If unspecified, 100 partitions will be returned by - // default. The maximum page size is 500; larger values will will be truncated - // to 500. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListPartitions` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListPartitions` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter the partitions returned to the caller using a key value - // pair expression. Supported operators and syntax: - // - // - logic operators: AND, OR - // - comparison operators: <, >, >=, <= ,=, != - // - LIKE operators: - // - The right hand of a LIKE operator supports "." and - // "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - // - parenthetical grouping: ( ) - // - // Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - // - // **Notes:** - // - // - Keys to the left of operators are case insensitive. - // - Partition results are sorted first by creation time, then by - // lexicographic order. - // - Up to 20 key value filter pairs are allowed, but due to performance - // considerations, only the first 10 will be used as a filter. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Create metadata partition request. -message CreatePartitionRequest { - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } - ]; - - // Required. Partition resource. - Partition partition = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete metadata partition request. -message DeletePartitionRequest { - // Required. The resource name of the partition. - // format: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - // The {partition_value_path} segment consists of an ordered sequence of - // partition values separated by "/". All values must be provided. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Partition" - } - ]; - - // Optional. The etag associated with the partition. - string etag = 2 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; -} - -// List metadata partitions response. -message ListPartitionsResponse { - // Partitions under the specified parent entity. - repeated Partition partitions = 1; - - // Token to retrieve the next page of results, or empty if there are no - // remaining results in the list. - string next_page_token = 2; -} - -// Get metadata partition request. -message GetPartitionRequest { - // Required. The resource name of the partition: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - // The {partition_value_path} segment consists of an ordered sequence of - // partition values separated by "/". All values must be provided. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Partition" - } - ]; -} - -// Represents tables and fileset metadata contained within a zone. -message Entity { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Entity" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" - }; - - // The type of entity. - enum Type { - // Type unspecified. - TYPE_UNSPECIFIED = 0; - - // Structured and semi-structured data. - TABLE = 1; - - // Unstructured data. - FILESET = 2; - } - - // Provides compatibility information for various metadata stores. - message CompatibilityStatus { - // Provides compatibility information for a specific metadata store. - message Compatibility { - // Output only. Whether the entity is compatible and can be represented in - // the metadata store. - bool compatible = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Provides additional detail if the entity is incompatible - // with the metadata store. - string reason = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Whether this entity is compatible with Hive Metastore. - Compatibility hive_metastore = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether this entity is compatible with BigQuery. - Compatibility bigquery = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The resource name of the entity, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entity" } - ]; - - // Optional. Display name must be shorter than or equal to 256 characters. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly longer description text. Must be shorter than or - // equal to 1024 characters. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the entity was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the entity was last updated. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. A user-provided entity ID. It is mutable, and will be used as the - // published table name. Specifying a new ID in an update entity - // request will override the existing value. - // The ID must contain only letters (a-z, A-Z), numbers (0-9), and - // underscores, and consist of 256 or fewer characters. - string id = 7 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The etag associated with the entity, which can be retrieved with - // a [GetEntity][] request. Required for update and delete requests. - string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Immutable. The type of entity. - Type type = 10 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Immutable. The ID of the asset associated with the storage - // location containing the entity data. The entity must be with in the same - // zone with the asset. - string asset = 11 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Immutable. The storage path of the entity data. - // For Cloud Storage data, this is the fully-qualified path to the entity, - // such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - // the table resource, such as - // `projects/project_id/datasets/dataset_id/tables/table_id`. - string data_path = 12 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. The set of items within the data path constituting the data in - // the entity, represented as a glob path. Example: - // `gs://bucket/path/to/data/**/*.csv`. - string data_path_pattern = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The name of the associated Data Catalog entry. - string catalog_entry = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Immutable. Identifies the storage system of the entity data. - StorageSystem system = 15 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Identifies the storage format of the entity data. - // It does not apply to entities with data stored in BigQuery. - StorageFormat format = 16 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Metadata stores that the entity is compatible with. - CompatibilityStatus compatibility = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies the access mechanism to the entity. Not user - // settable. - StorageAccess access = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. System generated unique ID for the Entity. This ID will be - // different if the Entity is deleted and re-created with the same name. - string uid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The description of the data structure and layout. - // The schema is not included in list responses. It is only included in - // `SCHEMA` and `FULL` entity views of a `GetEntity` response. - Schema schema = 50 [(google.api.field_behavior) = REQUIRED]; -} - -// Represents partition metadata contained within entity instances. -message Partition { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Partition" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" - }; - - // Output only. Partition values used in the HTTP URL must be - // double encoded. For example, `url_encode(url_encode(value))` can be used - // to encode "US:CA/CA#Sunnyvale so that the request URL ends - // with "/partitions/US%253ACA/CA%2523Sunnyvale". - // The name field in the response retains the encoded format. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Partition" - } - ]; - - // Required. Immutable. The set of values representing the partition, which - // correspond to the partition schema defined in the parent entity. - repeated string values = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Immutable. The location of the entity data within the partition, - // for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - // `projects//datasets//tables/` - string location = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. The etag for this partition. - string etag = 4 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; -} - -// Schema information describing the structure and layout of the data. -message Schema { - // Type information for fields in schemas and partition schemas. - enum Type { - // SchemaType unspecified. - TYPE_UNSPECIFIED = 0; - - // Boolean field. - BOOLEAN = 1; - - // Single byte numeric field. - BYTE = 2; - - // 16-bit numeric field. - INT16 = 3; - - // 32-bit numeric field. - INT32 = 4; - - // 64-bit numeric field. - INT64 = 5; - - // Floating point numeric field. - FLOAT = 6; - - // Double precision numeric field. - DOUBLE = 7; - - // Real value numeric field. - DECIMAL = 8; - - // Sequence of characters field. - STRING = 9; - - // Sequence of bytes field. - BINARY = 10; - - // Date and time field. - TIMESTAMP = 11; - - // Date field. - DATE = 12; - - // Time field. - TIME = 13; - - // Structured field. Nested fields that define the structure of the map. - // If all nested fields are nullable, this field represents a union. - RECORD = 14; - - // Null field that does not have values. - NULL = 100; - } - - // Additional qualifiers to define field semantics. - enum Mode { - // Mode unspecified. - MODE_UNSPECIFIED = 0; - - // The field has required semantics. - REQUIRED = 1; - - // The field has optional semantics, and may be null. - NULLABLE = 2; - - // The field has repeated (0 or more) semantics, and is a list of values. - REPEATED = 3; - } - - // Represents a column field within a table schema. - message SchemaField { - // Required. The name of the field. Must contain only letters, numbers and - // underscores, with a maximum length of 767 characters, - // and must begin with a letter or underscore. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. User friendly field description. Must be less than or equal to - // 1024 characters. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The type of field. - Type type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Additional field semantics. - Mode mode = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Any nested field for complex types. - repeated SchemaField fields = 10 [(google.api.field_behavior) = OPTIONAL]; - } - - // Represents a key field within the entity's partition structure. You could - // have up to 20 partition fields, but only the first 10 partitions have the - // filtering ability due to performance consideration. **Note:** - // Partition fields are immutable. - message PartitionField { - // Required. Partition field name must consist of letters, numbers, and - // underscores only, with a maximum of length of 256 characters, and must - // begin with a letter or underscore.. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Immutable. The type of field. - Type type = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - } - - // The structure of paths within the entity, which represent partitions. - enum PartitionStyle { - // PartitionStyle unspecified - PARTITION_STYLE_UNSPECIFIED = 0; - - // Partitions are hive-compatible. - // Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, - // `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. - HIVE_COMPATIBLE = 1; - } - - // Required. Set to `true` if user-managed or `false` if managed by Dataplex. - // The default is `false` (managed by Dataplex). - // - // - Set to `false`to enable Dataplex discovery to update the schema. - // including new data discovery, schema inference, and schema evolution. - // Users retain the ability to input and edit the schema. Dataplex - // treats schema input by the user as though produced - // by a previous Dataplex discovery operation, and it will - // evolve the schema and take action based on that treatment. - // - // - Set to `true` to fully manage the entity - // schema. This setting guarantees that Dataplex will not - // change schema fields. - bool user_managed = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The sequence of fields describing data in table entities. - // **Note:** BigQuery SchemaFields are immutable. - repeated SchemaField fields = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The sequence of fields describing the partition structure in - // entities. If this field is empty, there are no partitions within the data. - repeated PartitionField partition_fields = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The structure of paths containing partition data within the - // entity. - PartitionStyle partition_style = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Describes the format of the data within its storage location. -message StorageFormat { - // Describes CSV and similar semi-structured data formats. - message CsvOptions { - // Optional. The character encoding of the data. Accepts "US-ASCII", - // "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of rows to interpret as header rows that should be - // skipped when reading data rows. Defaults to 0. - int32 header_rows = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The delimiter used to separate values. Defaults to ','. - string delimiter = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The character used to quote column values. Accepts '"' - // (double quotation mark) or ''' (single quotation mark). Defaults to - // '"' (double quotation mark) if unspecified. - string quote = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Describes JSON data format. - message JsonOptions { - // Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - // and "ISO-8859-1". Defaults to UTF-8 if not specified. - string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Describes Iceberg data format. - message IcebergOptions { - // Optional. The location of where the iceberg metadata is present, must be - // within the table path - string metadata_location = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // The specific file format of the data. - enum Format { - // Format unspecified. - FORMAT_UNSPECIFIED = 0; - - // Parquet-formatted structured data. - PARQUET = 1; - - // Avro-formatted structured data. - AVRO = 2; - - // Orc-formatted structured data. - ORC = 3; - - // Csv-formatted semi-structured data. - CSV = 100; - - // Json-formatted semi-structured data. - JSON = 101; - - // Image data formats (such as jpg and png). - IMAGE = 200; - - // Audio data formats (such as mp3, and wav). - AUDIO = 201; - - // Video data formats (such as mp4 and mpg). - VIDEO = 202; - - // Textual data formats (such as txt and xml). - TEXT = 203; - - // TensorFlow record format. - TFRECORD = 204; - - // Data that doesn't match a specific format. - OTHER = 1000; - - // Data of an unknown format. - UNKNOWN = 1001; - } - - // The specific compressed file format of the data. - enum CompressionFormat { - // CompressionFormat unspecified. Implies uncompressed data. - COMPRESSION_FORMAT_UNSPECIFIED = 0; - - // GZip compressed set of files. - GZIP = 2; - - // BZip2 compressed set of files. - BZIP2 = 3; - } - - // Output only. The data format associated with the stored data, which - // represents content type values. The value is inferred from mime type. - Format format = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The compression type associated with the stored data. - // If unspecified, the data is uncompressed. - CompressionFormat compression_format = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The mime type descriptor for the data. Must match the pattern - // {type}/{subtype}. Supported values: - // - // - application/x-parquet - // - application/x-avro - // - application/x-orc - // - application/x-tfrecord - // - application/x-parquet+iceberg - // - application/x-avro+iceberg - // - application/x-orc+iceberg - // - application/json - // - application/{subtypes} - // - text/csv - // - text/ - // - image/{image subtype} - // - video/{video subtype} - // - audio/{audio subtype} - string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Additional format-specific options. - oneof options { - // Optional. Additional information about CSV formatted data. - CsvOptions csv = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Additional information about CSV formatted data. - JsonOptions json = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Additional information about iceberg tables. - IcebergOptions iceberg = 12 [(google.api.field_behavior) = OPTIONAL]; - } -} - -// Describes the access mechanism of the data within its storage location. -message StorageAccess { - // Access Mode determines how data stored within the Entity is read. - enum AccessMode { - // Access mode unspecified. - ACCESS_MODE_UNSPECIFIED = 0; - - // Default. Data is accessed directly using storage APIs. - DIRECT = 1; - - // Data is accessed through a managed interface using BigQuery APIs. - MANAGED = 2; - } - - // Output only. Describes the read access mechanism of the data. Not user - // settable. - AccessMode read = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Identifies the cloud system that manages the data storage. -enum StorageSystem { - // Storage system unspecified. - STORAGE_SYSTEM_UNSPECIFIED = 0; - - // The entity data is contained within a Cloud Storage bucket. - CLOUD_STORAGE = 1; - - // The entity data is contained within a BigQuery dataset. - BIGQUERY = 2; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto deleted file mode 100644 index 0cbd7309ee5..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/processing.proto +++ /dev/null @@ -1,104 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "ProcessingProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// DataScan scheduling and trigger settings. -message Trigger { - // The scan runs once via `RunDataScan` API. - message OnDemand {} - - // The scan is scheduled to run periodically. - message Schedule { - // Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - // scans periodically. - // - // To explicitly set a timezone in the cron tab, apply a prefix in the - // cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - // The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - // database - // ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - // For example, `CRON_TZ=America/New_York 1 * * * *`, or - // `TZ=America/New_York 1 * * * *`. - // - // This field is required for Schedule scans. - string cron = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // DataScan scheduling and trigger settings. - // - // If not specified, the default is `onDemand`. - oneof mode { - // The scan runs once via `RunDataScan` API. - OnDemand on_demand = 100; - - // The scan is scheduled to run periodically. - Schedule schedule = 101; - } -} - -// The data source for DataScan. -message DataSource { - // The source is required and immutable. Once it is set, it cannot be change - // to others. - oneof source { - // Immutable. The Dataplex entity that represents the data source (e.g. - // BigQuery table) for DataScan, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - string entity = 100 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Entity" - } - ]; - - // Immutable. The service-qualified full resource name of the cloud resource - // for a DataScan job to scan against. The field could be: BigQuery table of - // type "TABLE" for DataProfileScan/DataQualityScan Format: - // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - string resource = 101 [(google.api.field_behavior) = IMMUTABLE]; - } -} - -// The data scanned during processing (e.g. in incremental DataScan) -message ScannedData { - // A data range denoted by a pair of start/end values of a field. - message IncrementalField { - // The field that contains values which monotonically increases over time - // (e.g. a timestamp column). - string field = 1; - - // Value that marks the start of the range. - string start = 2; - - // Value that marks the end of the range. - string end = 3; - } - - // The range of scanned data - oneof data_range { - // The range denoted by values of an incremental field - IncrementalField incremental_field = 1; - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto deleted file mode 100644 index 036d78b98d5..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/resources.proto +++ /dev/null @@ -1,807 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "ResourcesProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// A lake is a centralized repository for managing enterprise data across the -// organization distributed across many cloud projects, and stored in a variety -// of storage services such as Google Cloud Storage and BigQuery. The resources -// attached to a lake are referred to as managed resources. Data within these -// managed resources can be structured or unstructured. A lake provides data -// admins with tools to organize, secure and manage their data at scale, and -// provides data scientists and data engineers an integrated experience to -// easily search, discover, analyze and transform data and associated metadata. -message Lake { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Lake" - pattern: "projects/{project}/locations/{location}/lakes/{lake}" - }; - - // Settings to manage association of Dataproc Metastore with a lake. - message Metastore { - // Optional. A relative reference to the Dataproc Metastore - // (https://cloud.google.com/dataproc-metastore/docs) service associated - // with the lake: - // `projects/{project_id}/locations/{location_id}/services/{service_id}` - string service = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Status of Lake and Dataproc Metastore service instance association. - message MetastoreStatus { - // Current state of association. - enum State { - // Unspecified. - STATE_UNSPECIFIED = 0; - - // A Metastore service instance is not associated with the lake. - NONE = 1; - - // A Metastore service instance is attached to the lake. - READY = 2; - - // Attach/detach is in progress. - UPDATING = 3; - - // Attach/detach could not be done due to errors. - ERROR = 4; - } - - // Current state of association. - State state = 1; - - // Additional information about the current status. - string message = 2; - - // Last update time of the metastore status of the lake. - google.protobuf.Timestamp update_time = 3; - - // The URI of the endpoint used to access the Metastore service. - string endpoint = 4; - } - - // Output only. The relative resource name of the lake, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. User friendly display name. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. System generated globally unique ID for the lake. This ID will - // be different if the lake is deleted and re-created with the same name. - string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the lake was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the lake was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined labels for the lake. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the lake. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the lake. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Service account associated with this lake. This service - // account must be authorized to access or operate on resources managed by the - // lake. - string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Settings to manage lake and Dataproc Metastore service instance - // association. - Metastore metastore = 102 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Aggregated status of the underlying assets of the lake. - AssetStatus asset_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metastore status of the lake. - MetastoreStatus metastore_status = 104 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Aggregated status of the underlying assets of a lake or zone. -message AssetStatus { - // Last update time of the status. - google.protobuf.Timestamp update_time = 1; - - // Number of active assets. - int32 active_assets = 2; - - // Number of assets that are in process of updating the security policy on - // attached resources. - int32 security_policy_applying_assets = 3; -} - -// A zone represents a logical group of related assets within a lake. A zone can -// be used to map to organizational structure or represent stages of data -// readiness from raw to curated. It provides managing behavior that is shared -// or inherited by all contained assets. -message Zone { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Zone" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" - }; - - // Type of zone. - enum Type { - // Zone type not specified. - TYPE_UNSPECIFIED = 0; - - // A zone that contains data that needs further processing before it is - // considered generally ready for consumption and analytics workloads. - RAW = 1; - - // A zone that contains data that is considered to be ready for broader - // consumption and analytics workloads. Curated structured data stored in - // Cloud Storage must conform to certain file formats (parquet, avro and - // orc) and organized in a hive-compatible directory layout. - CURATED = 2; - } - - // Settings for resources attached as assets within a zone. - message ResourceSpec { - // Location type of the resources attached to a zone. - enum LocationType { - // Unspecified location type. - LOCATION_TYPE_UNSPECIFIED = 0; - - // Resources that are associated with a single region. - SINGLE_REGION = 1; - - // Resources that are associated with a multi-region location. - MULTI_REGION = 2; - } - - // Required. Immutable. The location type of the resources that are allowed - // to be attached to the assets within this zone. - LocationType location_type = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - } - - // Settings to manage the metadata discovery and publishing in a zone. - message DiscoverySpec { - // Describe CSV and similar semi-structured data formats. - message CsvOptions { - // Optional. The number of rows to interpret as header rows that should be - // skipped when reading data rows. - int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The delimiter being used to separate values. This defaults to - // ','. - string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The character encoding of the data. The default is UTF-8. - string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to disable the inference of data type for CSV data. - // If true, all columns will be registered as strings. - bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Describe JSON data format. - message JsonOptions { - // Optional. The character encoding of the data. The default is UTF-8. - string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to disable the inference of data type for Json data. - // If true, all columns will be registered as their primitive types - // (strings, number or boolean). - bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. Whether discovery is enabled. - bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The list of patterns to apply for selecting data to include - // during discovery if only a subset of the data should considered. For - // Cloud Storage bucket assets, these are interpreted as glob patterns used - // to match object names. For BigQuery dataset assets, these are interpreted - // as patterns to match table names. - repeated string include_patterns = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of patterns to apply for selecting data to exclude - // during discovery. For Cloud Storage bucket assets, these are interpreted - // as glob patterns used to match object names. For BigQuery dataset assets, - // these are interpreted as patterns to match table names. - repeated string exclude_patterns = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for CSV data. - CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for Json data. - JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Determines when discovery is triggered. - oneof trigger { - // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - // running discovery periodically. Successive discovery runs must be - // scheduled at least 60 minutes apart. The default value is to run - // discovery every 60 minutes. To explicitly set a timezone to the cron - // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - // * * * *`, or `TZ=America/New_York 1 * * * *`. - string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; - } - } - - // Output only. The relative resource name of the zone, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Optional. User friendly display name. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. System generated globally unique ID for the zone. This ID will - // be different if the zone is deleted and re-created with the same name. - string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the zone was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the zone was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User defined labels for the zone. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the zone. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the zone. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Immutable. The type of the zone. - Type type = 9 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. Specification of the discovery feature applied to data in this - // zone. - DiscoverySpec discovery_spec = 103 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Specification of the resources that are referenced by the assets - // within this zone. - ResourceSpec resource_spec = 104 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Aggregated status of the underlying assets of the zone. - AssetStatus asset_status = 105 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Action represents an issue requiring administrator action for resolution. -message Action { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Action" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/actions/{action}" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" - }; - - // The category of issues. - enum Category { - // Unspecified category. - CATEGORY_UNSPECIFIED = 0; - - // Resource management related issues. - RESOURCE_MANAGEMENT = 1; - - // Security policy related issues. - SECURITY_POLICY = 2; - - // Data and discovery related issues. - DATA_DISCOVERY = 3; - } - - // Action details for resource references in assets that cannot be located. - message MissingResource {} - - // Action details for unauthorized resource issues raised to indicate that the - // service account associated with the lake instance is not authorized to - // access or manage the resource associated with an asset. - message UnauthorizedResource {} - - // Failed to apply security policy to the managed resource(s) under a - // lake, zone or an asset. For a lake or zone resource, one or more underlying - // assets has a failure applying security policy to the associated managed - // resource. - message FailedSecurityPolicyApply { - // Resource name of one of the assets with failing security policy - // application. Populated for a lake or zone resource only. - string asset = 1; - } - - // Action details for invalid or unsupported data files detected by discovery. - message InvalidDataFormat { - // The list of data locations sampled and used for format/schema - // inference. - repeated string sampled_data_locations = 1; - - // The expected data format of the entity. - string expected_format = 2; - - // The new unexpected data format within the entity. - string new_format = 3; - } - - // Action details for incompatible schemas detected by discovery. - message IncompatibleDataSchema { - // Whether the action relates to a schema that is incompatible or modified. - enum SchemaChange { - // Schema change unspecified. - SCHEMA_CHANGE_UNSPECIFIED = 0; - - // Newly discovered schema is incompatible with existing schema. - INCOMPATIBLE = 1; - - // Newly discovered schema has changed from existing schema for data in a - // curated zone. - MODIFIED = 2; - } - - // The name of the table containing invalid data. - string table = 1; - - // The existing and expected schema of the table. The schema is provided as - // a JSON formatted structure listing columns and data types. - string existing_schema = 2; - - // The new and incompatible schema within the table. The schema is provided - // as a JSON formatted structured listing columns and data types. - string new_schema = 3; - - // The list of data locations sampled and used for format/schema - // inference. - repeated string sampled_data_locations = 4; - - // Whether the action relates to a schema that is incompatible or modified. - SchemaChange schema_change = 5; - } - - // Action details for invalid or unsupported partitions detected by discovery. - message InvalidDataPartition { - // The expected partition structure. - enum PartitionStructure { - // PartitionStructure unspecified. - PARTITION_STRUCTURE_UNSPECIFIED = 0; - - // Consistent hive-style partition definition (both raw and curated zone). - CONSISTENT_KEYS = 1; - - // Hive style partition definition (curated zone only). - HIVE_STYLE_KEYS = 2; - } - - // The issue type of InvalidDataPartition. - PartitionStructure expected_structure = 1; - } - - // Action details for absence of data detected by discovery. - message MissingData {} - - // Action details for invalid data arrangement. - message InvalidDataOrganization {} - - // The category of issue associated with the action. - Category category = 1; - - // Detailed description of the issue requiring action. - string issue = 2; - - // The time that the issue was detected. - google.protobuf.Timestamp detect_time = 4; - - // Output only. The relative resource name of the action, of the form: - // `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - string name = 5 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Action" } - ]; - - // Output only. The relative resource name of the lake, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string lake = 6 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Output only. The relative resource name of the zone, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string zone = 7 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Output only. The relative resource name of the asset, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - string asset = 8 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } - ]; - - // The list of data locations associated with this action. Cloud Storage - // locations are represented as URI paths(E.g. - // `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - // resource names(E.g. - // `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - repeated string data_locations = 9; - - // Additional details about the action based on the action category. - oneof details { - // Details for issues related to invalid or unsupported data formats. - InvalidDataFormat invalid_data_format = 10; - - // Details for issues related to incompatible schemas detected within data. - IncompatibleDataSchema incompatible_data_schema = 11; - - // Details for issues related to invalid or unsupported data partition - // structure. - InvalidDataPartition invalid_data_partition = 12; - - // Details for issues related to absence of data within managed resources. - MissingData missing_data = 13; - - // Details for issues related to absence of a managed resource. - MissingResource missing_resource = 14; - - // Details for issues related to lack of permissions to access data - // resources. - UnauthorizedResource unauthorized_resource = 15; - - // Details for issues related to applying security policy. - FailedSecurityPolicyApply failed_security_policy_apply = 21; - - // Details for issues related to invalid data arrangement. - InvalidDataOrganization invalid_data_organization = 22; - } -} - -// An asset represents a cloud resource that is being managed within a lake as a -// member of a zone. -message Asset { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Asset" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" - }; - - // Security policy status of the asset. Data security policy, i.e., readers, - // writers & owners, should be specified in the lake/zone/asset IAM policy. - message SecurityStatus { - // The state of the security policy. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // Security policy has been successfully applied to the attached resource. - READY = 1; - - // Security policy is in the process of being applied to the attached - // resource. - APPLYING = 2; - - // Security policy could not be applied to the attached resource due to - // errors. - ERROR = 3; - } - - // The current state of the security policy applied to the attached - // resource. - State state = 1; - - // Additional information about the current state. - string message = 2; - - // Last update time of the status. - google.protobuf.Timestamp update_time = 3; - } - - // Settings to manage the metadata discovery and publishing for an asset. - message DiscoverySpec { - // Describe CSV and similar semi-structured data formats. - message CsvOptions { - // Optional. The number of rows to interpret as header rows that should be - // skipped when reading data rows. - int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The delimiter being used to separate values. This defaults to - // ','. - string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The character encoding of the data. The default is UTF-8. - string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to disable the inference of data type for CSV data. - // If true, all columns will be registered as strings. - bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Describe JSON data format. - message JsonOptions { - // Optional. The character encoding of the data. The default is UTF-8. - string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to disable the inference of data type for Json data. - // If true, all columns will be registered as their primitive types - // (strings, number or boolean). - bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Whether discovery is enabled. - bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of patterns to apply for selecting data to include - // during discovery if only a subset of the data should considered. For - // Cloud Storage bucket assets, these are interpreted as glob patterns used - // to match object names. For BigQuery dataset assets, these are interpreted - // as patterns to match table names. - repeated string include_patterns = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of patterns to apply for selecting data to exclude - // during discovery. For Cloud Storage bucket assets, these are interpreted - // as glob patterns used to match object names. For BigQuery dataset assets, - // these are interpreted as patterns to match table names. - repeated string exclude_patterns = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for CSV data. - CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for Json data. - JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Determines when discovery is triggered. - oneof trigger { - // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - // running discovery periodically. Successive discovery runs must be - // scheduled at least 60 minutes apart. The default value is to run - // discovery every 60 minutes. To explicitly set a timezone to the cron - // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - // * * * *`, or `TZ=America/New_York 1 * * * *`. - string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; - } - } - - // Identifies the cloud resource that is referenced by this asset. - message ResourceSpec { - // Type of resource. - enum Type { - // Type not specified. - TYPE_UNSPECIFIED = 0; - - // Cloud Storage bucket. - STORAGE_BUCKET = 1; - - // BigQuery dataset. - BIGQUERY_DATASET = 2; - } - - // Access Mode determines how data stored within the resource is read. This - // is only applicable to storage bucket assets. - enum AccessMode { - // Access mode unspecified. - ACCESS_MODE_UNSPECIFIED = 0; - - // Default. Data is accessed directly using storage APIs. - DIRECT = 1; - - // Data is accessed through a managed interface using BigQuery APIs. - MANAGED = 2; - } - - // Immutable. Relative name of the cloud resource that contains the data - // that is being managed within a lake. For example: - // `projects/{project_number}/buckets/{bucket_id}` - // `projects/{project_number}/datasets/{dataset_id}` - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Required. Immutable. Type of resource. - Type type = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. Determines how read permissions are handled for each asset and - // their associated tables. Only available to storage buckets assets. - AccessMode read_access_mode = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Status of the resource referenced by an asset. - message ResourceStatus { - // The state of a resource. - enum State { - // State unspecified. - STATE_UNSPECIFIED = 0; - - // Resource does not have any errors. - READY = 1; - - // Resource has errors. - ERROR = 2; - } - - // The current state of the managed resource. - State state = 1; - - // Additional information about the current state. - string message = 2; - - // Last update time of the status. - google.protobuf.Timestamp update_time = 3; - - // Output only. Service account associated with the BigQuery Connection. - string managed_access_identity = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Status of discovery for an asset. - message DiscoveryStatus { - // Current state of discovery. - enum State { - // State is unspecified. - STATE_UNSPECIFIED = 0; - - // Discovery for the asset is scheduled. - SCHEDULED = 1; - - // Discovery for the asset is running. - IN_PROGRESS = 2; - - // Discovery for the asset is currently paused (e.g. due to a lack - // of available resources). It will be automatically resumed. - PAUSED = 3; - - // Discovery for the asset is disabled. - DISABLED = 5; - } - - // The aggregated data statistics for the asset reported by discovery. - message Stats { - // The count of data items within the referenced resource. - int64 data_items = 1; - - // The number of stored data bytes within the referenced resource. - int64 data_size = 2; - - // The count of table entities within the referenced resource. - int64 tables = 3; - - // The count of fileset entities within the referenced resource. - int64 filesets = 4; - } - - // The current status of the discovery feature. - State state = 1; - - // Additional information about the current state. - string message = 2; - - // Last update time of the status. - google.protobuf.Timestamp update_time = 3; - - // The start time of the last discovery run. - google.protobuf.Timestamp last_run_time = 4; - - // Data Stats of the asset reported by discovery. - Stats stats = 6; - - // The duration of the last discovery run. - google.protobuf.Duration last_run_duration = 7; - } - - // Output only. The relative resource name of the asset, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } - ]; - - // Optional. User friendly display name. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. System generated globally unique ID for the asset. This ID - // will be different if the asset is deleted and re-created with the same - // name. - string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the asset was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the asset was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User defined labels for the asset. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the asset. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the asset. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Specification of the resource that is referenced by this asset. - ResourceSpec resource_spec = 100 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Status of the resource referenced by this asset. - ResourceStatus resource_status = 101 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Status of the security policy applied to resource referenced - // by this asset. - SecurityStatus security_status = 103 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Specification of the discovery feature applied to data referenced - // by this asset. When this spec is left unset, the asset will use the spec - // set on the parent zone. - DiscoverySpec discovery_spec = 106 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Status of the discovery feature applied to data referenced by - // this asset. - DiscoveryStatus discovery_status = 107 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// State of a resource. -enum State { - // State is not specified. - STATE_UNSPECIFIED = 0; - - // Resource is active, i.e., ready to use. - ACTIVE = 1; - - // Resource is under creation. - CREATING = 2; - - // Resource is under deletion. - DELETING = 3; - - // Resource is active but has unresolved actions. - ACTION_REQUIRED = 4; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto deleted file mode 100644 index 18111f0f21b..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/security.proto +++ /dev/null @@ -1,53 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "SecurityProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// ResourceAccessSpec holds the access control configuration to be enforced -// on the resources, for example, Cloud Storage bucket, BigQuery dataset, -// BigQuery table. -message ResourceAccessSpec { - // Optional. The format of strings follows the pattern followed by IAM in the - // bindings. user:{email}, serviceAccount:{email} group:{email}. - // The set of principals to be granted reader role on the resource. - repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The set of principals to be granted writer role on the resource. - repeated string writers = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The set of principals to be granted owner role on the resource. - repeated string owners = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// DataAccessSpec holds the access control configuration to be enforced on data -// stored within resources (eg: rows, columns in BigQuery Tables). When -// associated with data, the data is only accessible to -// principals explicitly granted access through the DataAccessSpec. Principals -// with access to the containing resource are not implicitly granted access. -message DataAccessSpec { - // Optional. The format of strings follows the pattern followed by IAM in the - // bindings. user:{email}, serviceAccount:{email} group:{email}. - // The set of principals to be granted reader role on data - // stored within resources. - repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto deleted file mode 100644 index a58f817b7f4..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/service.proto +++ /dev/null @@ -1,1120 +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.dataplex.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/dataplex/v1/analyze.proto"; -import "google/cloud/dataplex/v1/resources.proto"; -import "google/cloud/dataplex/v1/tasks.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "ServiceProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// Dataplex service provides data lakes as a service. The primary resources -// offered by this service are Lakes, Zones and Assets which collectively allow -// a data administrator to organize, manage, secure and catalog data across -// their organization located across cloud projects in a variety of storage -// systems including Cloud Storage and BigQuery. -service DataplexService { - option (google.api.default_host) = "dataplex.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a lake resource. - rpc CreateLake(CreateLakeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/lakes" - body: "lake" - }; - option (google.api.method_signature) = "parent,lake,lake_id"; - option (google.longrunning.operation_info) = { - response_type: "Lake" - metadata_type: "OperationMetadata" - }; - } - - // Updates a lake resource. - rpc UpdateLake(UpdateLakeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{lake.name=projects/*/locations/*/lakes/*}" - body: "lake" - }; - option (google.api.method_signature) = "lake,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Lake" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a lake resource. All zones within the lake must be deleted before - // the lake can be deleted. - rpc DeleteLake(DeleteLakeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists lake resources in a project and location. - rpc ListLakes(ListLakesRequest) returns (ListLakesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/lakes" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a lake resource. - rpc GetLake(GetLakeRequest) returns (Lake) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists action resources in a lake. - rpc ListLakeActions(ListLakeActionsRequest) returns (ListActionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/actions" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a zone resource within a lake. - rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" - body: "zone" - }; - option (google.api.method_signature) = "parent,zone,zone_id"; - option (google.longrunning.operation_info) = { - response_type: "Zone" - metadata_type: "OperationMetadata" - }; - } - - // Updates a zone resource. - rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}" - body: "zone" - }; - option (google.api.method_signature) = "zone,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Zone" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a zone resource. All assets within a zone must be deleted before - // the zone can be deleted. - rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists zone resources in a lake. - rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/zones" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a zone resource. - rpc GetZone(GetZoneRequest) returns (Zone) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists action resources in a zone. - rpc ListZoneActions(ListZoneActionsRequest) returns (ListActionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an asset resource. - rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" - body: "asset" - }; - option (google.api.method_signature) = "parent,asset,asset_id"; - option (google.longrunning.operation_info) = { - response_type: "Asset" - metadata_type: "OperationMetadata" - }; - } - - // Updates an asset resource. - rpc UpdateAsset(UpdateAssetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - body: "asset" - }; - option (google.api.method_signature) = "asset,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Asset" - metadata_type: "OperationMetadata" - }; - } - - // Deletes an asset resource. The referenced storage resource is detached - // (default) or deleted based on the associated Lifecycle policy. - rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists asset resources in a zone. - rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves an asset resource. - rpc GetAsset(GetAssetRequest) returns (Asset) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists action resources in an asset. - rpc ListAssetActions(ListAssetActionsRequest) returns (ListActionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a task resource within a lake. - rpc CreateTask(CreateTaskRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" - body: "task" - }; - option (google.api.method_signature) = "parent,task,task_id"; - option (google.longrunning.operation_info) = { - response_type: "Task" - metadata_type: "OperationMetadata" - }; - } - - // Update the task resource. - rpc UpdateTask(UpdateTaskRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}" - body: "task" - }; - option (google.api.method_signature) = "task,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Task" - metadata_type: "OperationMetadata" - }; - } - - // Delete the task resource. - rpc DeleteTask(DeleteTaskRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists tasks under the given lake. - rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" - }; - option (google.api.method_signature) = "parent"; - } - - // Get task resource. - rpc GetTask(GetTaskRequest) returns (Task) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Jobs under the given task. - rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" - }; - option (google.api.method_signature) = "parent"; - } - - // Run an on demand execution of a Task. - rpc RunTask(RunTaskRequest) returns (RunTaskResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Get job resource. - rpc GetJob(GetJobRequest) returns (Job) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Cancel jobs running for the task resource. - rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Create an environment resource. - rpc CreateEnvironment(CreateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" - body: "environment" - }; - option (google.api.method_signature) = "parent,environment,environment_id"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "OperationMetadata" - }; - } - - // Update the environment resource. - rpc UpdateEnvironment(UpdateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}" - body: "environment" - }; - option (google.api.method_signature) = "environment,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "OperationMetadata" - }; - } - - // Delete the environment resource. All the child resources must have been - // deleted before environment deletion can be initiated. - rpc DeleteEnvironment(DeleteEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists environments under the given lake. - rpc ListEnvironments(ListEnvironmentsRequest) - returns (ListEnvironmentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*}/environments" - }; - option (google.api.method_signature) = "parent"; - } - - // Get environment resource. - rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists session resources in an environment. - rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Create lake request. -message CreateLakeRequest { - // Required. The resource name of the lake location, of the form: - // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Lake identifier. - // This ID will be used to generate names such as database and dataset names - // when publishing metadata to Hive Metastore and BigQuery. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must end with a number or a letter. - // * Must be between 1-63 characters. - // * Must be unique within the customer project / location. - string lake_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Lake resource - Lake lake = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update lake request. -message UpdateLakeRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Lake lake = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete lake request. -message DeleteLakeRequest { - // Required. The resource name of the lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; -} - -// List lakes request. -message ListLakesRequest { - // Required. The resource name of the lake location, of the form: - // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a GCP region. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Maximum number of Lakes to return. The service may return fewer - // than this value. If unspecified, at most 10 lakes will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListLakes` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListLakes` must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List lakes response. -message ListLakesResponse { - // Lakes under the given parent location. - repeated Lake lakes = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable_locations = 3; -} - -// List lake actions request. -message ListLakeActionsRequest { - // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. Maximum number of actions to return. The service may return fewer - // than this value. If unspecified, at most 10 actions will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListLakeActions` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListLakeActions` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// List actions response. -message ListActionsResponse { - // Actions under the given parent lake/zone/asset. - repeated Action actions = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Get lake request. -message GetLakeRequest { - // Required. The resource name of the lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; -} - -// Create zone request. -message CreateZoneRequest { - // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Required. Zone identifier. - // This ID will be used to generate names such as database and dataset names - // when publishing metadata to Hive Metastore and BigQuery. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must end with a number or a letter. - // * Must be between 1-63 characters. - // * Must be unique across all lakes from all locations in a project. - // * Must not be one of the reserved IDs (i.e. "default", "global-temp") - string zone_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Zone resource. - Zone zone = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update zone request. -message UpdateZoneRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Zone zone = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete zone request. -message DeleteZoneRequest { - // Required. The resource name of the zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; -} - -// List zones request. -message ListZonesRequest { - // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. Maximum number of zones to return. The service may return fewer - // than this value. If unspecified, at most 10 zones will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListZones` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListZones` must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List zones response. -message ListZonesResponse { - // Zones under the given parent lake. - repeated Zone zones = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// List zone actions request. -message ListZoneActionsRequest { - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Optional. Maximum number of actions to return. The service may return fewer - // than this value. If unspecified, at most 10 actions will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListZoneActions` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListZoneActions` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get zone request. -message GetZoneRequest { - // Required. The resource name of the zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; -} - -// Create asset request. -message CreateAssetRequest { - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Required. Asset identifier. - // This ID will be used to generate names such as table names when publishing - // metadata to Hive Metastore and BigQuery. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must end with a number or a letter. - // * Must be between 1-63 characters. - // * Must be unique within the zone. - string asset_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Asset resource. - Asset asset = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update asset request. -message UpdateAssetRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Asset asset = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete asset request. -message DeleteAssetRequest { - // Required. The resource name of the asset: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } - ]; -} - -// List assets request. -message ListAssetsRequest { - // Required. The resource name of the parent zone: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } - ]; - - // Optional. Maximum number of asset to return. The service may return fewer - // than this value. If unspecified, at most 10 assets will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListAssets` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListAssets` must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List assets response. -message ListAssetsResponse { - // Asset under the given parent zone. - repeated Asset assets = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// List asset actions request. -message ListAssetActionsRequest { - // Required. The resource name of the parent asset: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } - ]; - - // Optional. Maximum number of actions to return. The service may return fewer - // than this value. If unspecified, at most 10 actions will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListAssetActions` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListAssetActions` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Get asset request. -message GetAssetRequest { - // Required. The resource name of the asset: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } - ]; -} - -// Represents the metadata of a long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the user has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Create task request. -message CreateTaskRequest { - // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Required. Task identifier. - string task_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Task resource. - Task task = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update task request. -message UpdateTaskRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Task task = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete task request. -message DeleteTaskRequest { - // Required. The resource name of the task: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } - ]; -} - -// List tasks request. -message ListTasksRequest { - // Required. The resource name of the parent lake: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. Maximum number of tasks to return. The service may return fewer - // than this value. If unspecified, at most 10 tasks will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListZones` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListZones` must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List tasks response. -message ListTasksResponse { - // Tasks under the given parent lake. - repeated Task tasks = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable_locations = 3; -} - -// Get task request. -message GetTaskRequest { - // Required. The resource name of the task: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } - ]; -} - -// Get job request. -message GetJobRequest { - // Required. The resource name of the job: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } - ]; -} - -message RunTaskRequest { - // Required. The resource name of the task: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } - ]; - - // Optional. User-defined labels for the task. If the map is left empty, the - // task will run with existing labels from task definition. If the map - // contains an entry with a new key, the same will be added to existing set of - // labels. If the map contains an entry with an existing label key in task - // definition, the task will run with new label value for that entry. Clearing - // an existing label will require label value to be explicitly set to a hyphen - // "-". The label value cannot be empty. - map labels = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Execution spec arguments. If the map is left empty, the task will - // run with existing execution spec args from task definition. If the map - // contains an entry with a new key, the same will be added to existing set of - // args. If the map contains an entry with an existing arg key in task - // definition, the task will run with new arg value for that entry. Clearing - // an existing arg will require arg value to be explicitly set to a hyphen - // "-". The arg value cannot be empty. - map args = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message RunTaskResponse { - // Jobs created by RunTask API. - Job job = 1; -} - -// List jobs request. -message ListJobsRequest { - // Required. The resource name of the parent environment: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } - ]; - - // Optional. Maximum number of jobs to return. The service may return fewer - // than this value. If unspecified, at most 10 jobs will be returned. The - // maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListJobs` call. Provide this - // to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListJobs` must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// List jobs response. -message ListJobsResponse { - // Jobs under a given task. - repeated Job jobs = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Cancel task jobs. -message CancelJobRequest { - // Required. The resource name of the job: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } - ]; -} - -// Create environment request. -message CreateEnvironmentRequest { - // Required. The resource name of the parent lake: - // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Required. Environment identifier. - // * Must contain only lowercase letters, numbers and hyphens. - // * Must start with a letter. - // * Must be between 1-63 characters. - // * Must end with a number or a letter. - // * Must be unique within the lake. - string environment_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Environment resource. - Environment environment = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update environment request. -message UpdateEnvironmentRequest { - // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Update description. - // Only fields specified in `update_mask` are updated. - Environment environment = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is false. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete environment request. -message DeleteEnvironmentRequest { - // Required. The resource name of the environment: - // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Environment" - } - ]; -} - -// List environments request. -message ListEnvironmentsRequest { - // Required. The resource name of the parent lake: - // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } - ]; - - // Optional. Maximum number of environments to return. The service may return - // fewer than this value. If unspecified, at most 10 environments will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListEnvironments` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListEnvironments` must match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Order by fields for the result. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// List environments response. -message ListEnvironmentsResponse { - // Environments under the given parent lake. - repeated Environment environments = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Get environment request. -message GetEnvironmentRequest { - // Required. The resource name of the environment: - // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Environment" - } - ]; -} - -// List sessions request. -message ListSessionsRequest { - // Required. The resource name of the parent environment: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataplex.googleapis.com/Environment" - } - ]; - - // Optional. Maximum number of sessions to return. The service may return - // fewer than this value. If unspecified, at most 10 sessions will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token received from a previous `ListSessions` call. Provide - // this to retrieve the subsequent page. When paginating, all other parameters - // provided to `ListSessions` must match the call that provided the page - // token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter request. The following `mode` filter is supported to - // return only the sessions belonging to the requester when the mode is USER - // and return sessions of all the users when the mode is ADMIN. When no filter - // is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - // should have `dataplex.environments.listAllSessions` permission to list all - // sessions, in absence of the permission, the request fails. - // - // mode = ADMIN | USER - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// List sessions response. -message ListSessionsResponse { - // Sessions under a given environment. - repeated Session sessions = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto b/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto deleted file mode 100644 index 65ab0d15583..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/tasks.proto +++ /dev/null @@ -1,422 +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.dataplex.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataplex/v1/resources.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; -option java_multiple_files = true; -option java_outer_classname = "TasksProto"; -option java_package = "com.google.cloud.dataplex.v1"; - -// A task represents a user-visible job. -message Task { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Task" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" - }; - - // Configuration for the underlying infrastructure used to run workloads. - message InfrastructureSpec { - // Batch compute resources associated with the task. - message BatchComputeResources { - // Optional. Total number of job executors. - // Executor Count should be between 2 and 100. [Default=2] - int32 executors_count = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Max configurable executors. - // If max_executors_count > executors_count, then auto-scaling is enabled. - // Max Executor Count should be between 2 and 1000. [Default=1000] - int32 max_executors_count = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Container Image Runtime Configuration used with Batch execution. - message ContainerImageRuntime { - // Optional. Container image to use. - string image = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of Java JARS to add to the classpath. - // Valid input includes Cloud Storage URIs to Jar binaries. - // For example, gs://bucket-name/my/path/to/file.jar - repeated string java_jars = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of python packages to be installed. - // Valid formats include Cloud Storage URI to a PIP installable library. - // For example, gs://bucket-name/my/path/to/lib.tar.gz - repeated string python_packages = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Override to common configuration of open source components - // installed on the Dataproc cluster. The properties to set on daemon - // config files. Property keys are specified in `prefix:property` format, - // for example `core:hadoop.tmp.dir`. For more information, see [Cluster - // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - map properties = 4 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Cloud VPC Network used to run the infrastructure. - message VpcNetwork { - // The Cloud VPC network identifier. - oneof network_name { - // Optional. The Cloud VPC network in which the job is run. By default, - // the Cloud VPC network named Default within the project is used. - string network = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud VPC sub-network in which the job is run. - string sub_network = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. List of network tags to apply to the job. - repeated string network_tags = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Hardware config. - oneof resources { - // Compute resources needed for a Task when using Dataproc Serverless. - BatchComputeResources batch = 52; - } - - // Software config. - oneof runtime { - // Container Image Runtime Configuration. - ContainerImageRuntime container_image = 101; - } - - // Networking config. - oneof network { - // Vpc network. - VpcNetwork vpc_network = 150; - } - } - - // Task scheduling and trigger settings. - message TriggerSpec { - // Determines how often and when the job will run. - enum Type { - // Unspecified trigger type. - TYPE_UNSPECIFIED = 0; - - // The task runs one-time shortly after Task Creation. - ON_DEMAND = 1; - - // The task is scheduled to run periodically. - RECURRING = 2; - } - - // Required. Immutable. Trigger type of the user-specified Task. - Type type = 5 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Optional. The first run of the task will be after this time. - // If not specified, the task will run shortly after being submitted if - // ON_DEMAND and based on the schedule if RECURRING. - google.protobuf.Timestamp start_time = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Prevent the task from executing. - // This does not cancel already running tasks. It is intended to temporarily - // disable RECURRING tasks. - bool disabled = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Number of retry attempts before aborting. - // Set to zero to never attempt to retry a failed task. - int32 max_retries = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Trigger only applies for RECURRING tasks. - oneof trigger { - // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - // running tasks periodically. To explicitly set a timezone to the cron - // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - // "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - // string from IANA time zone database. For example, - // `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - // *`. This field is required for RECURRING tasks. - string schedule = 100 [(google.api.field_behavior) = OPTIONAL]; - } - } - - // Execution related settings, like retry and service_account. - message ExecutionSpec { - // Optional. The arguments to pass to the task. - // The args can use placeholders of the format ${placeholder} as - // part of key/value string. These will be interpolated before passing the - // args to the driver. Currently supported placeholders: - // - ${task_id} - // - ${job_time} - // To pass positional args, set the key as TASK_ARGS. The value should be a - // comma-separated string of all the positional arguments. To use a - // delimiter other than comma, refer to - // https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - // other keys being present in the args, then TASK_ARGS will be passed as - // the last argument. - map args = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Service account to use to execute a task. - // If not provided, the default Compute service account for the project is - // used. - string service_account = 5 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The project in which jobs are run. By default, the project - // containing the Lake is used. If a project is provided, the - // [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - // must belong to this project. - string project = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum duration after which the job execution is expired. - google.protobuf.Duration max_job_execution_lifetime = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud KMS key to use for encryption, of the form: - // `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - string kms_key = 9 [(google.api.field_behavior) = OPTIONAL]; - } - - // User-specified config for running a Spark task. - message SparkTaskConfig { - // Required. The specification of the main method to call to drive the - // job. Specify either the jar file that contains the main class or the - // main class name. - oneof driver { - // The Cloud Storage URI of the jar file that contains the main class. - // The execution args are passed in as a sequence of named process - // arguments (`--key=value`). - string main_jar_file_uri = 100; - - // The name of the driver's main class. The jar file that contains the - // class must be in the default CLASSPATH or specified in - // `jar_file_uris`. - // The execution args are passed in as a sequence of named process - // arguments (`--key=value`). - string main_class = 101; - - // The Gcloud Storage URI of the main Python file to use as the driver. - // Must be a .py file. The execution args are passed in as a sequence of - // named process arguments (`--key=value`). - string python_script_file = 102; - - // A reference to a query file. This should be the Cloud Storage URI of - // the query file. The execution args are used to declare a set of script - // variables (`set key="value";`). - string sql_script_file = 104; - - // The query text. - // The execution args are used to declare a set of script variables - // (`set key="value";`). - string sql_script = 105; - } - - // Optional. Cloud Storage URIs of files to be placed in the working - // directory of each executor. - repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage URIs of archives to be extracted into the working - // directory of each executor. Supported file types: .jar, .tar, .tar.gz, - // .tgz, and .zip. - repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Infrastructure specification for the execution. - InfrastructureSpec infrastructure_spec = 6 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Config for running scheduled notebooks. - message NotebookTaskConfig { - // Required. Path to input notebook. This can be the Cloud Storage URI of - // the notebook file or the path to a Notebook Content. The execution args - // are accessible as environment variables - // (`TASK_key=value`). - string notebook = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Infrastructure specification for the execution. - InfrastructureSpec infrastructure_spec = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage URIs of files to be placed in the working - // directory of each executor. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage URIs of archives to be extracted into the working - // directory of each executor. Supported file types: .jar, .tar, .tar.gz, - // .tgz, and .zip. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Status of the task execution (e.g. Jobs). - message ExecutionStatus { - // Output only. Last update time of the status. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. latest job execution - Job latest_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. The relative resource name of the task, of the form: - // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - // tasks/{task_id}. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } - ]; - - // Output only. System generated globally unique ID for the task. This ID will - // be different if the task is deleted and re-created with the same name. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the task was created. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the task was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the task. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User friendly display name. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Current state of the task. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined labels for the task. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Spec related to how often and when a task should be triggered. - TriggerSpec trigger_spec = 100 [(google.api.field_behavior) = REQUIRED]; - - // Required. Spec related to how a task is executed. - ExecutionSpec execution_spec = 101 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Status of the latest task executions. - ExecutionStatus execution_status = 201 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Task template specific user-specified config. - oneof config { - // Config related to running custom Spark tasks. - SparkTaskConfig spark = 300; - - // Config related to running scheduled Notebooks. - NotebookTaskConfig notebook = 302; - } -} - -// A job represents an instance of a task. -message Job { - option (google.api.resource) = { - type: "dataplex.googleapis.com/Job" - pattern: "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" - }; - - enum Service { - // Service used to run the job is unspecified. - SERVICE_UNSPECIFIED = 0; - - // Dataproc service is used to run this job. - DATAPROC = 1; - } - - enum State { - // The job state is unknown. - STATE_UNSPECIFIED = 0; - - // The job is running. - RUNNING = 1; - - // The job is cancelling. - CANCELLING = 2; - - // The job cancellation was successful. - CANCELLED = 3; - - // The job completed successfully. - SUCCEEDED = 4; - - // The job is no longer running due to an error. - FAILED = 5; - - // The job was cancelled outside of Dataplex. - ABORTED = 6; - } - - // Job execution trigger. - enum Trigger { - // The trigger is unspecified. - TRIGGER_UNSPECIFIED = 0; - - // The job was triggered by Dataplex based on trigger spec from task - // definition. - TASK_CONFIG = 1; - - // The job was triggered by the explicit call of Task API. - RUN_REQUEST = 2; - } - - // Output only. The relative resource name of the job, of the form: - // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" } - ]; - - // Output only. System generated globally unique ID for the job. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the job was started. - google.protobuf.Timestamp start_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the job ended. - google.protobuf.Timestamp end_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Execution state for the job. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of times the job has been retried (excluding the - // initial attempt). - uint32 retry_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The underlying service running a job. - Service service = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The full resource name for the job run under a particular - // service. - string service_job = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the current state. - string message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. User-defined labels for the task. - map labels = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Job execution trigger. - Trigger trigger = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Spec related to how a task is executed. - Task.ExecutionSpec execution_spec = 100 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts deleted file mode 100644 index 2cac078582e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.d.ts +++ /dev/null @@ -1,45377 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace dataplex. */ - namespace dataplex { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an Environment. */ - interface IEnvironment { - - /** Environment name */ - name?: (string|null); - - /** Environment displayName */ - displayName?: (string|null); - - /** Environment uid */ - uid?: (string|null); - - /** Environment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels */ - labels?: ({ [k: string]: string }|null); - - /** Environment description */ - description?: (string|null); - - /** Environment state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - - /** Environment infrastructureSpec */ - infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); - - /** Environment sessionSpec */ - sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); - - /** Environment sessionStatus */ - sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); - - /** Environment endpoints */ - endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); - } - - /** Represents an Environment. */ - class Environment implements IEnvironment { - - /** - * Constructs a new Environment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEnvironment); - - /** Environment name. */ - public name: string; - - /** Environment displayName. */ - public displayName: string; - - /** Environment uid. */ - public uid: string; - - /** Environment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels. */ - public labels: { [k: string]: string }; - - /** Environment description. */ - public description: string; - - /** Environment state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** Environment infrastructureSpec. */ - public infrastructureSpec?: (google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null); - - /** Environment sessionSpec. */ - public sessionSpec?: (google.cloud.dataplex.v1.Environment.ISessionSpec|null); - - /** Environment sessionStatus. */ - public sessionStatus?: (google.cloud.dataplex.v1.Environment.ISessionStatus|null); - - /** Environment endpoints. */ - public endpoints?: (google.cloud.dataplex.v1.Environment.IEndpoints|null); - - /** - * Creates a new Environment instance using the specified properties. - * @param [properties] Properties to set - * @returns Environment instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEnvironment): google.cloud.dataplex.v1.Environment; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment; - - /** - * Verifies an Environment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Environment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @param message Environment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Environment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Environment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Environment { - - /** Properties of an InfrastructureSpec. */ - interface IInfrastructureSpec { - - /** InfrastructureSpec compute */ - compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); - - /** InfrastructureSpec osImage */ - osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); - } - - /** Represents an InfrastructureSpec. */ - class InfrastructureSpec implements IInfrastructureSpec { - - /** - * Constructs a new InfrastructureSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec); - - /** InfrastructureSpec compute. */ - public compute?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null); - - /** InfrastructureSpec osImage. */ - public osImage?: (google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null); - - /** InfrastructureSpec resources. */ - public resources?: "compute"; - - /** InfrastructureSpec runtime. */ - public runtime?: "osImage"; - - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns InfrastructureSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.IInfrastructureSpec): google.cloud.dataplex.v1.Environment.InfrastructureSpec; - - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec; - - /** - * Verifies an InfrastructureSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InfrastructureSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec; - - /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @param message InfrastructureSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InfrastructureSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InfrastructureSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace InfrastructureSpec { - - /** Properties of a ComputeResources. */ - interface IComputeResources { - - /** ComputeResources diskSizeGb */ - diskSizeGb?: (number|null); - - /** ComputeResources nodeCount */ - nodeCount?: (number|null); - - /** ComputeResources maxNodeCount */ - maxNodeCount?: (number|null); - } - - /** Represents a ComputeResources. */ - class ComputeResources implements IComputeResources { - - /** - * Constructs a new ComputeResources. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources); - - /** ComputeResources diskSizeGb. */ - public diskSizeGb: number; - - /** ComputeResources nodeCount. */ - public nodeCount: number; - - /** ComputeResources maxNodeCount. */ - public maxNodeCount: number; - - /** - * Creates a new ComputeResources instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeResources instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - - /** - * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. - * @param message ComputeResources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. - * @param message ComputeResources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeResources message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - - /** - * Decodes a ComputeResources message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - - /** - * Verifies a ComputeResources message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeResources - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources; - - /** - * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. - * @param message ComputeResources - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeResources to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeResources - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OsImageRuntime. */ - interface IOsImageRuntime { - - /** OsImageRuntime imageVersion */ - imageVersion?: (string|null); - - /** OsImageRuntime javaLibraries */ - javaLibraries?: (string[]|null); - - /** OsImageRuntime pythonPackages */ - pythonPackages?: (string[]|null); - - /** OsImageRuntime properties */ - properties?: ({ [k: string]: string }|null); - } - - /** Represents an OsImageRuntime. */ - class OsImageRuntime implements IOsImageRuntime { - - /** - * Constructs a new OsImageRuntime. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime); - - /** OsImageRuntime imageVersion. */ - public imageVersion: string; - - /** OsImageRuntime javaLibraries. */ - public javaLibraries: string[]; - - /** OsImageRuntime pythonPackages. */ - public pythonPackages: string[]; - - /** OsImageRuntime properties. */ - public properties: { [k: string]: string }; - - /** - * Creates a new OsImageRuntime instance using the specified properties. - * @param [properties] Properties to set - * @returns OsImageRuntime instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; - - /** - * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. - * @param message OsImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. - * @param message OsImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OsImageRuntime message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OsImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; - - /** - * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OsImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; - - /** - * Verifies an OsImageRuntime message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OsImageRuntime - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime; - - /** - * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. - * @param message OsImageRuntime - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OsImageRuntime to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OsImageRuntime - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SessionSpec. */ - interface ISessionSpec { - - /** SessionSpec maxIdleDuration */ - maxIdleDuration?: (google.protobuf.IDuration|null); - - /** SessionSpec enableFastStartup */ - enableFastStartup?: (boolean|null); - } - - /** Represents a SessionSpec. */ - class SessionSpec implements ISessionSpec { - - /** - * Constructs a new SessionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec); - - /** SessionSpec maxIdleDuration. */ - public maxIdleDuration?: (google.protobuf.IDuration|null); - - /** SessionSpec enableFastStartup. */ - public enableFastStartup: boolean; - - /** - * Creates a new SessionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionSpec): google.cloud.dataplex.v1.Environment.SessionSpec; - - /** - * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. - * @param message SessionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. - * @param message SessionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionSpec; - - /** - * Decodes a SessionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionSpec; - - /** - * Verifies a SessionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionSpec; - - /** - * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. - * @param message SessionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.SessionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SessionStatus. */ - interface ISessionStatus { - - /** SessionStatus active */ - active?: (boolean|null); - } - - /** Represents a SessionStatus. */ - class SessionStatus implements ISessionStatus { - - /** - * Constructs a new SessionStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus); - - /** SessionStatus active. */ - public active: boolean; - - /** - * Creates a new SessionStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.ISessionStatus): google.cloud.dataplex.v1.Environment.SessionStatus; - - /** - * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. - * @param message SessionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. - * @param message SessionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.ISessionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.SessionStatus; - - /** - * Decodes a SessionStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.SessionStatus; - - /** - * Verifies a SessionStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.SessionStatus; - - /** - * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. - * @param message SessionStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.SessionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoints. */ - interface IEndpoints { - - /** Endpoints notebooks */ - notebooks?: (string|null); - - /** Endpoints sql */ - sql?: (string|null); - } - - /** Represents an Endpoints. */ - class Endpoints implements IEndpoints { - - /** - * Constructs a new Endpoints. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Environment.IEndpoints); - - /** Endpoints notebooks. */ - public notebooks: string; - - /** Endpoints sql. */ - public sql: string; - - /** - * Creates a new Endpoints instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoints instance - */ - public static create(properties?: google.cloud.dataplex.v1.Environment.IEndpoints): google.cloud.dataplex.v1.Environment.Endpoints; - - /** - * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. - * @param message Endpoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. - * @param message Endpoints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Environment.IEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Environment.Endpoints; - - /** - * Decodes an Endpoints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Environment.Endpoints; - - /** - * Verifies an Endpoints message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoints - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Environment.Endpoints; - - /** - * Creates a plain object from an Endpoints message. Also converts values to other types if specified. - * @param message Endpoints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Environment.Endpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Content. */ - interface IContent { - - /** Content name */ - name?: (string|null); - - /** Content uid */ - uid?: (string|null); - - /** Content path */ - path?: (string|null); - - /** Content createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Content updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Content labels */ - labels?: ({ [k: string]: string }|null); - - /** Content description */ - description?: (string|null); - - /** Content dataText */ - dataText?: (string|null); - - /** Content sqlScript */ - sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); - - /** Content notebook */ - notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); - } - - /** Represents a Content. */ - class Content implements IContent { - - /** - * Constructs a new Content. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IContent); - - /** Content name. */ - public name: string; - - /** Content uid. */ - public uid: string; - - /** Content path. */ - public path: string; - - /** Content createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Content updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Content labels. */ - public labels: { [k: string]: string }; - - /** Content description. */ - public description: string; - - /** Content dataText. */ - public dataText?: (string|null); - - /** Content sqlScript. */ - public sqlScript?: (google.cloud.dataplex.v1.Content.ISqlScript|null); - - /** Content notebook. */ - public notebook?: (google.cloud.dataplex.v1.Content.INotebook|null); - - /** Content data. */ - public data?: "dataText"; - - /** Content content. */ - public content?: ("sqlScript"|"notebook"); - - /** - * Creates a new Content instance using the specified properties. - * @param [properties] Properties to set - * @returns Content instance - */ - public static create(properties?: google.cloud.dataplex.v1.IContent): google.cloud.dataplex.v1.Content; - - /** - * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. - * @param message Content message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. - * @param message Content message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Content message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content; - - /** - * Decodes a Content message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content; - - /** - * Verifies a Content message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Content - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content; - - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @param message Content - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Content to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Content - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Content { - - /** Properties of a SqlScript. */ - interface ISqlScript { - - /** SqlScript engine */ - engine?: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null); - } - - /** Represents a SqlScript. */ - class SqlScript implements ISqlScript { - - /** - * Constructs a new SqlScript. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Content.ISqlScript); - - /** SqlScript engine. */ - public engine: (google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|keyof typeof google.cloud.dataplex.v1.Content.SqlScript.QueryEngine); - - /** - * Creates a new SqlScript instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlScript instance - */ - public static create(properties?: google.cloud.dataplex.v1.Content.ISqlScript): google.cloud.dataplex.v1.Content.SqlScript; - - /** - * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. - * @param message SqlScript message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. - * @param message SqlScript message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Content.ISqlScript, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlScript message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlScript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.SqlScript; - - /** - * Decodes a SqlScript message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlScript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.SqlScript; - - /** - * Verifies a SqlScript message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlScript - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.SqlScript; - - /** - * Creates a plain object from a SqlScript message. Also converts values to other types if specified. - * @param message SqlScript - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Content.SqlScript, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlScript to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlScript - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SqlScript { - - /** QueryEngine enum. */ - enum QueryEngine { - QUERY_ENGINE_UNSPECIFIED = 0, - SPARK = 2 - } - } - - /** Properties of a Notebook. */ - interface INotebook { - - /** Notebook kernelType */ - kernelType?: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType|null); - } - - /** Represents a Notebook. */ - class Notebook implements INotebook { - - /** - * Constructs a new Notebook. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Content.INotebook); - - /** Notebook kernelType. */ - public kernelType: (google.cloud.dataplex.v1.Content.Notebook.KernelType|keyof typeof google.cloud.dataplex.v1.Content.Notebook.KernelType); - - /** - * Creates a new Notebook instance using the specified properties. - * @param [properties] Properties to set - * @returns Notebook instance - */ - public static create(properties?: google.cloud.dataplex.v1.Content.INotebook): google.cloud.dataplex.v1.Content.Notebook; - - /** - * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. - * @param message Notebook message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. - * @param message Notebook message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Content.INotebook, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Notebook message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Content.Notebook; - - /** - * Decodes a Notebook message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Content.Notebook; - - /** - * Verifies a Notebook message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Notebook message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Notebook - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Content.Notebook; - - /** - * Creates a plain object from a Notebook message. Also converts values to other types if specified. - * @param message Notebook - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Content.Notebook, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Notebook to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Notebook - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Notebook { - - /** KernelType enum. */ - enum KernelType { - KERNEL_TYPE_UNSPECIFIED = 0, - PYTHON3 = 1 - } - } - } - - /** Properties of a Session. */ - interface ISession { - - /** Session name */ - name?: (string|null); - - /** Session userId */ - userId?: (string|null); - - /** Session createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Session state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - } - - /** Represents a Session. */ - class Session implements ISession { - - /** - * Constructs a new Session. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISession); - - /** Session name. */ - public name: string; - - /** Session userId. */ - public userId: string; - - /** Session createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Session state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** - * Creates a new Session instance using the specified properties. - * @param [properties] Properties to set - * @returns Session instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISession): google.cloud.dataplex.v1.Session; - - /** - * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. - * @param message Session message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. - * @param message Session message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISession, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Session message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Session - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Session; - - /** - * Decodes a Session message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Session - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Session; - - /** - * Verifies a Session message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Session message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Session - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Session; - - /** - * Creates a plain object from a Session message. Also converts values to other types if specified. - * @param message Session - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Session, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Session to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Session - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Lake. */ - interface ILake { - - /** Lake name */ - name?: (string|null); - - /** Lake displayName */ - displayName?: (string|null); - - /** Lake uid */ - uid?: (string|null); - - /** Lake createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Lake updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Lake labels */ - labels?: ({ [k: string]: string }|null); - - /** Lake description */ - description?: (string|null); - - /** Lake state */ - state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); - - /** Lake serviceAccount */ - serviceAccount?: (string|null); - - /** Lake metastore */ - metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); - - /** Lake assetStatus */ - assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - - /** Lake metastoreStatus */ - metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); - } - - /** Represents a Lake. */ - class Lake implements ILake { - - /** - * Constructs a new Lake. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ILake); - - /** Lake name. */ - public name: string; - - /** Lake displayName. */ - public displayName: string; - - /** Lake uid. */ - public uid: string; - - /** Lake createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Lake updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Lake labels. */ - public labels: { [k: string]: string }; - - /** Lake description. */ - public description: string; - - /** Lake state. */ - public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); - - /** Lake serviceAccount. */ - public serviceAccount: string; - - /** Lake metastore. */ - public metastore?: (google.cloud.dataplex.v1.Lake.IMetastore|null); - - /** Lake assetStatus. */ - public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - - /** Lake metastoreStatus. */ - public metastoreStatus?: (google.cloud.dataplex.v1.Lake.IMetastoreStatus|null); - - /** - * Creates a new Lake instance using the specified properties. - * @param [properties] Properties to set - * @returns Lake instance - */ - public static create(properties?: google.cloud.dataplex.v1.ILake): google.cloud.dataplex.v1.Lake; - - /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @param message Lake message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ILake, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Lake message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Lake - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake; - - /** - * Decodes a Lake message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Lake - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake; - - /** - * Verifies a Lake message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Lake - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake; - - /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. - * @param message Lake - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Lake, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Lake to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Lake - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Lake { - - /** Properties of a Metastore. */ - interface IMetastore { - - /** Metastore service */ - service?: (string|null); - } - - /** Represents a Metastore. */ - class Metastore implements IMetastore { - - /** - * Constructs a new Metastore. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastore); - - /** Metastore service. */ - public service: string; - - /** - * Creates a new Metastore instance using the specified properties. - * @param [properties] Properties to set - * @returns Metastore instance - */ - public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastore): google.cloud.dataplex.v1.Lake.Metastore; - - /** - * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @param message Metastore message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @param message Metastore message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastore, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metastore message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metastore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.Metastore; - - /** - * Decodes a Metastore message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metastore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.Metastore; - - /** - * Verifies a Metastore message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metastore message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metastore - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.Metastore; - - /** - * Creates a plain object from a Metastore message. Also converts values to other types if specified. - * @param message Metastore - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Lake.Metastore, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metastore to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metastore - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetastoreStatus. */ - interface IMetastoreStatus { - - /** MetastoreStatus state */ - state?: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null); - - /** MetastoreStatus message */ - message?: (string|null); - - /** MetastoreStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** MetastoreStatus endpoint */ - endpoint?: (string|null); - } - - /** Represents a MetastoreStatus. */ - class MetastoreStatus implements IMetastoreStatus { - - /** - * Constructs a new MetastoreStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus); - - /** MetastoreStatus state. */ - public state: (google.cloud.dataplex.v1.Lake.MetastoreStatus.State|keyof typeof google.cloud.dataplex.v1.Lake.MetastoreStatus.State); - - /** MetastoreStatus message. */ - public message: string; - - /** MetastoreStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** MetastoreStatus endpoint. */ - public endpoint: string; - - /** - * Creates a new MetastoreStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns MetastoreStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Lake.IMetastoreStatus): google.cloud.dataplex.v1.Lake.MetastoreStatus; - - /** - * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @param message MetastoreStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @param message MetastoreStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Lake.IMetastoreStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetastoreStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetastoreStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Lake.MetastoreStatus; - - /** - * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetastoreStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Lake.MetastoreStatus; - - /** - * Verifies a MetastoreStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetastoreStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Lake.MetastoreStatus; - - /** - * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. - * @param message MetastoreStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Lake.MetastoreStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetastoreStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetastoreStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetastoreStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NONE = 1, - READY = 2, - UPDATING = 3, - ERROR = 4 - } - } - } - - /** Properties of an AssetStatus. */ - interface IAssetStatus { - - /** AssetStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** AssetStatus activeAssets */ - activeAssets?: (number|null); - - /** AssetStatus securityPolicyApplyingAssets */ - securityPolicyApplyingAssets?: (number|null); - } - - /** Represents an AssetStatus. */ - class AssetStatus implements IAssetStatus { - - /** - * Constructs a new AssetStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAssetStatus); - - /** AssetStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** AssetStatus activeAssets. */ - public activeAssets: number; - - /** AssetStatus securityPolicyApplyingAssets. */ - public securityPolicyApplyingAssets: number; - - /** - * Creates a new AssetStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns AssetStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAssetStatus): google.cloud.dataplex.v1.AssetStatus; - - /** - * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @param message AssetStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @param message AssetStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAssetStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssetStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AssetStatus; - - /** - * Decodes an AssetStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AssetStatus; - - /** - * Verifies an AssetStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssetStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AssetStatus; - - /** - * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. - * @param message AssetStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AssetStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssetStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssetStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Zone. */ - interface IZone { - - /** Zone name */ - name?: (string|null); - - /** Zone displayName */ - displayName?: (string|null); - - /** Zone uid */ - uid?: (string|null); - - /** Zone createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Zone updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Zone labels */ - labels?: ({ [k: string]: string }|null); - - /** Zone description */ - description?: (string|null); - - /** Zone state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - - /** Zone type */ - type?: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type|null); - - /** Zone discoverySpec */ - discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); - - /** Zone resourceSpec */ - resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); - - /** Zone assetStatus */ - assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - } - - /** Represents a Zone. */ - class Zone implements IZone { - - /** - * Constructs a new Zone. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IZone); - - /** Zone name. */ - public name: string; - - /** Zone displayName. */ - public displayName: string; - - /** Zone uid. */ - public uid: string; - - /** Zone createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Zone updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Zone labels. */ - public labels: { [k: string]: string }; - - /** Zone description. */ - public description: string; - - /** Zone state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** Zone type. */ - public type: (google.cloud.dataplex.v1.Zone.Type|keyof typeof google.cloud.dataplex.v1.Zone.Type); - - /** Zone discoverySpec. */ - public discoverySpec?: (google.cloud.dataplex.v1.Zone.IDiscoverySpec|null); - - /** Zone resourceSpec. */ - public resourceSpec?: (google.cloud.dataplex.v1.Zone.IResourceSpec|null); - - /** Zone assetStatus. */ - public assetStatus?: (google.cloud.dataplex.v1.IAssetStatus|null); - - /** - * Creates a new Zone instance using the specified properties. - * @param [properties] Properties to set - * @returns Zone instance - */ - public static create(properties?: google.cloud.dataplex.v1.IZone): google.cloud.dataplex.v1.Zone; - - /** - * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @param message Zone message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @param message Zone message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IZone, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Zone message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone; - - /** - * Decodes a Zone message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone; - - /** - * Verifies a Zone message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Zone message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Zone - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone; - - /** - * Creates a plain object from a Zone message. Also converts values to other types if specified. - * @param message Zone - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Zone to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Zone - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Zone { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - RAW = 1, - CURATED = 2 - } - - /** Properties of a ResourceSpec. */ - interface IResourceSpec { - - /** ResourceSpec locationType */ - locationType?: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null); - } - - /** Represents a ResourceSpec. */ - class ResourceSpec implements IResourceSpec { - - /** - * Constructs a new ResourceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec); - - /** ResourceSpec locationType. */ - public locationType: (google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|keyof typeof google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType); - - /** - * Creates a new ResourceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Zone.IResourceSpec): google.cloud.dataplex.v1.Zone.ResourceSpec; - - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.ResourceSpec; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.ResourceSpec; - - /** - * Verifies a ResourceSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.ResourceSpec; - - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @param message ResourceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceSpec { - - /** LocationType enum. */ - enum LocationType { - LOCATION_TYPE_UNSPECIFIED = 0, - SINGLE_REGION = 1, - MULTI_REGION = 2 - } - } - - /** Properties of a DiscoverySpec. */ - interface IDiscoverySpec { - - /** DiscoverySpec enabled */ - enabled?: (boolean|null); - - /** DiscoverySpec includePatterns */ - includePatterns?: (string[]|null); - - /** DiscoverySpec excludePatterns */ - excludePatterns?: (string[]|null); - - /** DiscoverySpec csvOptions */ - csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions */ - jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule */ - schedule?: (string|null); - } - - /** Represents a DiscoverySpec. */ - class DiscoverySpec implements IDiscoverySpec { - - /** - * Constructs a new DiscoverySpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec); - - /** DiscoverySpec enabled. */ - public enabled: boolean; - - /** DiscoverySpec includePatterns. */ - public includePatterns: string[]; - - /** DiscoverySpec excludePatterns. */ - public excludePatterns: string[]; - - /** DiscoverySpec csvOptions. */ - public csvOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions. */ - public jsonOptions?: (google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule. */ - public schedule?: (string|null); - - /** DiscoverySpec trigger. */ - public trigger?: "schedule"; - - /** - * Creates a new DiscoverySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverySpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Zone.IDiscoverySpec): google.cloud.dataplex.v1.Zone.DiscoverySpec; - - /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec; - - /** - * Verifies a DiscoverySpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverySpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec; - - /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @param message DiscoverySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DiscoverySpec { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions headerRows */ - headerRows?: (number|null); - - /** CsvOptions delimiter */ - delimiter?: (string|null); - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } - - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { - - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions); - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions disableTypeInference. */ - public disableTypeInference: boolean; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - - /** - * Verifies a CsvOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); - - /** JsonOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } - - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { - - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** JsonOptions disableTypeInference. */ - public disableTypeInference: boolean; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; - - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of an Action. */ - interface IAction { - - /** Action category */ - category?: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category|null); - - /** Action issue */ - issue?: (string|null); - - /** Action detectTime */ - detectTime?: (google.protobuf.ITimestamp|null); - - /** Action name */ - name?: (string|null); - - /** Action lake */ - lake?: (string|null); - - /** Action zone */ - zone?: (string|null); - - /** Action asset */ - asset?: (string|null); - - /** Action dataLocations */ - dataLocations?: (string[]|null); - - /** Action invalidDataFormat */ - invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); - - /** Action incompatibleDataSchema */ - incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); - - /** Action invalidDataPartition */ - invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); - - /** Action missingData */ - missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); - - /** Action missingResource */ - missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); - - /** Action unauthorizedResource */ - unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); - - /** Action failedSecurityPolicyApply */ - failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); - - /** Action invalidDataOrganization */ - invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); - } - - /** Represents an Action. */ - class Action implements IAction { - - /** - * Constructs a new Action. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAction); - - /** Action category. */ - public category: (google.cloud.dataplex.v1.Action.Category|keyof typeof google.cloud.dataplex.v1.Action.Category); - - /** Action issue. */ - public issue: string; - - /** Action detectTime. */ - public detectTime?: (google.protobuf.ITimestamp|null); - - /** Action name. */ - public name: string; - - /** Action lake. */ - public lake: string; - - /** Action zone. */ - public zone: string; - - /** Action asset. */ - public asset: string; - - /** Action dataLocations. */ - public dataLocations: string[]; - - /** Action invalidDataFormat. */ - public invalidDataFormat?: (google.cloud.dataplex.v1.Action.IInvalidDataFormat|null); - - /** Action incompatibleDataSchema. */ - public incompatibleDataSchema?: (google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null); - - /** Action invalidDataPartition. */ - public invalidDataPartition?: (google.cloud.dataplex.v1.Action.IInvalidDataPartition|null); - - /** Action missingData. */ - public missingData?: (google.cloud.dataplex.v1.Action.IMissingData|null); - - /** Action missingResource. */ - public missingResource?: (google.cloud.dataplex.v1.Action.IMissingResource|null); - - /** Action unauthorizedResource. */ - public unauthorizedResource?: (google.cloud.dataplex.v1.Action.IUnauthorizedResource|null); - - /** Action failedSecurityPolicyApply. */ - public failedSecurityPolicyApply?: (google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null); - - /** Action invalidDataOrganization. */ - public invalidDataOrganization?: (google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null); - - /** Action details. */ - public details?: ("invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"); - - /** - * Creates a new Action instance using the specified properties. - * @param [properties] Properties to set - * @returns Action instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAction): google.cloud.dataplex.v1.Action; - - /** - * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @param message Action message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @param message Action message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Action message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Action - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action; - - /** - * Decodes an Action message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Action - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action; - - /** - * Verifies an Action message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Action message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Action - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action; - - /** - * Creates a plain object from an Action message. Also converts values to other types if specified. - * @param message Action - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Action to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Action - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Action { - - /** Category enum. */ - enum Category { - CATEGORY_UNSPECIFIED = 0, - RESOURCE_MANAGEMENT = 1, - SECURITY_POLICY = 2, - DATA_DISCOVERY = 3 - } - - /** Properties of a MissingResource. */ - interface IMissingResource { - } - - /** Represents a MissingResource. */ - class MissingResource implements IMissingResource { - - /** - * Constructs a new MissingResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IMissingResource); - - /** - * Creates a new MissingResource instance using the specified properties. - * @param [properties] Properties to set - * @returns MissingResource instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IMissingResource): google.cloud.dataplex.v1.Action.MissingResource; - - /** - * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @param message MissingResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @param message MissingResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MissingResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingResource; - - /** - * Decodes a MissingResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingResource; - - /** - * Verifies a MissingResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MissingResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingResource; - - /** - * Creates a plain object from a MissingResource message. Also converts values to other types if specified. - * @param message MissingResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.MissingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MissingResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MissingResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnauthorizedResource. */ - interface IUnauthorizedResource { - } - - /** Represents an UnauthorizedResource. */ - class UnauthorizedResource implements IUnauthorizedResource { - - /** - * Constructs a new UnauthorizedResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource); - - /** - * Creates a new UnauthorizedResource instance using the specified properties. - * @param [properties] Properties to set - * @returns UnauthorizedResource instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IUnauthorizedResource): google.cloud.dataplex.v1.Action.UnauthorizedResource; - - /** - * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @param message UnauthorizedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @param message UnauthorizedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IUnauthorizedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.UnauthorizedResource; - - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.UnauthorizedResource; - - /** - * Verifies an UnauthorizedResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnauthorizedResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.UnauthorizedResource; - - /** - * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. - * @param message UnauthorizedResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.UnauthorizedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnauthorizedResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnauthorizedResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FailedSecurityPolicyApply. */ - interface IFailedSecurityPolicyApply { - - /** FailedSecurityPolicyApply asset */ - asset?: (string|null); - } - - /** Represents a FailedSecurityPolicyApply. */ - class FailedSecurityPolicyApply implements IFailedSecurityPolicyApply { - - /** - * Constructs a new FailedSecurityPolicyApply. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply); - - /** FailedSecurityPolicyApply asset. */ - public asset: string; - - /** - * Creates a new FailedSecurityPolicyApply instance using the specified properties. - * @param [properties] Properties to set - * @returns FailedSecurityPolicyApply instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - - /** - * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @param message FailedSecurityPolicyApply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @param message FailedSecurityPolicyApply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - - /** - * Verifies a FailedSecurityPolicyApply message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FailedSecurityPolicyApply - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply; - - /** - * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. - * @param message FailedSecurityPolicyApply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FailedSecurityPolicyApply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FailedSecurityPolicyApply - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InvalidDataFormat. */ - interface IInvalidDataFormat { - - /** InvalidDataFormat sampledDataLocations */ - sampledDataLocations?: (string[]|null); - - /** InvalidDataFormat expectedFormat */ - expectedFormat?: (string|null); - - /** InvalidDataFormat newFormat */ - newFormat?: (string|null); - } - - /** Represents an InvalidDataFormat. */ - class InvalidDataFormat implements IInvalidDataFormat { - - /** - * Constructs a new InvalidDataFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat); - - /** InvalidDataFormat sampledDataLocations. */ - public sampledDataLocations: string[]; - - /** InvalidDataFormat expectedFormat. */ - public expectedFormat: string; - - /** InvalidDataFormat newFormat. */ - public newFormat: string; - - /** - * Creates a new InvalidDataFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns InvalidDataFormat instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataFormat): google.cloud.dataplex.v1.Action.InvalidDataFormat; - - /** - * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @param message InvalidDataFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @param message InvalidDataFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataFormat; - - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataFormat; - - /** - * Verifies an InvalidDataFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvalidDataFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataFormat; - - /** - * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. - * @param message InvalidDataFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InvalidDataFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InvalidDataFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IncompatibleDataSchema. */ - interface IIncompatibleDataSchema { - - /** IncompatibleDataSchema table */ - table?: (string|null); - - /** IncompatibleDataSchema existingSchema */ - existingSchema?: (string|null); - - /** IncompatibleDataSchema newSchema */ - newSchema?: (string|null); - - /** IncompatibleDataSchema sampledDataLocations */ - sampledDataLocations?: (string[]|null); - - /** IncompatibleDataSchema schemaChange */ - schemaChange?: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null); - } - - /** Represents an IncompatibleDataSchema. */ - class IncompatibleDataSchema implements IIncompatibleDataSchema { - - /** - * Constructs a new IncompatibleDataSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema); - - /** IncompatibleDataSchema table. */ - public table: string; - - /** IncompatibleDataSchema existingSchema. */ - public existingSchema: string; - - /** IncompatibleDataSchema newSchema. */ - public newSchema: string; - - /** IncompatibleDataSchema sampledDataLocations. */ - public sampledDataLocations: string[]; - - /** IncompatibleDataSchema schemaChange. */ - public schemaChange: (google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|keyof typeof google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange); - - /** - * Creates a new IncompatibleDataSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns IncompatibleDataSchema instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; - - /** - * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @param message IncompatibleDataSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @param message IncompatibleDataSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IIncompatibleDataSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; - - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; - - /** - * Verifies an IncompatibleDataSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IncompatibleDataSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.IncompatibleDataSchema; - - /** - * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. - * @param message IncompatibleDataSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.IncompatibleDataSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IncompatibleDataSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IncompatibleDataSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IncompatibleDataSchema { - - /** SchemaChange enum. */ - enum SchemaChange { - SCHEMA_CHANGE_UNSPECIFIED = 0, - INCOMPATIBLE = 1, - MODIFIED = 2 - } - } - - /** Properties of an InvalidDataPartition. */ - interface IInvalidDataPartition { - - /** InvalidDataPartition expectedStructure */ - expectedStructure?: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null); - } - - /** Represents an InvalidDataPartition. */ - class InvalidDataPartition implements IInvalidDataPartition { - - /** - * Constructs a new InvalidDataPartition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition); - - /** InvalidDataPartition expectedStructure. */ - public expectedStructure: (google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|keyof typeof google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure); - - /** - * Creates a new InvalidDataPartition instance using the specified properties. - * @param [properties] Properties to set - * @returns InvalidDataPartition instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataPartition): google.cloud.dataplex.v1.Action.InvalidDataPartition; - - /** - * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @param message InvalidDataPartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @param message InvalidDataPartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataPartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataPartition; - - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataPartition; - - /** - * Verifies an InvalidDataPartition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvalidDataPartition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataPartition; - - /** - * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. - * @param message InvalidDataPartition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataPartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InvalidDataPartition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InvalidDataPartition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace InvalidDataPartition { - - /** PartitionStructure enum. */ - enum PartitionStructure { - PARTITION_STRUCTURE_UNSPECIFIED = 0, - CONSISTENT_KEYS = 1, - HIVE_STYLE_KEYS = 2 - } - } - - /** Properties of a MissingData. */ - interface IMissingData { - } - - /** Represents a MissingData. */ - class MissingData implements IMissingData { - - /** - * Constructs a new MissingData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IMissingData); - - /** - * Creates a new MissingData instance using the specified properties. - * @param [properties] Properties to set - * @returns MissingData instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IMissingData): google.cloud.dataplex.v1.Action.MissingData; - - /** - * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @param message MissingData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @param message MissingData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IMissingData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MissingData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.MissingData; - - /** - * Decodes a MissingData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.MissingData; - - /** - * Verifies a MissingData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MissingData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MissingData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.MissingData; - - /** - * Creates a plain object from a MissingData message. Also converts values to other types if specified. - * @param message MissingData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.MissingData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MissingData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MissingData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InvalidDataOrganization. */ - interface IInvalidDataOrganization { - } - - /** Represents an InvalidDataOrganization. */ - class InvalidDataOrganization implements IInvalidDataOrganization { - - /** - * Constructs a new InvalidDataOrganization. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization); - - /** - * Creates a new InvalidDataOrganization instance using the specified properties. - * @param [properties] Properties to set - * @returns InvalidDataOrganization instance - */ - public static create(properties?: google.cloud.dataplex.v1.Action.IInvalidDataOrganization): google.cloud.dataplex.v1.Action.InvalidDataOrganization; - - /** - * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @param message InvalidDataOrganization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @param message InvalidDataOrganization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Action.IInvalidDataOrganization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvalidDataOrganization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Action.InvalidDataOrganization; - - /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvalidDataOrganization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Action.InvalidDataOrganization; - - /** - * Verifies an InvalidDataOrganization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvalidDataOrganization - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Action.InvalidDataOrganization; - - /** - * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. - * @param message InvalidDataOrganization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Action.InvalidDataOrganization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InvalidDataOrganization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InvalidDataOrganization - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an Asset. */ - interface IAsset { - - /** Asset name */ - name?: (string|null); - - /** Asset displayName */ - displayName?: (string|null); - - /** Asset uid */ - uid?: (string|null); - - /** Asset createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Asset updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Asset labels */ - labels?: ({ [k: string]: string }|null); - - /** Asset description */ - description?: (string|null); - - /** Asset state */ - state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); - - /** Asset resourceSpec */ - resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - - /** Asset resourceStatus */ - resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - - /** Asset securityStatus */ - securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - - /** Asset discoverySpec */ - discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); - - /** Asset discoveryStatus */ - discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); - } - - /** Represents an Asset. */ - class Asset implements IAsset { - - /** - * Constructs a new Asset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAsset); - - /** Asset name. */ - public name: string; - - /** Asset displayName. */ - public displayName: string; - - /** Asset uid. */ - public uid: string; - - /** Asset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Asset updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Asset labels. */ - public labels: { [k: string]: string }; - - /** Asset description. */ - public description: string; - - /** Asset state. */ - public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); - - /** Asset resourceSpec. */ - public resourceSpec?: (google.cloud.dataplex.v1.Asset.IResourceSpec|null); - - /** Asset resourceStatus. */ - public resourceStatus?: (google.cloud.dataplex.v1.Asset.IResourceStatus|null); - - /** Asset securityStatus. */ - public securityStatus?: (google.cloud.dataplex.v1.Asset.ISecurityStatus|null); - - /** Asset discoverySpec. */ - public discoverySpec?: (google.cloud.dataplex.v1.Asset.IDiscoverySpec|null); - - /** Asset discoveryStatus. */ - public discoveryStatus?: (google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null); - - /** - * Creates a new Asset instance using the specified properties. - * @param [properties] Properties to set - * @returns Asset instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAsset): google.cloud.dataplex.v1.Asset; - - /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @param message Asset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAsset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Asset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset; - - /** - * Decodes an Asset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset; - - /** - * Verifies an Asset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Asset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset; - - /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @param message Asset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Asset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Asset - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Asset { - - /** Properties of a SecurityStatus. */ - interface ISecurityStatus { - - /** SecurityStatus state */ - state?: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State|null); - - /** SecurityStatus message */ - message?: (string|null); - - /** SecurityStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a SecurityStatus. */ - class SecurityStatus implements ISecurityStatus { - - /** - * Constructs a new SecurityStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus); - - /** SecurityStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.SecurityStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.SecurityStatus.State); - - /** SecurityStatus message. */ - public message: string; - - /** SecurityStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new SecurityStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.ISecurityStatus): google.cloud.dataplex.v1.Asset.SecurityStatus; - - /** - * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @param message SecurityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @param message SecurityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.ISecurityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.SecurityStatus; - - /** - * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.SecurityStatus; - - /** - * Verifies a SecurityStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.SecurityStatus; - - /** - * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. - * @param message SecurityStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.SecurityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - APPLYING = 2, - ERROR = 3 - } - } - - /** Properties of a DiscoverySpec. */ - interface IDiscoverySpec { - - /** DiscoverySpec enabled */ - enabled?: (boolean|null); - - /** DiscoverySpec includePatterns */ - includePatterns?: (string[]|null); - - /** DiscoverySpec excludePatterns */ - excludePatterns?: (string[]|null); - - /** DiscoverySpec csvOptions */ - csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions */ - jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule */ - schedule?: (string|null); - } - - /** Represents a DiscoverySpec. */ - class DiscoverySpec implements IDiscoverySpec { - - /** - * Constructs a new DiscoverySpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec); - - /** DiscoverySpec enabled. */ - public enabled: boolean; - - /** DiscoverySpec includePatterns. */ - public includePatterns: string[]; - - /** DiscoverySpec excludePatterns. */ - public excludePatterns: string[]; - - /** DiscoverySpec csvOptions. */ - public csvOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null); - - /** DiscoverySpec jsonOptions. */ - public jsonOptions?: (google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null); - - /** DiscoverySpec schedule. */ - public schedule?: (string|null); - - /** DiscoverySpec trigger. */ - public trigger?: "schedule"; - - /** - * Creates a new DiscoverySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoverySpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoverySpec): google.cloud.dataplex.v1.Asset.DiscoverySpec; - - /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @param message DiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec; - - /** - * Verifies a DiscoverySpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoverySpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec; - - /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @param message DiscoverySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoverySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoverySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DiscoverySpec { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions headerRows */ - headerRows?: (number|null); - - /** CsvOptions delimiter */ - delimiter?: (string|null); - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } - - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { - - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions); - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions disableTypeInference. */ - public disableTypeInference: boolean; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - - /** - * Verifies a CsvOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); - - /** JsonOptions disableTypeInference */ - disableTypeInference?: (boolean|null); - } - - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { - - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** JsonOptions disableTypeInference. */ - public disableTypeInference: boolean; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ResourceSpec. */ - interface IResourceSpec { - - /** ResourceSpec name */ - name?: (string|null); - - /** ResourceSpec type */ - type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); - - /** ResourceSpec readAccessMode */ - readAccessMode?: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null); - } - - /** Represents a ResourceSpec. */ - class ResourceSpec implements IResourceSpec { - - /** - * Constructs a new ResourceSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec); - - /** ResourceSpec name. */ - public name: string; - - /** ResourceSpec type. */ - public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); - - /** ResourceSpec readAccessMode. */ - public readAccessMode: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode); - - /** - * Creates a new ResourceSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceSpec): google.cloud.dataplex.v1.Asset.ResourceSpec; - - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @param message ResourceSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceSpec; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceSpec; - - /** - * Verifies a ResourceSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceSpec; - - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @param message ResourceSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceSpec { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - STORAGE_BUCKET = 1, - BIGQUERY_DATASET = 2 - } - - /** AccessMode enum. */ - enum AccessMode { - ACCESS_MODE_UNSPECIFIED = 0, - DIRECT = 1, - MANAGED = 2 - } - } - - /** Properties of a ResourceStatus. */ - interface IResourceStatus { - - /** ResourceStatus state */ - state?: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State|null); - - /** ResourceStatus message */ - message?: (string|null); - - /** ResourceStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ResourceStatus managedAccessIdentity */ - managedAccessIdentity?: (string|null); - } - - /** Represents a ResourceStatus. */ - class ResourceStatus implements IResourceStatus { - - /** - * Constructs a new ResourceStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus); - - /** ResourceStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.ResourceStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.ResourceStatus.State); - - /** ResourceStatus message. */ - public message: string; - - /** ResourceStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ResourceStatus managedAccessIdentity. */ - public managedAccessIdentity: string; - - /** - * Creates a new ResourceStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IResourceStatus): google.cloud.dataplex.v1.Asset.ResourceStatus; - - /** - * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @param message ResourceStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @param message ResourceStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IResourceStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.ResourceStatus; - - /** - * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.ResourceStatus; - - /** - * Verifies a ResourceStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.ResourceStatus; - - /** - * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. - * @param message ResourceStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.ResourceStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - ERROR = 2 - } - } - - /** Properties of a DiscoveryStatus. */ - interface IDiscoveryStatus { - - /** DiscoveryStatus state */ - state?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null); - - /** DiscoveryStatus message */ - message?: (string|null); - - /** DiscoveryStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DiscoveryStatus lastRunTime */ - lastRunTime?: (google.protobuf.ITimestamp|null); - - /** DiscoveryStatus stats */ - stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); - - /** DiscoveryStatus lastRunDuration */ - lastRunDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a DiscoveryStatus. */ - class DiscoveryStatus implements IDiscoveryStatus { - - /** - * Constructs a new DiscoveryStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus); - - /** DiscoveryStatus state. */ - public state: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|keyof typeof google.cloud.dataplex.v1.Asset.DiscoveryStatus.State); - - /** DiscoveryStatus message. */ - public message: string; - - /** DiscoveryStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DiscoveryStatus lastRunTime. */ - public lastRunTime?: (google.protobuf.ITimestamp|null); - - /** DiscoveryStatus stats. */ - public stats?: (google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null); - - /** DiscoveryStatus lastRunDuration. */ - public lastRunDuration?: (google.protobuf.IDuration|null); - - /** - * Creates a new DiscoveryStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoveryStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.IDiscoveryStatus): google.cloud.dataplex.v1.Asset.DiscoveryStatus; - - /** - * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @param message DiscoveryStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @param message DiscoveryStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.IDiscoveryStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus; - - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus; - - /** - * Verifies a DiscoveryStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoveryStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus; - - /** - * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. - * @param message DiscoveryStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoveryStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoveryStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DiscoveryStatus { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SCHEDULED = 1, - IN_PROGRESS = 2, - PAUSED = 3, - DISABLED = 5 - } - - /** Properties of a Stats. */ - interface IStats { - - /** Stats dataItems */ - dataItems?: (number|Long|string|null); - - /** Stats dataSize */ - dataSize?: (number|Long|string|null); - - /** Stats tables */ - tables?: (number|Long|string|null); - - /** Stats filesets */ - filesets?: (number|Long|string|null); - } - - /** Represents a Stats. */ - class Stats implements IStats { - - /** - * Constructs a new Stats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats); - - /** Stats dataItems. */ - public dataItems: (number|Long|string); - - /** Stats dataSize. */ - public dataSize: (number|Long|string); - - /** Stats tables. */ - public tables: (number|Long|string); - - /** Stats filesets. */ - public filesets: (number|Long|string); - - /** - * Creates a new Stats instance using the specified properties. - * @param [properties] Properties to set - * @returns Stats instance - */ - public static create(properties?: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; - - /** - * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @param message Stats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @param message Stats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Stats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; - - /** - * Decodes a Stats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; - - /** - * Verifies a Stats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Stats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats; - - /** - * Creates a plain object from a Stats message. Also converts values to other types if specified. - * @param message Stats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Stats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Stats - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - CREATING = 2, - DELETING = 3, - ACTION_REQUIRED = 4 - } - - /** Represents a CatalogService */ - class CatalogService extends $protobuf.rpc.Service { - - /** - * Constructs a new CatalogService 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 CatalogService 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): CatalogService; - - /** - * Calls CreateEntryType. - * @param request CreateEntryTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEntryType(request: google.cloud.dataplex.v1.ICreateEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryTypeCallback): void; - - /** - * Calls CreateEntryType. - * @param request CreateEntryTypeRequest message or plain object - * @returns Promise - */ - public createEntryType(request: google.cloud.dataplex.v1.ICreateEntryTypeRequest): Promise; - - /** - * Calls UpdateEntryType. - * @param request UpdateEntryTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEntryType(request: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryTypeCallback): void; - - /** - * Calls UpdateEntryType. - * @param request UpdateEntryTypeRequest message or plain object - * @returns Promise - */ - public updateEntryType(request: google.cloud.dataplex.v1.IUpdateEntryTypeRequest): Promise; - - /** - * Calls DeleteEntryType. - * @param request DeleteEntryTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteEntryType(request: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryTypeCallback): void; - - /** - * Calls DeleteEntryType. - * @param request DeleteEntryTypeRequest message or plain object - * @returns Promise - */ - public deleteEntryType(request: google.cloud.dataplex.v1.IDeleteEntryTypeRequest): Promise; - - /** - * Calls ListEntryTypes. - * @param request ListEntryTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntryTypesResponse - */ - public listEntryTypes(request: google.cloud.dataplex.v1.IListEntryTypesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntryTypesCallback): void; - - /** - * Calls ListEntryTypes. - * @param request ListEntryTypesRequest message or plain object - * @returns Promise - */ - public listEntryTypes(request: google.cloud.dataplex.v1.IListEntryTypesRequest): Promise; - - /** - * Calls GetEntryType. - * @param request GetEntryTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryType - */ - public getEntryType(request: google.cloud.dataplex.v1.IGetEntryTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryTypeCallback): void; - - /** - * Calls GetEntryType. - * @param request GetEntryTypeRequest message or plain object - * @returns Promise - */ - public getEntryType(request: google.cloud.dataplex.v1.IGetEntryTypeRequest): Promise; - - /** - * Calls CreateAspectType. - * @param request CreateAspectTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createAspectType(request: google.cloud.dataplex.v1.ICreateAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateAspectTypeCallback): void; - - /** - * Calls CreateAspectType. - * @param request CreateAspectTypeRequest message or plain object - * @returns Promise - */ - public createAspectType(request: google.cloud.dataplex.v1.ICreateAspectTypeRequest): Promise; - - /** - * Calls UpdateAspectType. - * @param request UpdateAspectTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateAspectType(request: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateAspectTypeCallback): void; - - /** - * Calls UpdateAspectType. - * @param request UpdateAspectTypeRequest message or plain object - * @returns Promise - */ - public updateAspectType(request: google.cloud.dataplex.v1.IUpdateAspectTypeRequest): Promise; - - /** - * Calls DeleteAspectType. - * @param request DeleteAspectTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteAspectType(request: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteAspectTypeCallback): void; - - /** - * Calls DeleteAspectType. - * @param request DeleteAspectTypeRequest message or plain object - * @returns Promise - */ - public deleteAspectType(request: google.cloud.dataplex.v1.IDeleteAspectTypeRequest): Promise; - - /** - * Calls ListAspectTypes. - * @param request ListAspectTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAspectTypesResponse - */ - public listAspectTypes(request: google.cloud.dataplex.v1.IListAspectTypesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListAspectTypesCallback): void; - - /** - * Calls ListAspectTypes. - * @param request ListAspectTypesRequest message or plain object - * @returns Promise - */ - public listAspectTypes(request: google.cloud.dataplex.v1.IListAspectTypesRequest): Promise; - - /** - * Calls GetAspectType. - * @param request GetAspectTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AspectType - */ - public getAspectType(request: google.cloud.dataplex.v1.IGetAspectTypeRequest, callback: google.cloud.dataplex.v1.CatalogService.GetAspectTypeCallback): void; - - /** - * Calls GetAspectType. - * @param request GetAspectTypeRequest message or plain object - * @returns Promise - */ - public getAspectType(request: google.cloud.dataplex.v1.IGetAspectTypeRequest): Promise; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEntryGroup(request: google.cloud.dataplex.v1.ICreateEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryGroupCallback): void; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @returns Promise - */ - public createEntryGroup(request: google.cloud.dataplex.v1.ICreateEntryGroupRequest): Promise; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEntryGroup(request: google.cloud.dataplex.v1.IUpdateEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryGroupCallback): void; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @returns Promise - */ - public updateEntryGroup(request: google.cloud.dataplex.v1.IUpdateEntryGroupRequest): Promise; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteEntryGroup(request: google.cloud.dataplex.v1.IDeleteEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryGroupCallback): void; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @returns Promise - */ - public deleteEntryGroup(request: google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntryGroupsCallback): void; - - /** - * Calls ListEntryGroups. - * @param request ListEntryGroupsRequest message or plain object - * @returns Promise - */ - public listEntryGroups(request: google.cloud.dataplex.v1.IListEntryGroupsRequest): 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.dataplex.v1.IGetEntryGroupRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryGroupCallback): void; - - /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @returns Promise - */ - public getEntryGroup(request: google.cloud.dataplex.v1.IGetEntryGroupRequest): 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.dataplex.v1.ICreateEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateEntryCallback): void; - - /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @returns Promise - */ - public createEntry(request: google.cloud.dataplex.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.dataplex.v1.IUpdateEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.UpdateEntryCallback): void; - - /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @returns Promise - */ - public updateEntry(request: google.cloud.dataplex.v1.IUpdateEntryRequest): Promise; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public deleteEntry(request: google.cloud.dataplex.v1.IDeleteEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.DeleteEntryCallback): void; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @returns Promise - */ - public deleteEntry(request: google.cloud.dataplex.v1.IDeleteEntryRequest): 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.dataplex.v1.IListEntriesRequest, callback: google.cloud.dataplex.v1.CatalogService.ListEntriesCallback): void; - - /** - * Calls ListEntries. - * @param request ListEntriesRequest message or plain object - * @returns Promise - */ - public listEntries(request: google.cloud.dataplex.v1.IListEntriesRequest): 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.dataplex.v1.IGetEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.GetEntryCallback): void; - - /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @returns Promise - */ - public getEntry(request: google.cloud.dataplex.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.dataplex.v1.ILookupEntryRequest, callback: google.cloud.dataplex.v1.CatalogService.LookupEntryCallback): void; - - /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @returns Promise - */ - public lookupEntry(request: google.cloud.dataplex.v1.ILookupEntryRequest): Promise; - - /** - * Calls SearchEntries. - * @param request SearchEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchEntriesResponse - */ - public searchEntries(request: google.cloud.dataplex.v1.ISearchEntriesRequest, callback: google.cloud.dataplex.v1.CatalogService.SearchEntriesCallback): void; - - /** - * Calls SearchEntries. - * @param request SearchEntriesRequest message or plain object - * @returns Promise - */ - public searchEntries(request: google.cloud.dataplex.v1.ISearchEntriesRequest): Promise; - - /** - * Calls CreateMetadataJob. - * @param request CreateMetadataJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback): void; - - /** - * Calls CreateMetadataJob. - * @param request CreateMetadataJobRequest message or plain object - * @returns Promise - */ - public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest): Promise; - - /** - * Calls GetMetadataJob. - * @param request GetMetadataJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetadataJob - */ - public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback): void; - - /** - * Calls GetMetadataJob. - * @param request GetMetadataJobRequest message or plain object - * @returns Promise - */ - public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest): Promise; - - /** - * Calls ListMetadataJobs. - * @param request ListMetadataJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMetadataJobsResponse - */ - public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest, callback: google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback): void; - - /** - * Calls ListMetadataJobs. - * @param request ListMetadataJobsRequest message or plain object - * @returns Promise - */ - public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest): Promise; - - /** - * Calls CancelMetadataJob. - * @param request CancelMetadataJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback): void; - - /** - * Calls CancelMetadataJob. - * @param request CancelMetadataJobRequest message or plain object - * @returns Promise - */ - public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest): Promise; - } - - namespace CatalogService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryType}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryType}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryType}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteEntryTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryTypes}. - * @param error Error, if any - * @param [response] ListEntryTypesResponse - */ - type ListEntryTypesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntryTypesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryType}. - * @param error Error, if any - * @param [response] EntryType - */ - type GetEntryTypeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.EntryType) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createAspectType}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateAspectType}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteAspectType}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteAspectTypeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listAspectTypes}. - * @param error Error, if any - * @param [response] ListAspectTypesResponse - */ - type ListAspectTypesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAspectTypesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getAspectType}. - * @param error Error, if any - * @param [response] AspectType - */ - type GetAspectTypeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.AspectType) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteEntryGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryGroups}. - * @param error Error, if any - * @param [response] ListEntryGroupsResponse - */ - type ListEntryGroupsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntryGroupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type CreateEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type DeleteEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntries}. - * @param error Error, if any - * @param [response] ListEntriesResponse - */ - type ListEntriesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntriesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type GetEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|lookupEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type LookupEntryCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|searchEntries}. - * @param error Error, if any - * @param [response] SearchEntriesResponse - */ - type SearchEntriesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.SearchEntriesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateMetadataJobCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. - * @param error Error, if any - * @param [response] MetadataJob - */ - type GetMetadataJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.MetadataJob) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. - * @param error Error, if any - * @param [response] ListMetadataJobsResponse - */ - type ListMetadataJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListMetadataJobsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelMetadataJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of an AspectType. */ - interface IAspectType { - - /** AspectType name */ - name?: (string|null); - - /** AspectType uid */ - uid?: (string|null); - - /** AspectType createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** AspectType updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** AspectType description */ - description?: (string|null); - - /** AspectType displayName */ - displayName?: (string|null); - - /** AspectType labels */ - labels?: ({ [k: string]: string }|null); - - /** AspectType etag */ - etag?: (string|null); - - /** AspectType authorization */ - authorization?: (google.cloud.dataplex.v1.AspectType.IAuthorization|null); - - /** AspectType metadataTemplate */ - metadataTemplate?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** AspectType transferStatus */ - transferStatus?: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus|null); - } - - /** Represents an AspectType. */ - class AspectType implements IAspectType { - - /** - * Constructs a new AspectType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAspectType); - - /** AspectType name. */ - public name: string; - - /** AspectType uid. */ - public uid: string; - - /** AspectType createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** AspectType updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** AspectType description. */ - public description: string; - - /** AspectType displayName. */ - public displayName: string; - - /** AspectType labels. */ - public labels: { [k: string]: string }; - - /** AspectType etag. */ - public etag: string; - - /** AspectType authorization. */ - public authorization?: (google.cloud.dataplex.v1.AspectType.IAuthorization|null); - - /** AspectType metadataTemplate. */ - public metadataTemplate?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** AspectType transferStatus. */ - public transferStatus: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus); - - /** - * Creates a new AspectType instance using the specified properties. - * @param [properties] Properties to set - * @returns AspectType instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAspectType): google.cloud.dataplex.v1.AspectType; - - /** - * Encodes the specified AspectType message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. - * @param message AspectType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAspectType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AspectType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. - * @param message AspectType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAspectType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AspectType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AspectType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType; - - /** - * Decodes an AspectType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AspectType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType; - - /** - * Verifies an AspectType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AspectType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AspectType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType; - - /** - * Creates a plain object from an AspectType message. Also converts values to other types if specified. - * @param message AspectType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AspectType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AspectType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AspectType { - - /** Properties of an Authorization. */ - interface IAuthorization { - - /** Authorization alternateUsePermission */ - alternateUsePermission?: (string|null); - } - - /** Represents an Authorization. */ - class Authorization implements IAuthorization { - - /** - * Constructs a new Authorization. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.AspectType.IAuthorization); - - /** Authorization alternateUsePermission. */ - public alternateUsePermission: string; - - /** - * Creates a new Authorization instance using the specified properties. - * @param [properties] Properties to set - * @returns Authorization instance - */ - public static create(properties?: google.cloud.dataplex.v1.AspectType.IAuthorization): google.cloud.dataplex.v1.AspectType.Authorization; - - /** - * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. - * @param message Authorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.AspectType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. - * @param message Authorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Authorization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.Authorization; - - /** - * Decodes an Authorization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.Authorization; - - /** - * Verifies an Authorization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Authorization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Authorization - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.Authorization; - - /** - * Creates a plain object from an Authorization message. Also converts values to other types if specified. - * @param message Authorization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectType.Authorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Authorization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Authorization - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetadataTemplate. */ - interface IMetadataTemplate { - - /** MetadataTemplate index */ - index?: (number|null); - - /** MetadataTemplate name */ - name?: (string|null); - - /** MetadataTemplate type */ - type?: (string|null); - - /** MetadataTemplate recordFields */ - recordFields?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate[]|null); - - /** MetadataTemplate enumValues */ - enumValues?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue[]|null); - - /** MetadataTemplate mapItems */ - mapItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** MetadataTemplate arrayItems */ - arrayItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** MetadataTemplate typeId */ - typeId?: (string|null); - - /** MetadataTemplate typeRef */ - typeRef?: (string|null); - - /** MetadataTemplate constraints */ - constraints?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null); - - /** MetadataTemplate annotations */ - annotations?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null); - } - - /** Represents a MetadataTemplate. */ - class MetadataTemplate implements IMetadataTemplate { - - /** - * Constructs a new MetadataTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.AspectType.IMetadataTemplate); - - /** MetadataTemplate index. */ - public index: number; - - /** MetadataTemplate name. */ - public name: string; - - /** MetadataTemplate type. */ - public type: string; - - /** MetadataTemplate recordFields. */ - public recordFields: google.cloud.dataplex.v1.AspectType.IMetadataTemplate[]; - - /** MetadataTemplate enumValues. */ - public enumValues: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue[]; - - /** MetadataTemplate mapItems. */ - public mapItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** MetadataTemplate arrayItems. */ - public arrayItems?: (google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null); - - /** MetadataTemplate typeId. */ - public typeId: string; - - /** MetadataTemplate typeRef. */ - public typeRef: string; - - /** MetadataTemplate constraints. */ - public constraints?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null); - - /** MetadataTemplate annotations. */ - public annotations?: (google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null); - - /** - * Creates a new MetadataTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns MetadataTemplate instance - */ - public static create(properties?: google.cloud.dataplex.v1.AspectType.IMetadataTemplate): google.cloud.dataplex.v1.AspectType.MetadataTemplate; - - /** - * Encodes the specified MetadataTemplate message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. - * @param message MetadataTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.AspectType.IMetadataTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetadataTemplate message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. - * @param message MetadataTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.IMetadataTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetadataTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetadataTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate; - - /** - * Decodes a MetadataTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetadataTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate; - - /** - * Verifies a MetadataTemplate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetadataTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetadataTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate; - - /** - * Creates a plain object from a MetadataTemplate message. Also converts values to other types if specified. - * @param message MetadataTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetadataTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetadataTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetadataTemplate { - - /** Properties of an EnumValue. */ - interface IEnumValue { - - /** EnumValue index */ - index?: (number|null); - - /** EnumValue name */ - name?: (string|null); - - /** EnumValue deprecated */ - deprecated?: (string|null); - } - - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { - - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue); - - /** EnumValue index. */ - public index: number; - - /** EnumValue name. */ - public name: string; - - /** EnumValue deprecated. */ - public deprecated: string; - - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue): google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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 Constraints. */ - interface IConstraints { - - /** Constraints required */ - required?: (boolean|null); - } - - /** Represents a Constraints. */ - class Constraints implements IConstraints { - - /** - * Constructs a new Constraints. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints); - - /** Constraints required. */ - public required: boolean; - - /** - * Creates a new Constraints instance using the specified properties. - * @param [properties] Properties to set - * @returns Constraints instance - */ - public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; - - /** - * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. - * @param message Constraints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. - * @param message Constraints message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Constraints message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; - - /** - * Decodes a Constraints message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; - - /** - * Verifies a Constraints message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Constraints message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Constraints - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints; - - /** - * Creates a plain object from a Constraints message. Also converts values to other types if specified. - * @param message Constraints - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Constraints to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Constraints - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Annotations. */ - interface IAnnotations { - - /** Annotations deprecated */ - deprecated?: (string|null); - - /** Annotations displayName */ - displayName?: (string|null); - - /** Annotations description */ - description?: (string|null); - - /** Annotations displayOrder */ - displayOrder?: (number|null); - - /** Annotations stringType */ - stringType?: (string|null); - - /** Annotations stringValues */ - stringValues?: (string[]|null); - } - - /** Represents an Annotations. */ - class Annotations implements IAnnotations { - - /** - * Constructs a new Annotations. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations); - - /** Annotations deprecated. */ - public deprecated: string; - - /** Annotations displayName. */ - public displayName: string; - - /** Annotations description. */ - public description: string; - - /** Annotations displayOrder. */ - public displayOrder: number; - - /** Annotations stringType. */ - public stringType: string; - - /** Annotations stringValues. */ - public stringValues: string[]; - - /** - * Creates a new Annotations instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotations instance - */ - public static create(properties?: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; - - /** - * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. - * @param message Annotations message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. - * @param message Annotations message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotations message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotations - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; - - /** - * Decodes an Annotations message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotations - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; - - /** - * Verifies an Annotations message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotations message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotations - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations; - - /** - * Creates a plain object from an Annotations message. Also converts values to other types if specified. - * @param message Annotations - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotations to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotations - * @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 uid */ - uid?: (string|null); - - /** EntryGroup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** EntryGroup updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** EntryGroup description */ - description?: (string|null); - - /** EntryGroup displayName */ - displayName?: (string|null); - - /** EntryGroup labels */ - labels?: ({ [k: string]: string }|null); - - /** EntryGroup etag */ - etag?: (string|null); - - /** EntryGroup transferStatus */ - transferStatus?: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus|null); - } - - /** Represents an EntryGroup. */ - class EntryGroup implements IEntryGroup { - - /** - * Constructs a new EntryGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEntryGroup); - - /** EntryGroup name. */ - public name: string; - - /** EntryGroup uid. */ - public uid: string; - - /** EntryGroup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** EntryGroup updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** EntryGroup description. */ - public description: string; - - /** EntryGroup displayName. */ - public displayName: string; - - /** EntryGroup labels. */ - public labels: { [k: string]: string }; - - /** EntryGroup etag. */ - public etag: string; - - /** EntryGroup transferStatus. */ - public transferStatus: (google.cloud.dataplex.v1.TransferStatus|keyof typeof google.cloud.dataplex.v1.TransferStatus); - - /** - * Creates a new EntryGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryGroup instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEntryGroup): google.cloud.dataplex.v1.EntryGroup; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 an EntryType. */ - interface IEntryType { - - /** EntryType name */ - name?: (string|null); - - /** EntryType uid */ - uid?: (string|null); - - /** EntryType createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** EntryType updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** EntryType description */ - description?: (string|null); - - /** EntryType displayName */ - displayName?: (string|null); - - /** EntryType labels */ - labels?: ({ [k: string]: string }|null); - - /** EntryType etag */ - etag?: (string|null); - - /** EntryType typeAliases */ - typeAliases?: (string[]|null); - - /** EntryType platform */ - platform?: (string|null); - - /** EntryType system */ - system?: (string|null); - - /** EntryType requiredAspects */ - requiredAspects?: (google.cloud.dataplex.v1.EntryType.IAspectInfo[]|null); - - /** EntryType authorization */ - authorization?: (google.cloud.dataplex.v1.EntryType.IAuthorization|null); - } - - /** Represents an EntryType. */ - class EntryType implements IEntryType { - - /** - * Constructs a new EntryType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEntryType); - - /** EntryType name. */ - public name: string; - - /** EntryType uid. */ - public uid: string; - - /** EntryType createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** EntryType updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** EntryType description. */ - public description: string; - - /** EntryType displayName. */ - public displayName: string; - - /** EntryType labels. */ - public labels: { [k: string]: string }; - - /** EntryType etag. */ - public etag: string; - - /** EntryType typeAliases. */ - public typeAliases: string[]; - - /** EntryType platform. */ - public platform: string; - - /** EntryType system. */ - public system: string; - - /** EntryType requiredAspects. */ - public requiredAspects: google.cloud.dataplex.v1.EntryType.IAspectInfo[]; - - /** EntryType authorization. */ - public authorization?: (google.cloud.dataplex.v1.EntryType.IAuthorization|null); - - /** - * Creates a new EntryType instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryType instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEntryType): google.cloud.dataplex.v1.EntryType; - - /** - * Encodes the specified EntryType message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. - * @param message EntryType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IEntryType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntryType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. - * @param message EntryType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEntryType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntryType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntryType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType; - - /** - * Decodes an EntryType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntryType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType; - - /** - * Verifies an EntryType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EntryType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntryType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType; - - /** - * Creates a plain object from an EntryType message. Also converts values to other types if specified. - * @param message EntryType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.EntryType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntryType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntryType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EntryType { - - /** Properties of an AspectInfo. */ - interface IAspectInfo { - - /** AspectInfo type */ - type?: (string|null); - } - - /** Represents an AspectInfo. */ - class AspectInfo implements IAspectInfo { - - /** - * Constructs a new AspectInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.EntryType.IAspectInfo); - - /** AspectInfo type. */ - public type: string; - - /** - * Creates a new AspectInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AspectInfo instance - */ - public static create(properties?: google.cloud.dataplex.v1.EntryType.IAspectInfo): google.cloud.dataplex.v1.EntryType.AspectInfo; - - /** - * Encodes the specified AspectInfo message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. - * @param message AspectInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.EntryType.IAspectInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AspectInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. - * @param message AspectInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.EntryType.IAspectInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AspectInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AspectInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType.AspectInfo; - - /** - * Decodes an AspectInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AspectInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType.AspectInfo; - - /** - * Verifies an AspectInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AspectInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AspectInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType.AspectInfo; - - /** - * Creates a plain object from an AspectInfo message. Also converts values to other types if specified. - * @param message AspectInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.EntryType.AspectInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AspectInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AspectInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Authorization. */ - interface IAuthorization { - - /** Authorization alternateUsePermission */ - alternateUsePermission?: (string|null); - } - - /** Represents an Authorization. */ - class Authorization implements IAuthorization { - - /** - * Constructs a new Authorization. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.EntryType.IAuthorization); - - /** Authorization alternateUsePermission. */ - public alternateUsePermission: string; - - /** - * Creates a new Authorization instance using the specified properties. - * @param [properties] Properties to set - * @returns Authorization instance - */ - public static create(properties?: google.cloud.dataplex.v1.EntryType.IAuthorization): google.cloud.dataplex.v1.EntryType.Authorization; - - /** - * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. - * @param message Authorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.EntryType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. - * @param message Authorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.EntryType.IAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Authorization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntryType.Authorization; - - /** - * Decodes an Authorization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntryType.Authorization; - - /** - * Verifies an Authorization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Authorization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Authorization - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntryType.Authorization; - - /** - * Creates a plain object from an Authorization message. Also converts values to other types if specified. - * @param message Authorization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.EntryType.Authorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Authorization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Authorization - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an Aspect. */ - interface IAspect { - - /** Aspect aspectType */ - aspectType?: (string|null); - - /** Aspect path */ - path?: (string|null); - - /** Aspect createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Aspect updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Aspect data */ - data?: (google.protobuf.IStruct|null); - - /** Aspect aspectSource */ - aspectSource?: (google.cloud.dataplex.v1.IAspectSource|null); - } - - /** Represents an Aspect. */ - class Aspect implements IAspect { - - /** - * Constructs a new Aspect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAspect); - - /** Aspect aspectType. */ - public aspectType: string; - - /** Aspect path. */ - public path: string; - - /** Aspect createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Aspect updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Aspect data. */ - public data?: (google.protobuf.IStruct|null); - - /** Aspect aspectSource. */ - public aspectSource?: (google.cloud.dataplex.v1.IAspectSource|null); - - /** - * Creates a new Aspect instance using the specified properties. - * @param [properties] Properties to set - * @returns Aspect instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAspect): google.cloud.dataplex.v1.Aspect; - - /** - * Encodes the specified Aspect message. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. - * @param message Aspect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAspect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Aspect message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. - * @param message Aspect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAspect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Aspect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Aspect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Aspect; - - /** - * Decodes an Aspect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Aspect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Aspect; - - /** - * Verifies an Aspect message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Aspect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Aspect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Aspect; - - /** - * Creates a plain object from an Aspect message. Also converts values to other types if specified. - * @param message Aspect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Aspect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Aspect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Aspect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AspectSource. */ - interface IAspectSource { - - /** AspectSource createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** AspectSource updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** AspectSource dataVersion */ - dataVersion?: (string|null); - } - - /** Represents an AspectSource. */ - class AspectSource implements IAspectSource { - - /** - * Constructs a new AspectSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IAspectSource); - - /** AspectSource createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** AspectSource updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** AspectSource dataVersion. */ - public dataVersion: string; - - /** - * Creates a new AspectSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AspectSource instance - */ - public static create(properties?: google.cloud.dataplex.v1.IAspectSource): google.cloud.dataplex.v1.AspectSource; - - /** - * Encodes the specified AspectSource message. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. - * @param message AspectSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IAspectSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AspectSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. - * @param message AspectSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IAspectSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AspectSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AspectSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.AspectSource; - - /** - * Decodes an AspectSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AspectSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.AspectSource; - - /** - * Verifies an AspectSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AspectSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AspectSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.AspectSource; - - /** - * Creates a plain object from an AspectSource message. Also converts values to other types if specified. - * @param message AspectSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.AspectSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AspectSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AspectSource - * @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 entryType */ - entryType?: (string|null); - - /** Entry createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Entry updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Entry aspects */ - aspects?: ({ [k: string]: google.cloud.dataplex.v1.IAspect }|null); - - /** Entry parentEntry */ - parentEntry?: (string|null); - - /** Entry fullyQualifiedName */ - fullyQualifiedName?: (string|null); - - /** Entry entrySource */ - entrySource?: (google.cloud.dataplex.v1.IEntrySource|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEntry); - - /** Entry name. */ - public name: string; - - /** Entry entryType. */ - public entryType: string; - - /** Entry createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Entry updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Entry aspects. */ - public aspects: { [k: string]: google.cloud.dataplex.v1.IAspect }; - - /** Entry parentEntry. */ - public parentEntry: string; - - /** Entry fullyQualifiedName. */ - public fullyQualifiedName: string; - - /** Entry entrySource. */ - public entrySource?: (google.cloud.dataplex.v1.IEntrySource|null); - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEntry): google.cloud.dataplex.v1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 an EntrySource. */ - interface IEntrySource { - - /** EntrySource resource */ - resource?: (string|null); - - /** EntrySource system */ - system?: (string|null); - - /** EntrySource platform */ - platform?: (string|null); - - /** EntrySource displayName */ - displayName?: (string|null); - - /** EntrySource description */ - description?: (string|null); - - /** EntrySource labels */ - labels?: ({ [k: string]: string }|null); - - /** EntrySource ancestors */ - ancestors?: (google.cloud.dataplex.v1.EntrySource.IAncestor[]|null); - - /** EntrySource createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** EntrySource updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** EntrySource location */ - location?: (string|null); - } - - /** Represents an EntrySource. */ - class EntrySource implements IEntrySource { - - /** - * Constructs a new EntrySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEntrySource); - - /** EntrySource resource. */ - public resource: string; - - /** EntrySource system. */ - public system: string; - - /** EntrySource platform. */ - public platform: string; - - /** EntrySource displayName. */ - public displayName: string; - - /** EntrySource description. */ - public description: string; - - /** EntrySource labels. */ - public labels: { [k: string]: string }; - - /** EntrySource ancestors. */ - public ancestors: google.cloud.dataplex.v1.EntrySource.IAncestor[]; - - /** EntrySource createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** EntrySource updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** EntrySource location. */ - public location: string; - - /** - * Creates a new EntrySource instance using the specified properties. - * @param [properties] Properties to set - * @returns EntrySource instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEntrySource): google.cloud.dataplex.v1.EntrySource; - - /** - * Encodes the specified EntrySource message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. - * @param message EntrySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IEntrySource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntrySource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. - * @param message EntrySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEntrySource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntrySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntrySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntrySource; - - /** - * Decodes an EntrySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntrySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntrySource; - - /** - * Verifies an EntrySource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EntrySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntrySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntrySource; - - /** - * Creates a plain object from an EntrySource message. Also converts values to other types if specified. - * @param message EntrySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.EntrySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntrySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntrySource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EntrySource { - - /** Properties of an Ancestor. */ - interface IAncestor { - - /** Ancestor name */ - name?: (string|null); - - /** Ancestor type */ - type?: (string|null); - } - - /** Represents an Ancestor. */ - class Ancestor implements IAncestor { - - /** - * Constructs a new Ancestor. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.EntrySource.IAncestor); - - /** Ancestor name. */ - public name: string; - - /** Ancestor type. */ - public type: string; - - /** - * Creates a new Ancestor instance using the specified properties. - * @param [properties] Properties to set - * @returns Ancestor instance - */ - public static create(properties?: google.cloud.dataplex.v1.EntrySource.IAncestor): google.cloud.dataplex.v1.EntrySource.Ancestor; - - /** - * Encodes the specified Ancestor message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. - * @param message Ancestor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.EntrySource.IAncestor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Ancestor message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. - * @param message Ancestor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.EntrySource.IAncestor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Ancestor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Ancestor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.EntrySource.Ancestor; - - /** - * Decodes an Ancestor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Ancestor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.EntrySource.Ancestor; - - /** - * Verifies an Ancestor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Ancestor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Ancestor - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.EntrySource.Ancestor; - - /** - * Creates a plain object from an Ancestor message. Also converts values to other types if specified. - * @param message Ancestor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.EntrySource.Ancestor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Ancestor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Ancestor - * @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.dataplex.v1.IEntryGroup|null); - - /** CreateEntryGroupRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateEntryGroupRequest. */ - class CreateEntryGroupRequest implements ICreateEntryGroupRequest { - - /** - * Constructs a new CreateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEntryGroupRequest); - - /** CreateEntryGroupRequest parent. */ - public parent: string; - - /** CreateEntryGroupRequest entryGroupId. */ - public entryGroupId: string; - - /** CreateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.dataplex.v1.IEntryGroup|null); - - /** CreateEntryGroupRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEntryGroupRequest): google.cloud.dataplex.v1.CreateEntryGroupRequest; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryGroupRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateEntryGroupRequest. */ - class UpdateEntryGroupRequest implements IUpdateEntryGroupRequest { - - /** - * Constructs a new UpdateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryGroupRequest); - - /** UpdateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.dataplex.v1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryGroupRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryGroupRequest): google.cloud.dataplex.v1.UpdateEntryGroupRequest; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 DeleteEntryGroupRequest. */ - interface IDeleteEntryGroupRequest { - - /** DeleteEntryGroupRequest name */ - name?: (string|null); - - /** DeleteEntryGroupRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteEntryGroupRequest. */ - class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { - - /** - * Constructs a new DeleteEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEntryGroupRequest); - - /** DeleteEntryGroupRequest name. */ - public name: string; - - /** DeleteEntryGroupRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryGroupRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEntryGroupRequest): google.cloud.dataplex.v1.DeleteEntryGroupRequest; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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); - - /** ListEntryGroupsRequest filter */ - filter?: (string|null); - - /** ListEntryGroupsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListEntryGroupsRequest. */ - class ListEntryGroupsRequest implements IListEntryGroupsRequest { - - /** - * Constructs a new ListEntryGroupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntryGroupsRequest); - - /** ListEntryGroupsRequest parent. */ - public parent: string; - - /** ListEntryGroupsRequest pageSize. */ - public pageSize: number; - - /** ListEntryGroupsRequest pageToken. */ - public pageToken: string; - - /** ListEntryGroupsRequest filter. */ - public filter: string; - - /** ListEntryGroupsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntryGroupsRequest): google.cloud.dataplex.v1.ListEntryGroupsRequest; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntryGroup[]|null); - - /** ListEntryGroupsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListEntryGroupsResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListEntryGroupsResponse. */ - class ListEntryGroupsResponse implements IListEntryGroupsResponse { - - /** - * Constructs a new ListEntryGroupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntryGroupsResponse); - - /** ListEntryGroupsResponse entryGroups. */ - public entryGroups: google.cloud.dataplex.v1.IEntryGroup[]; - - /** ListEntryGroupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListEntryGroupsResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntryGroupsResponse): google.cloud.dataplex.v1.ListEntryGroupsResponse; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 GetEntryGroupRequest. */ - interface IGetEntryGroupRequest { - - /** GetEntryGroupRequest name */ - name?: (string|null); - } - - /** Represents a GetEntryGroupRequest. */ - class GetEntryGroupRequest implements IGetEntryGroupRequest { - - /** - * Constructs a new GetEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntryGroupRequest); - - /** GetEntryGroupRequest name. */ - public name: string; - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryGroupRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntryGroupRequest): google.cloud.dataplex.v1.GetEntryGroupRequest; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 CreateEntryTypeRequest. */ - interface ICreateEntryTypeRequest { - - /** CreateEntryTypeRequest parent */ - parent?: (string|null); - - /** CreateEntryTypeRequest entryTypeId */ - entryTypeId?: (string|null); - - /** CreateEntryTypeRequest entryType */ - entryType?: (google.cloud.dataplex.v1.IEntryType|null); - - /** CreateEntryTypeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateEntryTypeRequest. */ - class CreateEntryTypeRequest implements ICreateEntryTypeRequest { - - /** - * Constructs a new CreateEntryTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEntryTypeRequest); - - /** CreateEntryTypeRequest parent. */ - public parent: string; - - /** CreateEntryTypeRequest entryTypeId. */ - public entryTypeId: string; - - /** CreateEntryTypeRequest entryType. */ - public entryType?: (google.cloud.dataplex.v1.IEntryType|null); - - /** CreateEntryTypeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateEntryTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEntryTypeRequest): google.cloud.dataplex.v1.CreateEntryTypeRequest; - - /** - * Encodes the specified CreateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. - * @param message CreateEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. - * @param message CreateEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntryTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntryTypeRequest; - - /** - * Decodes a CreateEntryTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntryTypeRequest; - - /** - * Verifies a CreateEntryTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntryTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntryTypeRequest; - - /** - * Creates a plain object from a CreateEntryTypeRequest message. Also converts values to other types if specified. - * @param message CreateEntryTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntryTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntryTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntryTypeRequest. */ - interface IUpdateEntryTypeRequest { - - /** UpdateEntryTypeRequest entryType */ - entryType?: (google.cloud.dataplex.v1.IEntryType|null); - - /** UpdateEntryTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryTypeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateEntryTypeRequest. */ - class UpdateEntryTypeRequest implements IUpdateEntryTypeRequest { - - /** - * Constructs a new UpdateEntryTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryTypeRequest); - - /** UpdateEntryTypeRequest entryType. */ - public entryType?: (google.cloud.dataplex.v1.IEntryType|null); - - /** UpdateEntryTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryTypeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateEntryTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryTypeRequest): google.cloud.dataplex.v1.UpdateEntryTypeRequest; - - /** - * Encodes the specified UpdateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. - * @param message UpdateEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. - * @param message UpdateEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntryTypeRequest; - - /** - * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntryTypeRequest; - - /** - * Verifies an UpdateEntryTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntryTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntryTypeRequest; - - /** - * Creates a plain object from an UpdateEntryTypeRequest message. Also converts values to other types if specified. - * @param message UpdateEntryTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntryTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntryTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntryTypeRequest. */ - interface IDeleteEntryTypeRequest { - - /** DeleteEntryTypeRequest name */ - name?: (string|null); - - /** DeleteEntryTypeRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteEntryTypeRequest. */ - class DeleteEntryTypeRequest implements IDeleteEntryTypeRequest { - - /** - * Constructs a new DeleteEntryTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEntryTypeRequest); - - /** DeleteEntryTypeRequest name. */ - public name: string; - - /** DeleteEntryTypeRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteEntryTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEntryTypeRequest): google.cloud.dataplex.v1.DeleteEntryTypeRequest; - - /** - * Encodes the specified DeleteEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. - * @param message DeleteEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. - * @param message DeleteEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntryTypeRequest; - - /** - * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntryTypeRequest; - - /** - * Verifies a DeleteEntryTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntryTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntryTypeRequest; - - /** - * Creates a plain object from a DeleteEntryTypeRequest message. Also converts values to other types if specified. - * @param message DeleteEntryTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntryTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntryTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryTypesRequest. */ - interface IListEntryTypesRequest { - - /** ListEntryTypesRequest parent */ - parent?: (string|null); - - /** ListEntryTypesRequest pageSize */ - pageSize?: (number|null); - - /** ListEntryTypesRequest pageToken */ - pageToken?: (string|null); - - /** ListEntryTypesRequest filter */ - filter?: (string|null); - - /** ListEntryTypesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListEntryTypesRequest. */ - class ListEntryTypesRequest implements IListEntryTypesRequest { - - /** - * Constructs a new ListEntryTypesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntryTypesRequest); - - /** ListEntryTypesRequest parent. */ - public parent: string; - - /** ListEntryTypesRequest pageSize. */ - public pageSize: number; - - /** ListEntryTypesRequest pageToken. */ - public pageToken: string; - - /** ListEntryTypesRequest filter. */ - public filter: string; - - /** ListEntryTypesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListEntryTypesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryTypesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntryTypesRequest): google.cloud.dataplex.v1.ListEntryTypesRequest; - - /** - * Encodes the specified ListEntryTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. - * @param message ListEntryTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEntryTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. - * @param message ListEntryTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntryTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryTypesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntryTypesRequest; - - /** - * Decodes a ListEntryTypesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntryTypesRequest; - - /** - * Verifies a ListEntryTypesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryTypesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryTypesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntryTypesRequest; - - /** - * Creates a plain object from a ListEntryTypesRequest message. Also converts values to other types if specified. - * @param message ListEntryTypesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEntryTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryTypesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryTypesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryTypesResponse. */ - interface IListEntryTypesResponse { - - /** ListEntryTypesResponse entryTypes */ - entryTypes?: (google.cloud.dataplex.v1.IEntryType[]|null); - - /** ListEntryTypesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListEntryTypesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListEntryTypesResponse. */ - class ListEntryTypesResponse implements IListEntryTypesResponse { - - /** - * Constructs a new ListEntryTypesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntryTypesResponse); - - /** ListEntryTypesResponse entryTypes. */ - public entryTypes: google.cloud.dataplex.v1.IEntryType[]; - - /** ListEntryTypesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListEntryTypesResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListEntryTypesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryTypesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntryTypesResponse): google.cloud.dataplex.v1.ListEntryTypesResponse; - - /** - * Encodes the specified ListEntryTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. - * @param message ListEntryTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEntryTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. - * @param message ListEntryTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntryTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryTypesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntryTypesResponse; - - /** - * Decodes a ListEntryTypesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntryTypesResponse; - - /** - * Verifies a ListEntryTypesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryTypesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryTypesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntryTypesResponse; - - /** - * Creates a plain object from a ListEntryTypesResponse message. Also converts values to other types if specified. - * @param message ListEntryTypesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEntryTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryTypesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryTypesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntryTypeRequest. */ - interface IGetEntryTypeRequest { - - /** GetEntryTypeRequest name */ - name?: (string|null); - } - - /** Represents a GetEntryTypeRequest. */ - class GetEntryTypeRequest implements IGetEntryTypeRequest { - - /** - * Constructs a new GetEntryTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntryTypeRequest); - - /** GetEntryTypeRequest name. */ - public name: string; - - /** - * Creates a new GetEntryTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntryTypeRequest): google.cloud.dataplex.v1.GetEntryTypeRequest; - - /** - * Encodes the specified GetEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. - * @param message GetEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. - * @param message GetEntryTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntryTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntryTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntryTypeRequest; - - /** - * Decodes a GetEntryTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntryTypeRequest; - - /** - * Verifies a GetEntryTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntryTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntryTypeRequest; - - /** - * Creates a plain object from a GetEntryTypeRequest message. Also converts values to other types if specified. - * @param message GetEntryTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetEntryTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntryTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntryTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAspectTypeRequest. */ - interface ICreateAspectTypeRequest { - - /** CreateAspectTypeRequest parent */ - parent?: (string|null); - - /** CreateAspectTypeRequest aspectTypeId */ - aspectTypeId?: (string|null); - - /** CreateAspectTypeRequest aspectType */ - aspectType?: (google.cloud.dataplex.v1.IAspectType|null); - - /** CreateAspectTypeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateAspectTypeRequest. */ - class CreateAspectTypeRequest implements ICreateAspectTypeRequest { - - /** - * Constructs a new CreateAspectTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateAspectTypeRequest); - - /** CreateAspectTypeRequest parent. */ - public parent: string; - - /** CreateAspectTypeRequest aspectTypeId. */ - public aspectTypeId: string; - - /** CreateAspectTypeRequest aspectType. */ - public aspectType?: (google.cloud.dataplex.v1.IAspectType|null); - - /** CreateAspectTypeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateAspectTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAspectTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateAspectTypeRequest): google.cloud.dataplex.v1.CreateAspectTypeRequest; - - /** - * Encodes the specified CreateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. - * @param message CreateAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. - * @param message CreateAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateAspectTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAspectTypeRequest; - - /** - * Decodes a CreateAspectTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAspectTypeRequest; - - /** - * Verifies a CreateAspectTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAspectTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAspectTypeRequest; - - /** - * Creates a plain object from a CreateAspectTypeRequest message. Also converts values to other types if specified. - * @param message CreateAspectTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateAspectTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateAspectTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateAspectTypeRequest. */ - interface IUpdateAspectTypeRequest { - - /** UpdateAspectTypeRequest aspectType */ - aspectType?: (google.cloud.dataplex.v1.IAspectType|null); - - /** UpdateAspectTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAspectTypeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateAspectTypeRequest. */ - class UpdateAspectTypeRequest implements IUpdateAspectTypeRequest { - - /** - * Constructs a new UpdateAspectTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateAspectTypeRequest); - - /** UpdateAspectTypeRequest aspectType. */ - public aspectType?: (google.cloud.dataplex.v1.IAspectType|null); - - /** UpdateAspectTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAspectTypeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateAspectTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAspectTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateAspectTypeRequest): google.cloud.dataplex.v1.UpdateAspectTypeRequest; - - /** - * Encodes the specified UpdateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. - * @param message UpdateAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. - * @param message UpdateAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAspectTypeRequest; - - /** - * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAspectTypeRequest; - - /** - * Verifies an UpdateAspectTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAspectTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAspectTypeRequest; - - /** - * Creates a plain object from an UpdateAspectTypeRequest message. Also converts values to other types if specified. - * @param message UpdateAspectTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateAspectTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateAspectTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteAspectTypeRequest. */ - interface IDeleteAspectTypeRequest { - - /** DeleteAspectTypeRequest name */ - name?: (string|null); - - /** DeleteAspectTypeRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteAspectTypeRequest. */ - class DeleteAspectTypeRequest implements IDeleteAspectTypeRequest { - - /** - * Constructs a new DeleteAspectTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteAspectTypeRequest); - - /** DeleteAspectTypeRequest name. */ - public name: string; - - /** DeleteAspectTypeRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteAspectTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAspectTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteAspectTypeRequest): google.cloud.dataplex.v1.DeleteAspectTypeRequest; - - /** - * Encodes the specified DeleteAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. - * @param message DeleteAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. - * @param message DeleteAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAspectTypeRequest; - - /** - * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAspectTypeRequest; - - /** - * Verifies a DeleteAspectTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAspectTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAspectTypeRequest; - - /** - * Creates a plain object from a DeleteAspectTypeRequest message. Also converts values to other types if specified. - * @param message DeleteAspectTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteAspectTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteAspectTypeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAspectTypesRequest. */ - interface IListAspectTypesRequest { - - /** ListAspectTypesRequest parent */ - parent?: (string|null); - - /** ListAspectTypesRequest pageSize */ - pageSize?: (number|null); - - /** ListAspectTypesRequest pageToken */ - pageToken?: (string|null); - - /** ListAspectTypesRequest filter */ - filter?: (string|null); - - /** ListAspectTypesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListAspectTypesRequest. */ - class ListAspectTypesRequest implements IListAspectTypesRequest { - - /** - * Constructs a new ListAspectTypesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAspectTypesRequest); - - /** ListAspectTypesRequest parent. */ - public parent: string; - - /** ListAspectTypesRequest pageSize. */ - public pageSize: number; - - /** ListAspectTypesRequest pageToken. */ - public pageToken: string; - - /** ListAspectTypesRequest filter. */ - public filter: string; - - /** ListAspectTypesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListAspectTypesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAspectTypesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAspectTypesRequest): google.cloud.dataplex.v1.ListAspectTypesRequest; - - /** - * Encodes the specified ListAspectTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. - * @param message ListAspectTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAspectTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAspectTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. - * @param message ListAspectTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAspectTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAspectTypesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAspectTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAspectTypesRequest; - - /** - * Decodes a ListAspectTypesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAspectTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAspectTypesRequest; - - /** - * Verifies a ListAspectTypesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAspectTypesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAspectTypesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAspectTypesRequest; - - /** - * Creates a plain object from a ListAspectTypesRequest message. Also converts values to other types if specified. - * @param message ListAspectTypesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAspectTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAspectTypesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAspectTypesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAspectTypesResponse. */ - interface IListAspectTypesResponse { - - /** ListAspectTypesResponse aspectTypes */ - aspectTypes?: (google.cloud.dataplex.v1.IAspectType[]|null); - - /** ListAspectTypesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListAspectTypesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListAspectTypesResponse. */ - class ListAspectTypesResponse implements IListAspectTypesResponse { - - /** - * Constructs a new ListAspectTypesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAspectTypesResponse); - - /** ListAspectTypesResponse aspectTypes. */ - public aspectTypes: google.cloud.dataplex.v1.IAspectType[]; - - /** ListAspectTypesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListAspectTypesResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListAspectTypesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAspectTypesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAspectTypesResponse): google.cloud.dataplex.v1.ListAspectTypesResponse; - - /** - * Encodes the specified ListAspectTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. - * @param message ListAspectTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAspectTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAspectTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. - * @param message ListAspectTypesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAspectTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAspectTypesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAspectTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAspectTypesResponse; - - /** - * Decodes a ListAspectTypesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAspectTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAspectTypesResponse; - - /** - * Verifies a ListAspectTypesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAspectTypesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAspectTypesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAspectTypesResponse; - - /** - * Creates a plain object from a ListAspectTypesResponse message. Also converts values to other types if specified. - * @param message ListAspectTypesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAspectTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAspectTypesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAspectTypesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAspectTypeRequest. */ - interface IGetAspectTypeRequest { - - /** GetAspectTypeRequest name */ - name?: (string|null); - } - - /** Represents a GetAspectTypeRequest. */ - class GetAspectTypeRequest implements IGetAspectTypeRequest { - - /** - * Constructs a new GetAspectTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetAspectTypeRequest); - - /** GetAspectTypeRequest name. */ - public name: string; - - /** - * Creates a new GetAspectTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAspectTypeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetAspectTypeRequest): google.cloud.dataplex.v1.GetAspectTypeRequest; - - /** - * Encodes the specified GetAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. - * @param message GetAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. - * @param message GetAspectTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAspectTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAspectTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAspectTypeRequest; - - /** - * Decodes a GetAspectTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAspectTypeRequest; - - /** - * Verifies a GetAspectTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAspectTypeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAspectTypeRequest; - - /** - * Creates a plain object from a GetAspectTypeRequest message. Also converts values to other types if specified. - * @param message GetAspectTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetAspectTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAspectTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAspectTypeRequest - * @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.dataplex.v1.IEntry|null); - } - - /** Represents a CreateEntryRequest. */ - class CreateEntryRequest implements ICreateEntryRequest { - - /** - * Constructs a new CreateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEntryRequest); - - /** CreateEntryRequest parent. */ - public parent: string; - - /** CreateEntryRequest entryId. */ - public entryId: string; - - /** CreateEntryRequest entry. */ - public entry?: (google.cloud.dataplex.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.dataplex.v1.ICreateEntryRequest): google.cloud.dataplex.v1.CreateEntryRequest; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IEntry|null); - - /** UpdateEntryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryRequest allowMissing */ - allowMissing?: (boolean|null); - - /** UpdateEntryRequest deleteMissingAspects */ - deleteMissingAspects?: (boolean|null); - - /** UpdateEntryRequest aspectKeys */ - aspectKeys?: (string[]|null); - } - - /** Represents an UpdateEntryRequest. */ - class UpdateEntryRequest implements IUpdateEntryRequest { - - /** - * Constructs a new UpdateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEntryRequest); - - /** UpdateEntryRequest entry. */ - public entry?: (google.cloud.dataplex.v1.IEntry|null); - - /** UpdateEntryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEntryRequest allowMissing. */ - public allowMissing: boolean; - - /** UpdateEntryRequest deleteMissingAspects. */ - public deleteMissingAspects: boolean; - - /** UpdateEntryRequest aspectKeys. */ - public aspectKeys: string[]; - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEntryRequest): google.cloud.dataplex.v1.UpdateEntryRequest; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IDeleteEntryRequest): google.cloud.dataplex.v1.DeleteEntryRequest; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 ListEntriesRequest. */ - interface IListEntriesRequest { - - /** ListEntriesRequest parent */ - parent?: (string|null); - - /** ListEntriesRequest pageSize */ - pageSize?: (number|null); - - /** ListEntriesRequest pageToken */ - pageToken?: (string|null); - - /** ListEntriesRequest filter */ - filter?: (string|null); - } - - /** Represents a ListEntriesRequest. */ - class ListEntriesRequest implements IListEntriesRequest { - - /** - * Constructs a new ListEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntriesRequest); - - /** ListEntriesRequest parent. */ - public parent: string; - - /** ListEntriesRequest pageSize. */ - public pageSize: number; - - /** ListEntriesRequest pageToken. */ - public pageToken: string; - - /** ListEntriesRequest filter. */ - public filter: string; - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntriesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntriesRequest): google.cloud.dataplex.v1.ListEntriesRequest; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.IListEntriesResponse); - - /** ListEntriesResponse entries. */ - public entries: google.cloud.dataplex.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.dataplex.v1.IListEntriesResponse): google.cloud.dataplex.v1.ListEntriesResponse; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 GetEntryRequest. */ - interface IGetEntryRequest { - - /** GetEntryRequest name */ - name?: (string|null); - - /** GetEntryRequest view */ - view?: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView|null); - - /** GetEntryRequest aspectTypes */ - aspectTypes?: (string[]|null); - - /** GetEntryRequest paths */ - paths?: (string[]|null); - } - - /** Represents a GetEntryRequest. */ - class GetEntryRequest implements IGetEntryRequest { - - /** - * Constructs a new GetEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntryRequest); - - /** GetEntryRequest name. */ - public name: string; - - /** GetEntryRequest view. */ - public view: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView); - - /** GetEntryRequest aspectTypes. */ - public aspectTypes: string[]; - - /** GetEntryRequest paths. */ - public paths: string[]; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntryRequest): google.cloud.dataplex.v1.GetEntryRequest; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 name */ - name?: (string|null); - - /** LookupEntryRequest view */ - view?: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView|null); - - /** LookupEntryRequest aspectTypes */ - aspectTypes?: (string[]|null); - - /** LookupEntryRequest paths */ - paths?: (string[]|null); - - /** LookupEntryRequest entry */ - entry?: (string|null); - } - - /** Represents a LookupEntryRequest. */ - class LookupEntryRequest implements ILookupEntryRequest { - - /** - * Constructs a new LookupEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ILookupEntryRequest); - - /** LookupEntryRequest name. */ - public name: string; - - /** LookupEntryRequest view. */ - public view: (google.cloud.dataplex.v1.EntryView|keyof typeof google.cloud.dataplex.v1.EntryView); - - /** LookupEntryRequest aspectTypes. */ - public aspectTypes: string[]; - - /** LookupEntryRequest paths. */ - public paths: string[]; - - /** LookupEntryRequest entry. */ - public entry: string; - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LookupEntryRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ILookupEntryRequest): google.cloud.dataplex.v1.LookupEntryRequest; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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 a SearchEntriesRequest. */ - interface ISearchEntriesRequest { - - /** SearchEntriesRequest name */ - name?: (string|null); - - /** SearchEntriesRequest query */ - query?: (string|null); - - /** SearchEntriesRequest pageSize */ - pageSize?: (number|null); - - /** SearchEntriesRequest pageToken */ - pageToken?: (string|null); - - /** SearchEntriesRequest orderBy */ - orderBy?: (string|null); - - /** SearchEntriesRequest scope */ - scope?: (string|null); - } - - /** Represents a SearchEntriesRequest. */ - class SearchEntriesRequest implements ISearchEntriesRequest { - - /** - * Constructs a new SearchEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesRequest); - - /** SearchEntriesRequest name. */ - public name: string; - - /** SearchEntriesRequest query. */ - public query: string; - - /** SearchEntriesRequest pageSize. */ - public pageSize: number; - - /** SearchEntriesRequest pageToken. */ - public pageToken: string; - - /** SearchEntriesRequest orderBy. */ - public orderBy: string; - - /** SearchEntriesRequest scope. */ - public scope: string; - - /** - * Creates a new SearchEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchEntriesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesRequest): google.cloud.dataplex.v1.SearchEntriesRequest; - - /** - * Encodes the specified SearchEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. - * @param message SearchEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISearchEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. - * @param message SearchEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesRequest; - - /** - * Decodes a SearchEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesRequest; - - /** - * Verifies a SearchEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesRequest; - - /** - * Creates a plain object from a SearchEntriesRequest message. Also converts values to other types if specified. - * @param message SearchEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SearchEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchEntriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchEntriesResult. */ - interface ISearchEntriesResult { - - /** SearchEntriesResult linkedResource */ - linkedResource?: (string|null); - - /** SearchEntriesResult dataplexEntry */ - dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); - - /** SearchEntriesResult snippets */ - snippets?: (google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null); - } - - /** Represents a SearchEntriesResult. */ - class SearchEntriesResult implements ISearchEntriesResult { - - /** - * Constructs a new SearchEntriesResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesResult); - - /** SearchEntriesResult linkedResource. */ - public linkedResource: string; - - /** SearchEntriesResult dataplexEntry. */ - public dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); - - /** SearchEntriesResult snippets. */ - public snippets?: (google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null); - - /** - * Creates a new SearchEntriesResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchEntriesResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesResult): google.cloud.dataplex.v1.SearchEntriesResult; - - /** - * Encodes the specified SearchEntriesResult message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. - * @param message SearchEntriesResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISearchEntriesResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchEntriesResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. - * @param message SearchEntriesResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchEntriesResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchEntriesResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResult; - - /** - * Decodes a SearchEntriesResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchEntriesResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResult; - - /** - * Verifies a SearchEntriesResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchEntriesResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchEntriesResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResult; - - /** - * Creates a plain object from a SearchEntriesResult message. Also converts values to other types if specified. - * @param message SearchEntriesResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchEntriesResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchEntriesResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SearchEntriesResult { - - /** Properties of a Snippets. */ - interface ISnippets { - - /** Snippets dataplexEntry */ - dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); - } - - /** Represents a Snippets. */ - class Snippets implements ISnippets { - - /** - * Constructs a new Snippets. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets); - - /** Snippets dataplexEntry. */ - public dataplexEntry?: (google.cloud.dataplex.v1.IEntry|null); - - /** - * Creates a new Snippets instance using the specified properties. - * @param [properties] Properties to set - * @returns Snippets instance - */ - public static create(properties?: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; - - /** - * Encodes the specified Snippets message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. - * @param message Snippets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Snippets message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. - * @param message Snippets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.SearchEntriesResult.ISnippets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Snippets message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Snippets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; - - /** - * Decodes a Snippets message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Snippets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; - - /** - * Verifies a Snippets message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Snippets message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Snippets - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResult.Snippets; - - /** - * Creates a plain object from a Snippets message. Also converts values to other types if specified. - * @param message Snippets - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResult.Snippets, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Snippets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Snippets - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchEntriesResponse. */ - interface ISearchEntriesResponse { - - /** SearchEntriesResponse results */ - results?: (google.cloud.dataplex.v1.ISearchEntriesResult[]|null); - - /** SearchEntriesResponse totalSize */ - totalSize?: (number|null); - - /** SearchEntriesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** SearchEntriesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a SearchEntriesResponse. */ - class SearchEntriesResponse implements ISearchEntriesResponse { - - /** - * Constructs a new SearchEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISearchEntriesResponse); - - /** SearchEntriesResponse results. */ - public results: google.cloud.dataplex.v1.ISearchEntriesResult[]; - - /** SearchEntriesResponse totalSize. */ - public totalSize: number; - - /** SearchEntriesResponse nextPageToken. */ - public nextPageToken: string; - - /** SearchEntriesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new SearchEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchEntriesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISearchEntriesResponse): google.cloud.dataplex.v1.SearchEntriesResponse; - - /** - * Encodes the specified SearchEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. - * @param message SearchEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISearchEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. - * @param message SearchEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISearchEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SearchEntriesResponse; - - /** - * Decodes a SearchEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SearchEntriesResponse; - - /** - * Verifies a SearchEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SearchEntriesResponse; - - /** - * Creates a plain object from a SearchEntriesResponse message. Also converts values to other types if specified. - * @param message SearchEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SearchEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchEntriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportItem. */ - interface IImportItem { - - /** ImportItem entry */ - entry?: (google.cloud.dataplex.v1.IEntry|null); - - /** ImportItem updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** ImportItem aspectKeys */ - aspectKeys?: (string[]|null); - } - - /** Represents an ImportItem. */ - class ImportItem implements IImportItem { - - /** - * Constructs a new ImportItem. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IImportItem); - - /** ImportItem entry. */ - public entry?: (google.cloud.dataplex.v1.IEntry|null); - - /** ImportItem updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** ImportItem aspectKeys. */ - public aspectKeys: string[]; - - /** - * Creates a new ImportItem instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportItem instance - */ - public static create(properties?: google.cloud.dataplex.v1.IImportItem): google.cloud.dataplex.v1.ImportItem; - - /** - * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. - * @param message ImportItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. - * @param message ImportItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ImportItem; - - /** - * Decodes an ImportItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ImportItem; - - /** - * Verifies an ImportItem message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportItem - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ImportItem; - - /** - * Creates a plain object from an ImportItem message. Also converts values to other types if specified. - * @param message ImportItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ImportItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateMetadataJobRequest. */ - interface ICreateMetadataJobRequest { - - /** CreateMetadataJobRequest parent */ - parent?: (string|null); - - /** CreateMetadataJobRequest metadataJob */ - metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); - - /** CreateMetadataJobRequest metadataJobId */ - metadataJobId?: (string|null); - - /** CreateMetadataJobRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateMetadataJobRequest. */ - class CreateMetadataJobRequest implements ICreateMetadataJobRequest { - - /** - * Constructs a new CreateMetadataJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest); - - /** CreateMetadataJobRequest parent. */ - public parent: string; - - /** CreateMetadataJobRequest metadataJob. */ - public metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); - - /** CreateMetadataJobRequest metadataJobId. */ - public metadataJobId: string; - - /** CreateMetadataJobRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateMetadataJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateMetadataJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest): google.cloud.dataplex.v1.CreateMetadataJobRequest; - - /** - * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. - * @param message CreateMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. - * @param message CreateMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateMetadataJobRequest; - - /** - * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateMetadataJobRequest; - - /** - * Verifies a CreateMetadataJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateMetadataJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateMetadataJobRequest; - - /** - * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. - * @param message CreateMetadataJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateMetadataJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateMetadataJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMetadataJobRequest. */ - interface IGetMetadataJobRequest { - - /** GetMetadataJobRequest name */ - name?: (string|null); - } - - /** Represents a GetMetadataJobRequest. */ - class GetMetadataJobRequest implements IGetMetadataJobRequest { - - /** - * Constructs a new GetMetadataJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest); - - /** GetMetadataJobRequest name. */ - public name: string; - - /** - * Creates a new GetMetadataJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMetadataJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest): google.cloud.dataplex.v1.GetMetadataJobRequest; - - /** - * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. - * @param message GetMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. - * @param message GetMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMetadataJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetMetadataJobRequest; - - /** - * Decodes a GetMetadataJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetMetadataJobRequest; - - /** - * Verifies a GetMetadataJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMetadataJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetMetadataJobRequest; - - /** - * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. - * @param message GetMetadataJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMetadataJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMetadataJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMetadataJobsRequest. */ - interface IListMetadataJobsRequest { - - /** ListMetadataJobsRequest parent */ - parent?: (string|null); - - /** ListMetadataJobsRequest pageSize */ - pageSize?: (number|null); - - /** ListMetadataJobsRequest pageToken */ - pageToken?: (string|null); - - /** ListMetadataJobsRequest filter */ - filter?: (string|null); - - /** ListMetadataJobsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListMetadataJobsRequest. */ - class ListMetadataJobsRequest implements IListMetadataJobsRequest { - - /** - * Constructs a new ListMetadataJobsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest); - - /** ListMetadataJobsRequest parent. */ - public parent: string; - - /** ListMetadataJobsRequest pageSize. */ - public pageSize: number; - - /** ListMetadataJobsRequest pageToken. */ - public pageToken: string; - - /** ListMetadataJobsRequest filter. */ - public filter: string; - - /** ListMetadataJobsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListMetadataJobsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetadataJobsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest): google.cloud.dataplex.v1.ListMetadataJobsRequest; - - /** - * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. - * @param message ListMetadataJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. - * @param message ListMetadataJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetadataJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsRequest; - - /** - * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetadataJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsRequest; - - /** - * Verifies a ListMetadataJobsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetadataJobsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsRequest; - - /** - * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. - * @param message ListMetadataJobsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMetadataJobsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMetadataJobsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMetadataJobsResponse. */ - interface IListMetadataJobsResponse { - - /** ListMetadataJobsResponse metadataJobs */ - metadataJobs?: (google.cloud.dataplex.v1.IMetadataJob[]|null); - - /** ListMetadataJobsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListMetadataJobsResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListMetadataJobsResponse. */ - class ListMetadataJobsResponse implements IListMetadataJobsResponse { - - /** - * Constructs a new ListMetadataJobsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse); - - /** ListMetadataJobsResponse metadataJobs. */ - public metadataJobs: google.cloud.dataplex.v1.IMetadataJob[]; - - /** ListMetadataJobsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListMetadataJobsResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListMetadataJobsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetadataJobsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse): google.cloud.dataplex.v1.ListMetadataJobsResponse; - - /** - * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. - * @param message ListMetadataJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. - * @param message ListMetadataJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetadataJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsResponse; - - /** - * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetadataJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsResponse; - - /** - * Verifies a ListMetadataJobsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetadataJobsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsResponse; - - /** - * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. - * @param message ListMetadataJobsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMetadataJobsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMetadataJobsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelMetadataJobRequest. */ - interface ICancelMetadataJobRequest { - - /** CancelMetadataJobRequest name */ - name?: (string|null); - } - - /** Represents a CancelMetadataJobRequest. */ - class CancelMetadataJobRequest implements ICancelMetadataJobRequest { - - /** - * Constructs a new CancelMetadataJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest); - - /** CancelMetadataJobRequest name. */ - public name: string; - - /** - * Creates a new CancelMetadataJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelMetadataJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest): google.cloud.dataplex.v1.CancelMetadataJobRequest; - - /** - * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. - * @param message CancelMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. - * @param message CancelMetadataJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelMetadataJobRequest; - - /** - * Decodes a CancelMetadataJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelMetadataJobRequest; - - /** - * Verifies a CancelMetadataJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelMetadataJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelMetadataJobRequest; - - /** - * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. - * @param message CancelMetadataJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CancelMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelMetadataJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelMetadataJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MetadataJob. */ - interface IMetadataJob { - - /** MetadataJob name */ - name?: (string|null); - - /** MetadataJob uid */ - uid?: (string|null); - - /** MetadataJob createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataJob updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataJob labels */ - labels?: ({ [k: string]: string }|null); - - /** MetadataJob type */ - type?: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type|null); - - /** MetadataJob importSpec */ - importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); - - /** MetadataJob importResult */ - importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); - - /** MetadataJob status */ - status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); - } - - /** Represents a MetadataJob. */ - class MetadataJob implements IMetadataJob { - - /** - * Constructs a new MetadataJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IMetadataJob); - - /** MetadataJob name. */ - public name: string; - - /** MetadataJob uid. */ - public uid: string; - - /** MetadataJob createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MetadataJob updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** MetadataJob labels. */ - public labels: { [k: string]: string }; - - /** MetadataJob type. */ - public type: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type); - - /** MetadataJob importSpec. */ - public importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); - - /** MetadataJob importResult. */ - public importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); - - /** MetadataJob status. */ - public status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); - - /** MetadataJob spec. */ - public spec?: "importSpec"; - - /** MetadataJob result. */ - public result?: "importResult"; - - /** - * Creates a new MetadataJob instance using the specified properties. - * @param [properties] Properties to set - * @returns MetadataJob instance - */ - public static create(properties?: google.cloud.dataplex.v1.IMetadataJob): google.cloud.dataplex.v1.MetadataJob; - - /** - * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. - * @param message MetadataJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. - * @param message MetadataJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetadataJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetadataJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob; - - /** - * Decodes a MetadataJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetadataJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob; - - /** - * Verifies a MetadataJob message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetadataJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob; - - /** - * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. - * @param message MetadataJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.MetadataJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetadataJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetadataJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetadataJob { - - /** Properties of an ImportJobResult. */ - interface IImportJobResult { - - /** ImportJobResult deletedEntries */ - deletedEntries?: (number|Long|string|null); - - /** ImportJobResult updatedEntries */ - updatedEntries?: (number|Long|string|null); - - /** ImportJobResult createdEntries */ - createdEntries?: (number|Long|string|null); - - /** ImportJobResult unchangedEntries */ - unchangedEntries?: (number|Long|string|null); - - /** ImportJobResult recreatedEntries */ - recreatedEntries?: (number|Long|string|null); - - /** ImportJobResult updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ImportJobResult. */ - class ImportJobResult implements IImportJobResult { - - /** - * Constructs a new ImportJobResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult); - - /** ImportJobResult deletedEntries. */ - public deletedEntries: (number|Long|string); - - /** ImportJobResult updatedEntries. */ - public updatedEntries: (number|Long|string); - - /** ImportJobResult createdEntries. */ - public createdEntries: (number|Long|string); - - /** ImportJobResult unchangedEntries. */ - public unchangedEntries: (number|Long|string); - - /** ImportJobResult recreatedEntries. */ - public recreatedEntries: (number|Long|string); - - /** ImportJobResult updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ImportJobResult instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportJobResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; - - /** - * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. - * @param message ImportJobResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. - * @param message ImportJobResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportJobResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportJobResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; - - /** - * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportJobResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; - - /** - * Verifies an ImportJobResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportJobResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; - - /** - * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. - * @param message ImportJobResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportJobResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportJobResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportJobSpec. */ - interface IImportJobSpec { - - /** ImportJobSpec sourceStorageUri */ - sourceStorageUri?: (string|null); - - /** ImportJobSpec sourceCreateTime */ - sourceCreateTime?: (google.protobuf.ITimestamp|null); - - /** ImportJobSpec scope */ - scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); - - /** ImportJobSpec entrySyncMode */ - entrySyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); - - /** ImportJobSpec aspectSyncMode */ - aspectSyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); - - /** ImportJobSpec logLevel */ - logLevel?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null); - } - - /** Represents an ImportJobSpec. */ - class ImportJobSpec implements IImportJobSpec { - - /** - * Constructs a new ImportJobSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec); - - /** ImportJobSpec sourceStorageUri. */ - public sourceStorageUri: string; - - /** ImportJobSpec sourceCreateTime. */ - public sourceCreateTime?: (google.protobuf.ITimestamp|null); - - /** ImportJobSpec scope. */ - public scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); - - /** ImportJobSpec entrySyncMode. */ - public entrySyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); - - /** ImportJobSpec aspectSyncMode. */ - public aspectSyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); - - /** ImportJobSpec logLevel. */ - public logLevel: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel); - - /** - * Creates a new ImportJobSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportJobSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; - - /** - * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. - * @param message ImportJobSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. - * @param message ImportJobSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportJobSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportJobSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; - - /** - * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportJobSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; - - /** - * Verifies an ImportJobSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportJobSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; - - /** - * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. - * @param message ImportJobSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportJobSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportJobSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ImportJobSpec { - - /** SyncMode enum. */ - enum SyncMode { - SYNC_MODE_UNSPECIFIED = 0, - FULL = 1, - INCREMENTAL = 2 - } - - /** LogLevel enum. */ - enum LogLevel { - LOG_LEVEL_UNSPECIFIED = 0, - DEBUG = 1, - INFO = 2 - } - - /** Properties of an ImportJobScope. */ - interface IImportJobScope { - - /** ImportJobScope entryGroups */ - entryGroups?: (string[]|null); - - /** ImportJobScope entryTypes */ - entryTypes?: (string[]|null); - - /** ImportJobScope aspectTypes */ - aspectTypes?: (string[]|null); - } - - /** Represents an ImportJobScope. */ - class ImportJobScope implements IImportJobScope { - - /** - * Constructs a new ImportJobScope. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope); - - /** ImportJobScope entryGroups. */ - public entryGroups: string[]; - - /** ImportJobScope entryTypes. */ - public entryTypes: string[]; - - /** ImportJobScope aspectTypes. */ - public aspectTypes: string[]; - - /** - * Creates a new ImportJobScope instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportJobScope instance - */ - public static create(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; - - /** - * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. - * @param message ImportJobScope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. - * @param message ImportJobScope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportJobScope message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportJobScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; - - /** - * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportJobScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; - - /** - * Verifies an ImportJobScope message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportJobScope - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; - - /** - * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. - * @param message ImportJobScope - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportJobScope to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportJobScope - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - IMPORT = 1 - } - - /** Properties of a Status. */ - interface IStatus { - - /** Status state */ - state?: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State|null); - - /** Status message */ - message?: (string|null); - - /** Status completionPercent */ - completionPercent?: (number|null); - - /** Status updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus); - - /** Status state. */ - public state: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State); - - /** Status message. */ - public message: string; - - /** Status completionPercent. */ - public completionPercent: number; - - /** Status updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus): google.cloud.dataplex.v1.MetadataJob.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Status { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - QUEUED = 1, - RUNNING = 2, - CANCELING = 3, - CANCELED = 4, - SUCCEEDED = 5, - FAILED = 6, - SUCCEEDED_WITH_ERRORS = 7 - } - } - } - - /** EntryView enum. */ - enum EntryView { - ENTRY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2, - CUSTOM = 3, - ALL = 4 - } - - /** TransferStatus enum. */ - enum TransferStatus { - TRANSFER_STATUS_UNSPECIFIED = 0, - TRANSFER_STATUS_MIGRATED = 1, - TRANSFER_STATUS_TRANSFERRED = 2 - } - - /** Represents a DataplexService */ - class DataplexService extends $protobuf.rpc.Service { - - /** - * Constructs a new DataplexService 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 DataplexService 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): DataplexService; - - /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; - - /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @returns Promise - */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; - - /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; - - /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @returns Promise - */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; - - /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; - - /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @returns Promise - */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; - - /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLakesResponse - */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; - - /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @returns Promise - */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; - - /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Lake - */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; - - /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @returns Promise - */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; - - /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse - */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; - - /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @returns Promise - */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; - - /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; - - /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @returns Promise - */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; - - /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; - - /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @returns Promise - */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; - - /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; - - /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @returns Promise - */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; - - /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListZonesResponse - */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; - - /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @returns Promise - */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; - - /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Zone - */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; - - /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @returns Promise - */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; - - /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse - */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; - - /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @returns Promise - */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; - - /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; - - /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @returns Promise - */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; - - /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; - - /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @returns Promise - */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; - - /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; - - /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @returns Promise - */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; - - /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse - */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; - - /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise - */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; - - /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Asset - */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; - - /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @returns Promise - */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; - - /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse - */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; - - /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @returns Promise - */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; - - /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; - - /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @returns Promise - */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; - - /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; - - /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @returns Promise - */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; - - /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; - - /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @returns Promise - */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; - - /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTasksResponse - */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; - - /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @returns Promise - */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; - - /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Task - */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; - - /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @returns Promise - */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; - - /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobsResponse - */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; - - /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @returns Promise - */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; - - /** - * Calls RunTask. - * @param request RunTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunTaskResponse - */ - public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.RunTaskCallback): void; - - /** - * Calls RunTask. - * @param request RunTaskRequest message or plain object - * @returns Promise - */ - public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest): Promise; - - /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job - */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; - - /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @returns Promise - */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; - - /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; - - /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @returns Promise - */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise - */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise - */ - public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): Promise; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback): void; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise - */ - public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): Promise; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - */ - public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback): void; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise - */ - public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest): Promise; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback): void; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise - */ - public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest): Promise; - - /** - * Calls ListSessions. - * @param request ListSessionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSessionsResponse - */ - public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListSessionsCallback): void; - - /** - * Calls ListSessions. - * @param request ListSessionsRequest message or plain object - * @returns Promise - */ - public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest): Promise; - } - - namespace DataplexService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. - * @param error Error, if any - * @param [response] ListLakesResponse - */ - type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. - * @param error Error, if any - * @param [response] Lake - */ - type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. - * @param error Error, if any - * @param [response] ListActionsResponse - */ - type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. - * @param error Error, if any - * @param [response] ListZonesResponse - */ - type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. - * @param error Error, if any - * @param [response] Zone - */ - type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. - * @param error Error, if any - * @param [response] ListActionsResponse - */ - type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse - */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. - * @param error Error, if any - * @param [response] Asset - */ - type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. - * @param error Error, if any - * @param [response] ListActionsResponse - */ - type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. - * @param error Error, if any - * @param [response] ListTasksResponse - */ - type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. - * @param error Error, if any - * @param [response] Task - */ - type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. - * @param error Error, if any - * @param [response] ListJobsResponse - */ - type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. - * @param error Error, if any - * @param [response] RunTaskResponse - */ - type RunTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunTaskResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. - * @param error Error, if any - * @param [response] Job - */ - type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. - * @param error Error, if any - * @param [response] ListEnvironmentsResponse - */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. - * @param error Error, if any - * @param [response] Environment - */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. - * @param error Error, if any - * @param [response] ListSessionsResponse - */ - type ListSessionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListSessionsResponse) => void; - } - - /** Properties of a CreateLakeRequest. */ - interface ICreateLakeRequest { - - /** CreateLakeRequest parent */ - parent?: (string|null); - - /** CreateLakeRequest lakeId */ - lakeId?: (string|null); - - /** CreateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); - - /** CreateLakeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateLakeRequest. */ - class CreateLakeRequest implements ICreateLakeRequest { - - /** - * Constructs a new CreateLakeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); - - /** CreateLakeRequest parent. */ - public parent: string; - - /** CreateLakeRequest lakeId. */ - public lakeId: string; - - /** CreateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); - - /** CreateLakeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateLakeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateLakeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; - - /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; - - /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; - - /** - * Verifies a CreateLakeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateLakeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; - - /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. - * @param message CreateLakeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateLakeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateLakeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateLakeRequest. */ - interface IUpdateLakeRequest { - - /** UpdateLakeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); - - /** UpdateLakeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateLakeRequest. */ - class UpdateLakeRequest implements IUpdateLakeRequest { - - /** - * Constructs a new UpdateLakeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); - - /** UpdateLakeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); - - /** UpdateLakeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateLakeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateLakeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; - - /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; - - /** - * Verifies an UpdateLakeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateLakeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; - - /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. - * @param message UpdateLakeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateLakeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateLakeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteLakeRequest. */ - interface IDeleteLakeRequest { - - /** DeleteLakeRequest name */ - name?: (string|null); - } - - /** Represents a DeleteLakeRequest. */ - class DeleteLakeRequest implements IDeleteLakeRequest { - - /** - * Constructs a new DeleteLakeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); - - /** DeleteLakeRequest name. */ - public name: string; - - /** - * Creates a new DeleteLakeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteLakeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; - - /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteLakeRequest; - - /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteLakeRequest; - - /** - * Verifies a DeleteLakeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteLakeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; - - /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. - * @param message DeleteLakeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteLakeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteLakeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListLakesRequest. */ - interface IListLakesRequest { - - /** ListLakesRequest parent */ - parent?: (string|null); - - /** ListLakesRequest pageSize */ - pageSize?: (number|null); - - /** ListLakesRequest pageToken */ - pageToken?: (string|null); - - /** ListLakesRequest filter */ - filter?: (string|null); - - /** ListLakesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListLakesRequest. */ - class ListLakesRequest implements IListLakesRequest { - - /** - * Constructs a new ListLakesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); - - /** ListLakesRequest parent. */ - public parent: string; - - /** ListLakesRequest pageSize. */ - public pageSize: number; - - /** ListLakesRequest pageToken. */ - public pageToken: string; - - /** ListLakesRequest filter. */ - public filter: string; - - /** ListLakesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListLakesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLakesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; - - /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLakesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; - - /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; - - /** - * Verifies a ListLakesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLakesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; - - /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. - * @param message ListLakesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLakesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListLakesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListLakesResponse. */ - interface IListLakesResponse { - - /** ListLakesResponse lakes */ - lakes?: (google.cloud.dataplex.v1.ILake[]|null); - - /** ListLakesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListLakesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListLakesResponse. */ - class ListLakesResponse implements IListLakesResponse { - - /** - * Constructs a new ListLakesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); - - /** ListLakesResponse lakes. */ - public lakes: google.cloud.dataplex.v1.ILake[]; - - /** ListLakesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListLakesResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListLakesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLakesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; - - /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLakesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesResponse; - - /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesResponse; - - /** - * Verifies a ListLakesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLakesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; - - /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @param message ListLakesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLakesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListLakesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListLakeActionsRequest. */ - interface IListLakeActionsRequest { - - /** ListLakeActionsRequest parent */ - parent?: (string|null); - - /** ListLakeActionsRequest pageSize */ - pageSize?: (number|null); - - /** ListLakeActionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListLakeActionsRequest. */ - class ListLakeActionsRequest implements IListLakeActionsRequest { - - /** - * Constructs a new ListLakeActionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); - - /** ListLakeActionsRequest parent. */ - public parent: string; - - /** ListLakeActionsRequest pageSize. */ - public pageSize: number; - - /** ListLakeActionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListLakeActionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListLakeActionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; - - /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; - - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakeActionsRequest; - - /** - * Verifies a ListLakeActionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListLakeActionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; - - /** - * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. - * @param message ListLakeActionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListLakeActionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListLakeActionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListActionsResponse. */ - interface IListActionsResponse { - - /** ListActionsResponse actions */ - actions?: (google.cloud.dataplex.v1.IAction[]|null); - - /** ListActionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListActionsResponse. */ - class ListActionsResponse implements IListActionsResponse { - - /** - * Constructs a new ListActionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); - - /** ListActionsResponse actions. */ - public actions: google.cloud.dataplex.v1.IAction[]; - - /** ListActionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListActionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListActionsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; - - /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListActionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; - - /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; - - /** - * Verifies a ListActionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListActionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; - - /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @param message ListActionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListActionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListActionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetLakeRequest. */ - interface IGetLakeRequest { - - /** GetLakeRequest name */ - name?: (string|null); - } - - /** Represents a GetLakeRequest. */ - class GetLakeRequest implements IGetLakeRequest { - - /** - * Constructs a new GetLakeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); - - /** GetLakeRequest name. */ - public name: string; - - /** - * Creates a new GetLakeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetLakeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; - - /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetLakeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; - - /** - * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; - - /** - * Verifies a GetLakeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetLakeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; - - /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @param message GetLakeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetLakeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetLakeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateZoneRequest. */ - interface ICreateZoneRequest { - - /** CreateZoneRequest parent */ - parent?: (string|null); - - /** CreateZoneRequest zoneId */ - zoneId?: (string|null); - - /** CreateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); - - /** CreateZoneRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateZoneRequest. */ - class CreateZoneRequest implements ICreateZoneRequest { - - /** - * Constructs a new CreateZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); - - /** CreateZoneRequest parent. */ - public parent: string; - - /** CreateZoneRequest zoneId. */ - public zoneId: string; - - /** CreateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); - - /** CreateZoneRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; - - /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; - - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; - - /** - * Verifies a CreateZoneRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; - - /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @param message CreateZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateZoneRequest. */ - interface IUpdateZoneRequest { - - /** UpdateZoneRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); - - /** UpdateZoneRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateZoneRequest. */ - class UpdateZoneRequest implements IUpdateZoneRequest { - - /** - * Constructs a new UpdateZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); - - /** UpdateZoneRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); - - /** UpdateZoneRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; - - /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; - - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; - - /** - * Verifies an UpdateZoneRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; - - /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @param message UpdateZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteZoneRequest. */ - interface IDeleteZoneRequest { - - /** DeleteZoneRequest name */ - name?: (string|null); - } - - /** Represents a DeleteZoneRequest. */ - class DeleteZoneRequest implements IDeleteZoneRequest { - - /** - * Constructs a new DeleteZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); - - /** DeleteZoneRequest name. */ - public name: string; - - /** - * Creates a new DeleteZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; - - /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; - - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; - - /** - * Verifies a DeleteZoneRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; - - /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @param message DeleteZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListZonesRequest. */ - interface IListZonesRequest { - - /** ListZonesRequest parent */ - parent?: (string|null); - - /** ListZonesRequest pageSize */ - pageSize?: (number|null); - - /** ListZonesRequest pageToken */ - pageToken?: (string|null); - - /** ListZonesRequest filter */ - filter?: (string|null); - - /** ListZonesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListZonesRequest. */ - class ListZonesRequest implements IListZonesRequest { - - /** - * Constructs a new ListZonesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); - - /** ListZonesRequest parent. */ - public parent: string; - - /** ListZonesRequest pageSize. */ - public pageSize: number; - - /** ListZonesRequest pageToken. */ - public pageToken: string; - - /** ListZonesRequest filter. */ - public filter: string; - - /** ListZonesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListZonesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZonesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; - - /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListZonesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; - - /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; - - /** - * Verifies a ListZonesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZonesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; - - /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. - * @param message ListZonesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListZonesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListZonesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListZonesResponse. */ - interface IListZonesResponse { - - /** ListZonesResponse zones */ - zones?: (google.cloud.dataplex.v1.IZone[]|null); - - /** ListZonesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListZonesResponse. */ - class ListZonesResponse implements IListZonesResponse { - - /** - * Constructs a new ListZonesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); - - /** ListZonesResponse zones. */ - public zones: google.cloud.dataplex.v1.IZone[]; - - /** ListZonesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListZonesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZonesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; - - /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListZonesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; - - /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; - - /** - * Verifies a ListZonesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZonesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; - - /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. - * @param message ListZonesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListZonesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListZonesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListZoneActionsRequest. */ - interface IListZoneActionsRequest { - - /** ListZoneActionsRequest parent */ - parent?: (string|null); - - /** ListZoneActionsRequest pageSize */ - pageSize?: (number|null); - - /** ListZoneActionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListZoneActionsRequest. */ - class ListZoneActionsRequest implements IListZoneActionsRequest { - - /** - * Constructs a new ListZoneActionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); - - /** ListZoneActionsRequest parent. */ - public parent: string; - - /** ListZoneActionsRequest pageSize. */ - public pageSize: number; - - /** ListZoneActionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListZoneActionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZoneActionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; - - /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; - - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; - - /** - * Verifies a ListZoneActionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZoneActionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; - - /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. - * @param message ListZoneActionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListZoneActionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListZoneActionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetZoneRequest. */ - interface IGetZoneRequest { - - /** GetZoneRequest name */ - name?: (string|null); - } - - /** Represents a GetZoneRequest. */ - class GetZoneRequest implements IGetZoneRequest { - - /** - * Constructs a new GetZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); - - /** GetZoneRequest name. */ - public name: string; - - /** - * Creates a new GetZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; - - /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; - - /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; - - /** - * Verifies a GetZoneRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; - - /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. - * @param message GetZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateAssetRequest. */ - interface ICreateAssetRequest { - - /** CreateAssetRequest parent */ - parent?: (string|null); - - /** CreateAssetRequest assetId */ - assetId?: (string|null); - - /** CreateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); - - /** CreateAssetRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateAssetRequest. */ - class CreateAssetRequest implements ICreateAssetRequest { - - /** - * Constructs a new CreateAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); - - /** CreateAssetRequest parent. */ - public parent: string; - - /** CreateAssetRequest assetId. */ - public assetId: string; - - /** CreateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); - - /** CreateAssetRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; - - /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; - - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; - - /** - * Verifies a CreateAssetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; - - /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. - * @param message CreateAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateAssetRequest. */ - interface IUpdateAssetRequest { - - /** UpdateAssetRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); - - /** UpdateAssetRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateAssetRequest. */ - class UpdateAssetRequest implements IUpdateAssetRequest { - - /** - * Constructs a new UpdateAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); - - /** UpdateAssetRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); - - /** UpdateAssetRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; - - /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; - - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; - - /** - * Verifies an UpdateAssetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; - - /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. - * @param message UpdateAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteAssetRequest. */ - interface IDeleteAssetRequest { - - /** DeleteAssetRequest name */ - name?: (string|null); - } - - /** Represents a DeleteAssetRequest. */ - class DeleteAssetRequest implements IDeleteAssetRequest { - - /** - * Constructs a new DeleteAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); - - /** DeleteAssetRequest name. */ - public name: string; - - /** - * Creates a new DeleteAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; - - /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; - - /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; - - /** - * Verifies a DeleteAssetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; - - /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. - * @param message DeleteAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { - - /** ListAssetsRequest parent */ - parent?: (string|null); - - /** ListAssetsRequest pageSize */ - pageSize?: (number|null); - - /** ListAssetsRequest pageToken */ - pageToken?: (string|null); - - /** ListAssetsRequest filter */ - filter?: (string|null); - - /** ListAssetsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { - - /** - * Constructs a new ListAssetsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); - - /** ListAssetsRequest parent. */ - public parent: string; - - /** ListAssetsRequest pageSize. */ - public pageSize: number; - - /** ListAssetsRequest pageToken. */ - public pageToken: string; - - /** ListAssetsRequest filter. */ - public filter: string; - - /** ListAssetsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListAssetsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; - - /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; - - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; - - /** - * Verifies a ListAssetsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; - - /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAssetsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAssetsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { - - /** ListAssetsResponse assets */ - assets?: (google.cloud.dataplex.v1.IAsset[]|null); - - /** ListAssetsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { - - /** - * Constructs a new ListAssetsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); - - /** ListAssetsResponse assets. */ - public assets: google.cloud.dataplex.v1.IAsset[]; - - /** ListAssetsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListAssetsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; - - /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; - - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; - - /** - * Verifies a ListAssetsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; - - /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAssetsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAssetsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListAssetActionsRequest. */ - interface IListAssetActionsRequest { - - /** ListAssetActionsRequest parent */ - parent?: (string|null); - - /** ListAssetActionsRequest pageSize */ - pageSize?: (number|null); - - /** ListAssetActionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListAssetActionsRequest. */ - class ListAssetActionsRequest implements IListAssetActionsRequest { - - /** - * Constructs a new ListAssetActionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); - - /** ListAssetActionsRequest parent. */ - public parent: string; - - /** ListAssetActionsRequest pageSize. */ - public pageSize: number; - - /** ListAssetActionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListAssetActionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetActionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; - - /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetActionsRequest; - - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetActionsRequest; - - /** - * Verifies a ListAssetActionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetActionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; - - /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. - * @param message ListAssetActionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListAssetActionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListAssetActionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetAssetRequest. */ - interface IGetAssetRequest { - - /** GetAssetRequest name */ - name?: (string|null); - } - - /** Represents a GetAssetRequest. */ - class GetAssetRequest implements IGetAssetRequest { - - /** - * Constructs a new GetAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); - - /** GetAssetRequest name. */ - public name: string; - - /** - * Creates a new GetAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; - - /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; - - /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; - - /** - * Verifies a GetAssetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; - - /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. - * @param message GetAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata verb */ - verb?: (string|null); - - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); - - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata verb. */ - public verb: string; - - /** OperationMetadata statusMessage. */ - public statusMessage: string; - - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; - - /** - * Verifies an OperationMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTaskRequest. */ - interface ICreateTaskRequest { - - /** CreateTaskRequest parent */ - parent?: (string|null); - - /** CreateTaskRequest taskId */ - taskId?: (string|null); - - /** CreateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); - - /** CreateTaskRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateTaskRequest. */ - class CreateTaskRequest implements ICreateTaskRequest { - - /** - * Constructs a new CreateTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); - - /** CreateTaskRequest parent. */ - public parent: string; - - /** CreateTaskRequest taskId. */ - public taskId: string; - - /** CreateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); - - /** CreateTaskRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; - - /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateTaskRequest; - - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateTaskRequest; - - /** - * Verifies a CreateTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; - - /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. - * @param message CreateTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTaskRequest. */ - interface IUpdateTaskRequest { - - /** UpdateTaskRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); - - /** UpdateTaskRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateTaskRequest. */ - class UpdateTaskRequest implements IUpdateTaskRequest { - - /** - * Constructs a new UpdateTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); - - /** UpdateTaskRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); - - /** UpdateTaskRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; - - /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateTaskRequest; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateTaskRequest; - - /** - * Verifies an UpdateTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; - - /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. - * @param message UpdateTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTaskRequest. */ - interface IDeleteTaskRequest { - - /** DeleteTaskRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTaskRequest. */ - class DeleteTaskRequest implements IDeleteTaskRequest { - - /** - * Constructs a new DeleteTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); - - /** DeleteTaskRequest name. */ - public name: string; - - /** - * Creates a new DeleteTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; - - /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; - - /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; - - /** - * Verifies a DeleteTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; - - /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. - * @param message DeleteTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTasksRequest. */ - interface IListTasksRequest { - - /** ListTasksRequest parent */ - parent?: (string|null); - - /** ListTasksRequest pageSize */ - pageSize?: (number|null); - - /** ListTasksRequest pageToken */ - pageToken?: (string|null); - - /** ListTasksRequest filter */ - filter?: (string|null); - - /** ListTasksRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListTasksRequest. */ - class ListTasksRequest implements IListTasksRequest { - - /** - * Constructs a new ListTasksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); - - /** ListTasksRequest parent. */ - public parent: string; - - /** ListTasksRequest pageSize. */ - public pageSize: number; - - /** ListTasksRequest pageToken. */ - public pageToken: string; - - /** ListTasksRequest filter. */ - public filter: string; - - /** ListTasksRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListTasksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTasksRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; - - /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTasksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksRequest; - - /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksRequest; - - /** - * Verifies a ListTasksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTasksRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; - - /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. - * @param message ListTasksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTasksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTasksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTasksResponse. */ - interface IListTasksResponse { - - /** ListTasksResponse tasks */ - tasks?: (google.cloud.dataplex.v1.ITask[]|null); - - /** ListTasksResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListTasksResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListTasksResponse. */ - class ListTasksResponse implements IListTasksResponse { - - /** - * Constructs a new ListTasksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); - - /** ListTasksResponse tasks. */ - public tasks: google.cloud.dataplex.v1.ITask[]; - - /** ListTasksResponse nextPageToken. */ - public nextPageToken: string; - - /** ListTasksResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListTasksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTasksResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; - - /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTasksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; - - /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; - - /** - * Verifies a ListTasksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTasksResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; - - /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. - * @param message ListTasksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTasksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTasksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTaskRequest. */ - interface IGetTaskRequest { - - /** GetTaskRequest name */ - name?: (string|null); - } - - /** Represents a GetTaskRequest. */ - class GetTaskRequest implements IGetTaskRequest { - - /** - * Constructs a new GetTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); - - /** GetTaskRequest name. */ - public name: string; - - /** - * Creates a new GetTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; - - /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; - - /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; - - /** - * Verifies a GetTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; - - /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. - * @param message GetTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJobRequest. */ - interface IGetJobRequest { - - /** GetJobRequest name */ - name?: (string|null); - } - - /** Represents a GetJobRequest. */ - class GetJobRequest implements IGetJobRequest { - - /** - * Constructs a new GetJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); - - /** GetJobRequest name. */ - public name: string; - - /** - * Creates a new GetJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; - - /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; - - /** - * Verifies a GetJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; - - /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @param message GetJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunTaskRequest. */ - interface IRunTaskRequest { - - /** RunTaskRequest name */ - name?: (string|null); - - /** RunTaskRequest labels */ - labels?: ({ [k: string]: string }|null); - - /** RunTaskRequest args */ - args?: ({ [k: string]: string }|null); - } - - /** Represents a RunTaskRequest. */ - class RunTaskRequest implements IRunTaskRequest { - - /** - * Constructs a new RunTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IRunTaskRequest); - - /** RunTaskRequest name. */ - public name: string; - - /** RunTaskRequest labels. */ - public labels: { [k: string]: string }; - - /** RunTaskRequest args. */ - public args: { [k: string]: string }; - - /** - * Creates a new RunTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IRunTaskRequest): google.cloud.dataplex.v1.RunTaskRequest; - - /** - * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. - * @param message RunTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. - * @param message RunTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskRequest; - - /** - * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskRequest; - - /** - * Verifies a RunTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskRequest; - - /** - * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. - * @param message RunTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.RunTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunTaskResponse. */ - interface IRunTaskResponse { - - /** RunTaskResponse job */ - job?: (google.cloud.dataplex.v1.IJob|null); - } - - /** Represents a RunTaskResponse. */ - class RunTaskResponse implements IRunTaskResponse { - - /** - * Constructs a new RunTaskResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IRunTaskResponse); - - /** RunTaskResponse job. */ - public job?: (google.cloud.dataplex.v1.IJob|null); - - /** - * Creates a new RunTaskResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunTaskResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IRunTaskResponse): google.cloud.dataplex.v1.RunTaskResponse; - - /** - * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. - * @param message RunTaskResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. - * @param message RunTaskResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunTaskResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskResponse; - - /** - * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskResponse; - - /** - * Verifies a RunTaskResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunTaskResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskResponse; - - /** - * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. - * @param message RunTaskResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.RunTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunTaskResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunTaskResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListJobsRequest. */ - interface IListJobsRequest { - - /** ListJobsRequest parent */ - parent?: (string|null); - - /** ListJobsRequest pageSize */ - pageSize?: (number|null); - - /** ListJobsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListJobsRequest. */ - class ListJobsRequest implements IListJobsRequest { - - /** - * Constructs a new ListJobsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); - - /** ListJobsRequest parent. */ - public parent: string; - - /** ListJobsRequest pageSize. */ - public pageSize: number; - - /** ListJobsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListJobsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; - - /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; - - /** - * Verifies a ListJobsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; - - /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. - * @param message ListJobsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListJobsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListJobsResponse. */ - interface IListJobsResponse { - - /** ListJobsResponse jobs */ - jobs?: (google.cloud.dataplex.v1.IJob[]|null); - - /** ListJobsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListJobsResponse. */ - class ListJobsResponse implements IListJobsResponse { - - /** - * Constructs a new ListJobsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); - - /** ListJobsResponse jobs. */ - public jobs: google.cloud.dataplex.v1.IJob[]; - - /** ListJobsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListJobsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListJobsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; - - /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; - - /** - * Verifies a ListJobsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListJobsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; - - /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @param message ListJobsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListJobsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListJobsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelJobRequest. */ - interface ICancelJobRequest { - - /** CancelJobRequest name */ - name?: (string|null); - } - - /** Represents a CancelJobRequest. */ - class CancelJobRequest implements ICancelJobRequest { - - /** - * Constructs a new CancelJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); - - /** CancelJobRequest name. */ - public name: string; - - /** - * Creates a new CancelJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; - - /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; - - /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; - - /** - * Verifies a CancelJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; - - /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. - * @param message CancelJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { - - /** CreateEnvironmentRequest parent */ - parent?: (string|null); - - /** CreateEnvironmentRequest environmentId */ - environmentId?: (string|null); - - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.dataplex.v1.IEnvironment|null); - - /** CreateEnvironmentRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { - - /** - * Constructs a new CreateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest); - - /** CreateEnvironmentRequest parent. */ - public parent: string; - - /** CreateEnvironmentRequest environmentId. */ - public environmentId: string; - - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.dataplex.v1.IEnvironment|null); - - /** CreateEnvironmentRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest): google.cloud.dataplex.v1.CreateEnvironmentRequest; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEnvironmentRequest; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEnvironmentRequest; - - /** - * Verifies a CreateEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEnvironmentRequest; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { - - /** UpdateEnvironmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.dataplex.v1.IEnvironment|null); - - /** UpdateEnvironmentRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { - - /** - * Constructs a new UpdateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest); - - /** UpdateEnvironmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.dataplex.v1.IEnvironment|null); - - /** UpdateEnvironmentRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): google.cloud.dataplex.v1.UpdateEnvironmentRequest; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEnvironmentRequest; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEnvironmentRequest; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEnvironmentRequest; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { - - /** DeleteEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { - - /** - * Constructs a new DeleteEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest); - - /** DeleteEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): google.cloud.dataplex.v1.DeleteEnvironmentRequest; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEnvironmentRequest; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEnvironmentRequest; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEnvironmentRequest; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @param message DeleteEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { - - /** ListEnvironmentsRequest parent */ - parent?: (string|null); - - /** ListEnvironmentsRequest pageSize */ - pageSize?: (number|null); - - /** ListEnvironmentsRequest pageToken */ - pageToken?: (string|null); - - /** ListEnvironmentsRequest filter */ - filter?: (string|null); - - /** ListEnvironmentsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { - - /** - * Constructs a new ListEnvironmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest); - - /** ListEnvironmentsRequest parent. */ - public parent: string; - - /** ListEnvironmentsRequest pageSize. */ - public pageSize: number; - - /** ListEnvironmentsRequest pageToken. */ - public pageToken: string; - - /** ListEnvironmentsRequest filter. */ - public filter: string; - - /** ListEnvironmentsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest): google.cloud.dataplex.v1.ListEnvironmentsRequest; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsRequest; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsRequest; - - /** - * Verifies a ListEnvironmentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsRequest; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { - - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.dataplex.v1.IEnvironment[]|null); - - /** ListEnvironmentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { - - /** - * Constructs a new ListEnvironmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse); - - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.dataplex.v1.IEnvironment[]; - - /** ListEnvironmentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse): google.cloud.dataplex.v1.ListEnvironmentsResponse; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsResponse; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsResponse; - - /** - * Verifies a ListEnvironmentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsResponse; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { - - /** GetEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { - - /** - * Constructs a new GetEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest); - - /** GetEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest): google.cloud.dataplex.v1.GetEnvironmentRequest; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEnvironmentRequest; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEnvironmentRequest; - - /** - * Verifies a GetEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEnvironmentRequest; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSessionsRequest. */ - interface IListSessionsRequest { - - /** ListSessionsRequest parent */ - parent?: (string|null); - - /** ListSessionsRequest pageSize */ - pageSize?: (number|null); - - /** ListSessionsRequest pageToken */ - pageToken?: (string|null); - - /** ListSessionsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListSessionsRequest. */ - class ListSessionsRequest implements IListSessionsRequest { - - /** - * Constructs a new ListSessionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListSessionsRequest); - - /** ListSessionsRequest parent. */ - public parent: string; - - /** ListSessionsRequest pageSize. */ - public pageSize: number; - - /** ListSessionsRequest pageToken. */ - public pageToken: string; - - /** ListSessionsRequest filter. */ - public filter: string; - - /** - * Creates a new ListSessionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSessionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListSessionsRequest): google.cloud.dataplex.v1.ListSessionsRequest; - - /** - * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @param message ListSessionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @param message ListSessionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSessionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSessionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsRequest; - - /** - * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSessionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsRequest; - - /** - * Verifies a ListSessionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSessionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsRequest; - - /** - * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. - * @param message ListSessionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListSessionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSessionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSessionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSessionsResponse. */ - interface IListSessionsResponse { - - /** ListSessionsResponse sessions */ - sessions?: (google.cloud.dataplex.v1.ISession[]|null); - - /** ListSessionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSessionsResponse. */ - class ListSessionsResponse implements IListSessionsResponse { - - /** - * Constructs a new ListSessionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListSessionsResponse); - - /** ListSessionsResponse sessions. */ - public sessions: google.cloud.dataplex.v1.ISession[]; - - /** ListSessionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSessionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSessionsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListSessionsResponse): google.cloud.dataplex.v1.ListSessionsResponse; - - /** - * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @param message ListSessionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @param message ListSessionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSessionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSessionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsResponse; - - /** - * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSessionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsResponse; - - /** - * Verifies a ListSessionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSessionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsResponse; - - /** - * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. - * @param message ListSessionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListSessionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSessionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSessionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Task. */ - interface ITask { - - /** Task name */ - name?: (string|null); - - /** Task uid */ - uid?: (string|null); - - /** Task createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Task updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Task description */ - description?: (string|null); - - /** Task displayName */ - displayName?: (string|null); - - /** Task state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - - /** Task labels */ - labels?: ({ [k: string]: string }|null); - - /** Task triggerSpec */ - triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); - - /** Task executionSpec */ - executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); - - /** Task executionStatus */ - executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); - - /** Task spark */ - spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); - - /** Task notebook */ - notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); - } - - /** Represents a Task. */ - class Task implements ITask { - - /** - * Constructs a new Task. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ITask); - - /** Task name. */ - public name: string; - - /** Task uid. */ - public uid: string; - - /** Task createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Task updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Task description. */ - public description: string; - - /** Task displayName. */ - public displayName: string; - - /** Task state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** Task labels. */ - public labels: { [k: string]: string }; - - /** Task triggerSpec. */ - public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); - - /** Task executionSpec. */ - public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); - - /** Task executionStatus. */ - public executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); - - /** Task spark. */ - public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); - - /** Task notebook. */ - public notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); - - /** Task config. */ - public config?: ("spark"|"notebook"); - - /** - * Creates a new Task instance using the specified properties. - * @param [properties] Properties to set - * @returns Task instance - */ - public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; - - /** - * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @param message Task message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @param message Task message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Task message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task; - - /** - * Decodes a Task message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task; - - /** - * Verifies a Task message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Task message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Task - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; - - /** - * Creates a plain object from a Task message. Also converts values to other types if specified. - * @param message Task - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Task to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Task - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Task { - - /** Properties of an InfrastructureSpec. */ - interface IInfrastructureSpec { - - /** InfrastructureSpec batch */ - batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); - - /** InfrastructureSpec containerImage */ - containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); - - /** InfrastructureSpec vpcNetwork */ - vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); - } - - /** Represents an InfrastructureSpec. */ - class InfrastructureSpec implements IInfrastructureSpec { - - /** - * Constructs a new InfrastructureSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); - - /** InfrastructureSpec batch. */ - public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); - - /** InfrastructureSpec containerImage. */ - public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); - - /** InfrastructureSpec vpcNetwork. */ - public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); - - /** InfrastructureSpec resources. */ - public resources?: "batch"; - - /** InfrastructureSpec runtime. */ - public runtime?: "containerImage"; - - /** InfrastructureSpec network. */ - public network?: "vpcNetwork"; - - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns InfrastructureSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; - - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec; - - /** - * Verifies an InfrastructureSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InfrastructureSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; - - /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @param message InfrastructureSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InfrastructureSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InfrastructureSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace InfrastructureSpec { - - /** Properties of a BatchComputeResources. */ - interface IBatchComputeResources { - - /** BatchComputeResources executorsCount */ - executorsCount?: (number|null); - - /** BatchComputeResources maxExecutorsCount */ - maxExecutorsCount?: (number|null); - } - - /** Represents a BatchComputeResources. */ - class BatchComputeResources implements IBatchComputeResources { - - /** - * Constructs a new BatchComputeResources. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); - - /** BatchComputeResources executorsCount. */ - public executorsCount: number; - - /** BatchComputeResources maxExecutorsCount. */ - public maxExecutorsCount: number; - - /** - * Creates a new BatchComputeResources instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchComputeResources instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; - - /** - * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @param message BatchComputeResources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @param message BatchComputeResources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; - - /** - * Verifies a BatchComputeResources message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchComputeResources - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; - - /** - * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. - * @param message BatchComputeResources - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchComputeResources to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BatchComputeResources - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContainerImageRuntime. */ - interface IContainerImageRuntime { - - /** ContainerImageRuntime image */ - image?: (string|null); - - /** ContainerImageRuntime javaJars */ - javaJars?: (string[]|null); - - /** ContainerImageRuntime pythonPackages */ - pythonPackages?: (string[]|null); - - /** ContainerImageRuntime properties */ - properties?: ({ [k: string]: string }|null); - } - - /** Represents a ContainerImageRuntime. */ - class ContainerImageRuntime implements IContainerImageRuntime { - - /** - * Constructs a new ContainerImageRuntime. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); - - /** ContainerImageRuntime image. */ - public image: string; - - /** ContainerImageRuntime javaJars. */ - public javaJars: string[]; - - /** ContainerImageRuntime pythonPackages. */ - public pythonPackages: string[]; - - /** ContainerImageRuntime properties. */ - public properties: { [k: string]: string }; - - /** - * Creates a new ContainerImageRuntime instance using the specified properties. - * @param [properties] Properties to set - * @returns ContainerImageRuntime instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - - /** - * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @param message ContainerImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @param message ContainerImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - - /** - * Verifies a ContainerImageRuntime message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContainerImageRuntime - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - - /** - * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. - * @param message ContainerImageRuntime - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContainerImageRuntime to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContainerImageRuntime - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcNetwork. */ - interface IVpcNetwork { - - /** VpcNetwork network */ - network?: (string|null); - - /** VpcNetwork subNetwork */ - subNetwork?: (string|null); - - /** VpcNetwork networkTags */ - networkTags?: (string[]|null); - } - - /** Represents a VpcNetwork. */ - class VpcNetwork implements IVpcNetwork { - - /** - * Constructs a new VpcNetwork. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); - - /** VpcNetwork network. */ - public network?: (string|null); - - /** VpcNetwork subNetwork. */ - public subNetwork?: (string|null); - - /** VpcNetwork networkTags. */ - public networkTags: string[]; - - /** VpcNetwork networkName. */ - public networkName?: ("network"|"subNetwork"); - - /** - * Creates a new VpcNetwork instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcNetwork instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - - /** - * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @param message VpcNetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @param message VpcNetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcNetwork message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - - /** - * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - - /** - * Verifies a VpcNetwork message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcNetwork - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - - /** - * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. - * @param message VpcNetwork - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcNetwork to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcNetwork - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a TriggerSpec. */ - interface ITriggerSpec { - - /** TriggerSpec type */ - type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); - - /** TriggerSpec startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TriggerSpec disabled */ - disabled?: (boolean|null); - - /** TriggerSpec maxRetries */ - maxRetries?: (number|null); - - /** TriggerSpec schedule */ - schedule?: (string|null); - } - - /** Represents a TriggerSpec. */ - class TriggerSpec implements ITriggerSpec { - - /** - * Constructs a new TriggerSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); - - /** TriggerSpec type. */ - public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); - - /** TriggerSpec startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** TriggerSpec disabled. */ - public disabled: boolean; - - /** TriggerSpec maxRetries. */ - public maxRetries: number; - - /** TriggerSpec schedule. */ - public schedule?: (string|null); - - /** TriggerSpec trigger. */ - public trigger?: "schedule"; - - /** - * Creates a new TriggerSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; - - /** - * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @param message TriggerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @param message TriggerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.TriggerSpec; - - /** - * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.TriggerSpec; - - /** - * Verifies a TriggerSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; - - /** - * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. - * @param message TriggerSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TriggerSpec { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ON_DEMAND = 1, - RECURRING = 2 - } - } - - /** Properties of an ExecutionSpec. */ - interface IExecutionSpec { - - /** ExecutionSpec args */ - args?: ({ [k: string]: string }|null); - - /** ExecutionSpec serviceAccount */ - serviceAccount?: (string|null); - - /** ExecutionSpec project */ - project?: (string|null); - - /** ExecutionSpec maxJobExecutionLifetime */ - maxJobExecutionLifetime?: (google.protobuf.IDuration|null); - - /** ExecutionSpec kmsKey */ - kmsKey?: (string|null); - } - - /** Represents an ExecutionSpec. */ - class ExecutionSpec implements IExecutionSpec { - - /** - * Constructs a new ExecutionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); - - /** ExecutionSpec args. */ - public args: { [k: string]: string }; - - /** ExecutionSpec serviceAccount. */ - public serviceAccount: string; - - /** ExecutionSpec project. */ - public project: string; - - /** ExecutionSpec maxJobExecutionLifetime. */ - public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); - - /** ExecutionSpec kmsKey. */ - public kmsKey: string; - - /** - * Creates a new ExecutionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecutionSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; - - /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionSpec; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionSpec; - - /** - * Verifies an ExecutionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; - - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @param message ExecutionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecutionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecutionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SparkTaskConfig. */ - interface ISparkTaskConfig { - - /** SparkTaskConfig mainJarFileUri */ - mainJarFileUri?: (string|null); - - /** SparkTaskConfig mainClass */ - mainClass?: (string|null); - - /** SparkTaskConfig pythonScriptFile */ - pythonScriptFile?: (string|null); - - /** SparkTaskConfig sqlScriptFile */ - sqlScriptFile?: (string|null); - - /** SparkTaskConfig sqlScript */ - sqlScript?: (string|null); - - /** SparkTaskConfig fileUris */ - fileUris?: (string[]|null); - - /** SparkTaskConfig archiveUris */ - archiveUris?: (string[]|null); - - /** SparkTaskConfig infrastructureSpec */ - infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - } - - /** Represents a SparkTaskConfig. */ - class SparkTaskConfig implements ISparkTaskConfig { - - /** - * Constructs a new SparkTaskConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); - - /** SparkTaskConfig mainJarFileUri. */ - public mainJarFileUri?: (string|null); - - /** SparkTaskConfig mainClass. */ - public mainClass?: (string|null); - - /** SparkTaskConfig pythonScriptFile. */ - public pythonScriptFile?: (string|null); - - /** SparkTaskConfig sqlScriptFile. */ - public sqlScriptFile?: (string|null); - - /** SparkTaskConfig sqlScript. */ - public sqlScript?: (string|null); - - /** SparkTaskConfig fileUris. */ - public fileUris: string[]; - - /** SparkTaskConfig archiveUris. */ - public archiveUris: string[]; - - /** SparkTaskConfig infrastructureSpec. */ - public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - - /** SparkTaskConfig driver. */ - public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); - - /** - * Creates a new SparkTaskConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SparkTaskConfig instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; - - /** - * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @param message SparkTaskConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @param message SparkTaskConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.SparkTaskConfig; - - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.SparkTaskConfig; - - /** - * Verifies a SparkTaskConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SparkTaskConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; - - /** - * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. - * @param message SparkTaskConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SparkTaskConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SparkTaskConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NotebookTaskConfig. */ - interface INotebookTaskConfig { - - /** NotebookTaskConfig notebook */ - notebook?: (string|null); - - /** NotebookTaskConfig infrastructureSpec */ - infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - - /** NotebookTaskConfig fileUris */ - fileUris?: (string[]|null); - - /** NotebookTaskConfig archiveUris */ - archiveUris?: (string[]|null); - } - - /** Represents a NotebookTaskConfig. */ - class NotebookTaskConfig implements INotebookTaskConfig { - - /** - * Constructs a new NotebookTaskConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig); - - /** NotebookTaskConfig notebook. */ - public notebook: string; - - /** NotebookTaskConfig infrastructureSpec. */ - public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - - /** NotebookTaskConfig fileUris. */ - public fileUris: string[]; - - /** NotebookTaskConfig archiveUris. */ - public archiveUris: string[]; - - /** - * Creates a new NotebookTaskConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NotebookTaskConfig instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig): google.cloud.dataplex.v1.Task.NotebookTaskConfig; - - /** - * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @param message NotebookTaskConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @param message NotebookTaskConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.NotebookTaskConfig; - - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.NotebookTaskConfig; - - /** - * Verifies a NotebookTaskConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotebookTaskConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.NotebookTaskConfig; - - /** - * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. - * @param message NotebookTaskConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.NotebookTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotebookTaskConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotebookTaskConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecutionStatus. */ - interface IExecutionStatus { - - /** ExecutionStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJob */ - latestJob?: (google.cloud.dataplex.v1.IJob|null); - } - - /** Represents an ExecutionStatus. */ - class ExecutionStatus implements IExecutionStatus { - - /** - * Constructs a new ExecutionStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus); - - /** ExecutionStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJob. */ - public latestJob?: (google.cloud.dataplex.v1.IJob|null); - - /** - * Creates a new ExecutionStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecutionStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus): google.cloud.dataplex.v1.Task.ExecutionStatus; - - /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task.ExecutionStatus; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task.ExecutionStatus; - - /** - * Verifies an ExecutionStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutionStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionStatus; - - /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @param message ExecutionStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecutionStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecutionStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Job. */ - interface IJob { - - /** Job name */ - name?: (string|null); - - /** Job uid */ - uid?: (string|null); - - /** Job startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Job endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Job state */ - state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); - - /** Job retryCount */ - retryCount?: (number|null); - - /** Job service */ - service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); - - /** Job serviceJob */ - serviceJob?: (string|null); - - /** Job message */ - message?: (string|null); - - /** Job labels */ - labels?: ({ [k: string]: string }|null); - - /** Job trigger */ - trigger?: (google.cloud.dataplex.v1.Job.Trigger|keyof typeof google.cloud.dataplex.v1.Job.Trigger|null); - - /** Job executionSpec */ - executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); - } - - /** Represents a Job. */ - class Job implements IJob { - - /** - * Constructs a new Job. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IJob); - - /** Job name. */ - public name: string; - - /** Job uid. */ - public uid: string; - - /** Job startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Job endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Job state. */ - public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); - - /** Job retryCount. */ - public retryCount: number; - - /** Job service. */ - public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); - - /** Job serviceJob. */ - public serviceJob: string; - - /** Job message. */ - public message: string; - - /** Job labels. */ - public labels: { [k: string]: string }; - - /** Job trigger. */ - public trigger: (google.cloud.dataplex.v1.Job.Trigger|keyof typeof google.cloud.dataplex.v1.Job.Trigger); - - /** Job executionSpec. */ - public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); - - /** - * Creates a new Job instance using the specified properties. - * @param [properties] Properties to set - * @returns Job instance - */ - public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; - - /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @param message Job message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @param message Job message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Job message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Job; - - /** - * Decodes a Job message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Job; - - /** - * Verifies a Job message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Job - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; - - /** - * Creates a plain object from a Job message. Also converts values to other types if specified. - * @param message Job - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Job to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Job - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Job { - - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - CANCELLING = 2, - CANCELLED = 3, - SUCCEEDED = 4, - FAILED = 5, - ABORTED = 6 - } - - /** Trigger enum. */ - enum Trigger { - TRIGGER_UNSPECIFIED = 0, - TASK_CONFIG = 1, - RUN_REQUEST = 2 - } - } - - /** Represents a ContentService */ - class ContentService extends $protobuf.rpc.Service { - - /** - * Constructs a new ContentService 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 ContentService 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): ContentService; - - /** - * Calls CreateContent. - * @param request CreateContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Content - */ - public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest, callback: google.cloud.dataplex.v1.ContentService.CreateContentCallback): void; - - /** - * Calls CreateContent. - * @param request CreateContentRequest message or plain object - * @returns Promise - */ - public createContent(request: google.cloud.dataplex.v1.ICreateContentRequest): Promise; - - /** - * Calls UpdateContent. - * @param request UpdateContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Content - */ - public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest, callback: google.cloud.dataplex.v1.ContentService.UpdateContentCallback): void; - - /** - * Calls UpdateContent. - * @param request UpdateContentRequest message or plain object - * @returns Promise - */ - public updateContent(request: google.cloud.dataplex.v1.IUpdateContentRequest): Promise; - - /** - * Calls DeleteContent. - * @param request DeleteContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest, callback: google.cloud.dataplex.v1.ContentService.DeleteContentCallback): void; - - /** - * Calls DeleteContent. - * @param request DeleteContentRequest message or plain object - * @returns Promise - */ - public deleteContent(request: google.cloud.dataplex.v1.IDeleteContentRequest): Promise; - - /** - * Calls GetContent. - * @param request GetContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Content - */ - public getContent(request: google.cloud.dataplex.v1.IGetContentRequest, callback: google.cloud.dataplex.v1.ContentService.GetContentCallback): void; - - /** - * Calls GetContent. - * @param request GetContentRequest message or plain object - * @returns Promise - */ - public getContent(request: google.cloud.dataplex.v1.IGetContentRequest): 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.dataplex.v1.ContentService.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.dataplex.v1.ContentService.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.dataplex.v1.ContentService.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - - /** - * Calls ListContent. - * @param request ListContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListContentResponse - */ - public listContent(request: google.cloud.dataplex.v1.IListContentRequest, callback: google.cloud.dataplex.v1.ContentService.ListContentCallback): void; - - /** - * Calls ListContent. - * @param request ListContentRequest message or plain object - * @returns Promise - */ - public listContent(request: google.cloud.dataplex.v1.IListContentRequest): Promise; - } - - namespace ContentService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. - * @param error Error, if any - * @param [response] Content - */ - type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. - * @param error Error, if any - * @param [response] Content - */ - type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. - * @param error Error, if any - * @param [response] Content - */ - type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|listContent}. - * @param error Error, if any - * @param [response] ListContentResponse - */ - type ListContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListContentResponse) => void; - } - - /** Properties of a CreateContentRequest. */ - interface ICreateContentRequest { - - /** CreateContentRequest parent */ - parent?: (string|null); - - /** CreateContentRequest content */ - content?: (google.cloud.dataplex.v1.IContent|null); - - /** CreateContentRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateContentRequest. */ - class CreateContentRequest implements ICreateContentRequest { - - /** - * Constructs a new CreateContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateContentRequest); - - /** CreateContentRequest parent. */ - public parent: string; - - /** CreateContentRequest content. */ - public content?: (google.cloud.dataplex.v1.IContent|null); - - /** CreateContentRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateContentRequest): google.cloud.dataplex.v1.CreateContentRequest; - - /** - * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @param message CreateContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @param message CreateContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateContentRequest; - - /** - * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateContentRequest; - - /** - * Verifies a CreateContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateContentRequest; - - /** - * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. - * @param message CreateContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateContentRequest. */ - interface IUpdateContentRequest { - - /** UpdateContentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateContentRequest content */ - content?: (google.cloud.dataplex.v1.IContent|null); - - /** UpdateContentRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateContentRequest. */ - class UpdateContentRequest implements IUpdateContentRequest { - - /** - * Constructs a new UpdateContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateContentRequest); - - /** UpdateContentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateContentRequest content. */ - public content?: (google.cloud.dataplex.v1.IContent|null); - - /** UpdateContentRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateContentRequest): google.cloud.dataplex.v1.UpdateContentRequest; - - /** - * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @param message UpdateContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @param message UpdateContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateContentRequest; - - /** - * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateContentRequest; - - /** - * Verifies an UpdateContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateContentRequest; - - /** - * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. - * @param message UpdateContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteContentRequest. */ - interface IDeleteContentRequest { - - /** DeleteContentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteContentRequest. */ - class DeleteContentRequest implements IDeleteContentRequest { - - /** - * Constructs a new DeleteContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteContentRequest); - - /** DeleteContentRequest name. */ - public name: string; - - /** - * Creates a new DeleteContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteContentRequest): google.cloud.dataplex.v1.DeleteContentRequest; - - /** - * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @param message DeleteContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @param message DeleteContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteContentRequest; - - /** - * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteContentRequest; - - /** - * Verifies a DeleteContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteContentRequest; - - /** - * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. - * @param message DeleteContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListContentRequest. */ - interface IListContentRequest { - - /** ListContentRequest parent */ - parent?: (string|null); - - /** ListContentRequest pageSize */ - pageSize?: (number|null); - - /** ListContentRequest pageToken */ - pageToken?: (string|null); - - /** ListContentRequest filter */ - filter?: (string|null); - } - - /** Represents a ListContentRequest. */ - class ListContentRequest implements IListContentRequest { - - /** - * Constructs a new ListContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListContentRequest); - - /** ListContentRequest parent. */ - public parent: string; - - /** ListContentRequest pageSize. */ - public pageSize: number; - - /** ListContentRequest pageToken. */ - public pageToken: string; - - /** ListContentRequest filter. */ - public filter: string; - - /** - * Creates a new ListContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListContentRequest): google.cloud.dataplex.v1.ListContentRequest; - - /** - * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @param message ListContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @param message ListContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentRequest; - - /** - * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentRequest; - - /** - * Verifies a ListContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentRequest; - - /** - * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. - * @param message ListContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListContentResponse. */ - interface IListContentResponse { - - /** ListContentResponse content */ - content?: (google.cloud.dataplex.v1.IContent[]|null); - - /** ListContentResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListContentResponse. */ - class ListContentResponse implements IListContentResponse { - - /** - * Constructs a new ListContentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListContentResponse); - - /** ListContentResponse content. */ - public content: google.cloud.dataplex.v1.IContent[]; - - /** ListContentResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListContentResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListContentResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListContentResponse): google.cloud.dataplex.v1.ListContentResponse; - - /** - * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @param message ListContentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @param message ListContentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListContentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentResponse; - - /** - * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentResponse; - - /** - * Verifies a ListContentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListContentResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentResponse; - - /** - * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. - * @param message ListContentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListContentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListContentResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetContentRequest. */ - interface IGetContentRequest { - - /** GetContentRequest name */ - name?: (string|null); - - /** GetContentRequest view */ - view?: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView|null); - } - - /** Represents a GetContentRequest. */ - class GetContentRequest implements IGetContentRequest { - - /** - * Constructs a new GetContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetContentRequest); - - /** GetContentRequest name. */ - public name: string; - - /** GetContentRequest view. */ - public view: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView); - - /** - * Creates a new GetContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetContentRequest): google.cloud.dataplex.v1.GetContentRequest; - - /** - * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @param message GetContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @param message GetContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetContentRequest; - - /** - * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetContentRequest; - - /** - * Verifies a GetContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetContentRequest; - - /** - * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. - * @param message GetContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetContentRequest { - - /** ContentView enum. */ - enum ContentView { - CONTENT_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } - } - - /** Properties of a DataDiscoverySpec. */ - interface IDataDiscoverySpec { - - /** DataDiscoverySpec bigqueryPublishingConfig */ - bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); - - /** DataDiscoverySpec storageConfig */ - storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); - } - - /** Represents a DataDiscoverySpec. */ - class DataDiscoverySpec implements IDataDiscoverySpec { - - /** - * Constructs a new DataDiscoverySpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec); - - /** DataDiscoverySpec bigqueryPublishingConfig. */ - public bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); - - /** DataDiscoverySpec storageConfig. */ - public storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); - - /** DataDiscoverySpec resourceConfig. */ - public resourceConfig?: "storageConfig"; - - /** - * Creates a new DataDiscoverySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataDiscoverySpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec): google.cloud.dataplex.v1.DataDiscoverySpec; - - /** - * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. - * @param message DataDiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. - * @param message DataDiscoverySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataDiscoverySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataDiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec; - - /** - * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataDiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec; - - /** - * Verifies a DataDiscoverySpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataDiscoverySpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec; - - /** - * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. - * @param message DataDiscoverySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataDiscoverySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataDiscoverySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataDiscoverySpec { - - /** Properties of a BigQueryPublishingConfig. */ - interface IBigQueryPublishingConfig { - - /** BigQueryPublishingConfig tableType */ - tableType?: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null); - - /** BigQueryPublishingConfig connection */ - connection?: (string|null); - } - - /** Represents a BigQueryPublishingConfig. */ - class BigQueryPublishingConfig implements IBigQueryPublishingConfig { - - /** - * Constructs a new BigQueryPublishingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig); - - /** BigQueryPublishingConfig tableType. */ - public tableType: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType); - - /** BigQueryPublishingConfig connection. */ - public connection: string; - - /** - * Creates a new BigQueryPublishingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryPublishingConfig instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; - - /** - * Encodes the specified BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. - * @param message BigQueryPublishingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. - * @param message BigQueryPublishingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryPublishingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; - - /** - * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryPublishingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; - - /** - * Verifies a BigQueryPublishingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryPublishingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; - - /** - * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. - * @param message BigQueryPublishingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryPublishingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryPublishingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryPublishingConfig { - - /** TableType enum. */ - enum TableType { - TABLE_TYPE_UNSPECIFIED = 0, - EXTERNAL = 1, - BIGLAKE = 2 - } - } - - /** Properties of a StorageConfig. */ - interface IStorageConfig { - - /** StorageConfig includePatterns */ - includePatterns?: (string[]|null); - - /** StorageConfig excludePatterns */ - excludePatterns?: (string[]|null); - - /** StorageConfig csvOptions */ - csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); - - /** StorageConfig jsonOptions */ - jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); - } - - /** Represents a StorageConfig. */ - class StorageConfig implements IStorageConfig { - - /** - * Constructs a new StorageConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig); - - /** StorageConfig includePatterns. */ - public includePatterns: string[]; - - /** StorageConfig excludePatterns. */ - public excludePatterns: string[]; - - /** StorageConfig csvOptions. */ - public csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); - - /** StorageConfig jsonOptions. */ - public jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); - - /** - * Creates a new StorageConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageConfig instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; - - /** - * Verifies a StorageConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @param message StorageConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StorageConfig { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions headerRows */ - headerRows?: (number|null); - - /** CsvOptions delimiter */ - delimiter?: (string|null); - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions typeInferenceDisabled */ - typeInferenceDisabled?: (boolean|null); - - /** CsvOptions quote */ - quote?: (string|null); - } - - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { - - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions); - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions typeInferenceDisabled. */ - public typeInferenceDisabled: boolean; - - /** CsvOptions quote. */ - public quote: string; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; - - /** - * Verifies a CsvOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); - - /** JsonOptions typeInferenceDisabled */ - typeInferenceDisabled?: (boolean|null); - } - - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { - - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** JsonOptions typeInferenceDisabled. */ - public typeInferenceDisabled: boolean; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a DataDiscoveryResult. */ - interface IDataDiscoveryResult { - - /** DataDiscoveryResult bigqueryPublishing */ - bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); - } - - /** Represents a DataDiscoveryResult. */ - class DataDiscoveryResult implements IDataDiscoveryResult { - - /** - * Constructs a new DataDiscoveryResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult); - - /** DataDiscoveryResult bigqueryPublishing. */ - public bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); - - /** - * Creates a new DataDiscoveryResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataDiscoveryResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult): google.cloud.dataplex.v1.DataDiscoveryResult; - - /** - * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. - * @param message DataDiscoveryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. - * @param message DataDiscoveryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataDiscoveryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataDiscoveryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult; - - /** - * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataDiscoveryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult; - - /** - * Verifies a DataDiscoveryResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataDiscoveryResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult; - - /** - * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. - * @param message DataDiscoveryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataDiscoveryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataDiscoveryResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataDiscoveryResult { - - /** Properties of a BigQueryPublishing. */ - interface IBigQueryPublishing { - - /** BigQueryPublishing dataset */ - dataset?: (string|null); - } - - /** Represents a BigQueryPublishing. */ - class BigQueryPublishing implements IBigQueryPublishing { - - /** - * Constructs a new BigQueryPublishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing); - - /** BigQueryPublishing dataset. */ - public dataset: string; - - /** - * Creates a new BigQueryPublishing instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryPublishing instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - - /** - * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. - * @param message BigQueryPublishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. - * @param message BigQueryPublishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryPublishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryPublishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - - /** - * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryPublishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - - /** - * Verifies a BigQueryPublishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryPublishing - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - - /** - * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. - * @param message BigQueryPublishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryPublishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryPublishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataProfileSpec. */ - interface IDataProfileSpec { - - /** DataProfileSpec samplingPercent */ - samplingPercent?: (number|null); - - /** DataProfileSpec rowFilter */ - rowFilter?: (string|null); - - /** DataProfileSpec postScanActions */ - postScanActions?: (google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null); - - /** DataProfileSpec includeFields */ - includeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); - - /** DataProfileSpec excludeFields */ - excludeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); - } - - /** Represents a DataProfileSpec. */ - class DataProfileSpec implements IDataProfileSpec { - - /** - * Constructs a new DataProfileSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataProfileSpec); - - /** DataProfileSpec samplingPercent. */ - public samplingPercent: number; - - /** DataProfileSpec rowFilter. */ - public rowFilter: string; - - /** DataProfileSpec postScanActions. */ - public postScanActions?: (google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null); - - /** DataProfileSpec includeFields. */ - public includeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); - - /** DataProfileSpec excludeFields. */ - public excludeFields?: (google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null); - - /** - * Creates a new DataProfileSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataProfileSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataProfileSpec): google.cloud.dataplex.v1.DataProfileSpec; - - /** - * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. - * @param message DataProfileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. - * @param message DataProfileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataProfileSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataProfileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec; - - /** - * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataProfileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec; - - /** - * Verifies a DataProfileSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataProfileSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec; - - /** - * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. - * @param message DataProfileSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataProfileSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataProfileSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataProfileSpec { - - /** Properties of a PostScanActions. */ - interface IPostScanActions { - - /** PostScanActions bigqueryExport */ - bigqueryExport?: (google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null); - } - - /** Represents a PostScanActions. */ - class PostScanActions implements IPostScanActions { - - /** - * Constructs a new PostScanActions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions); - - /** PostScanActions bigqueryExport. */ - public bigqueryExport?: (google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null); - - /** - * Creates a new PostScanActions instance using the specified properties. - * @param [properties] Properties to set - * @returns PostScanActions instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; - - /** - * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. - * @param message PostScanActions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. - * @param message PostScanActions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostScanActions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; - - /** - * Decodes a PostScanActions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; - - /** - * Verifies a PostScanActions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostScanActions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions; - - /** - * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. - * @param message PostScanActions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostScanActions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostScanActions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostScanActions { - - /** Properties of a BigQueryExport. */ - interface IBigQueryExport { - - /** BigQueryExport resultsTable */ - resultsTable?: (string|null); - } - - /** Represents a BigQueryExport. */ - class BigQueryExport implements IBigQueryExport { - - /** - * Constructs a new BigQueryExport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport); - - /** BigQueryExport resultsTable. */ - public resultsTable: string; - - /** - * Creates a new BigQueryExport instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryExport instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; - - /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; - - /** - * Verifies a BigQueryExport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryExport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport; - - /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. - * @param message BigQueryExport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryExport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryExport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SelectedFields. */ - interface ISelectedFields { - - /** SelectedFields fieldNames */ - fieldNames?: (string[]|null); - } - - /** Represents a SelectedFields. */ - class SelectedFields implements ISelectedFields { - - /** - * Constructs a new SelectedFields. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields); - - /** SelectedFields fieldNames. */ - public fieldNames: string[]; - - /** - * Creates a new SelectedFields instance using the specified properties. - * @param [properties] Properties to set - * @returns SelectedFields instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; - - /** - * Encodes the specified SelectedFields message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. - * @param message SelectedFields message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SelectedFields message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. - * @param message SelectedFields message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SelectedFields message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SelectedFields - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; - - /** - * Decodes a SelectedFields message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SelectedFields - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; - - /** - * Verifies a SelectedFields message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SelectedFields message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SelectedFields - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec.SelectedFields; - - /** - * Creates a plain object from a SelectedFields message. Also converts values to other types if specified. - * @param message SelectedFields - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SelectedFields to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SelectedFields - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataProfileResult. */ - interface IDataProfileResult { - - /** DataProfileResult rowCount */ - rowCount?: (number|Long|string|null); - - /** DataProfileResult profile */ - profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); - - /** DataProfileResult scannedData */ - scannedData?: (google.cloud.dataplex.v1.IScannedData|null); - - /** DataProfileResult postScanActionsResult */ - postScanActionsResult?: (google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null); - } - - /** Represents a DataProfileResult. */ - class DataProfileResult implements IDataProfileResult { - - /** - * Constructs a new DataProfileResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataProfileResult); - - /** DataProfileResult rowCount. */ - public rowCount: (number|Long|string); - - /** DataProfileResult profile. */ - public profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); - - /** DataProfileResult scannedData. */ - public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); - - /** DataProfileResult postScanActionsResult. */ - public postScanActionsResult?: (google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null); - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataProfileResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataProfileResult): google.cloud.dataplex.v1.DataProfileResult; - - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult; - - /** - * Verifies a DataProfileResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataProfileResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult; - - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @param message DataProfileResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataProfileResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataProfileResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataProfileResult { - - /** Properties of a Profile. */ - interface IProfile { - - /** Profile fields */ - fields?: (google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]|null); - } - - /** Represents a Profile. */ - class Profile implements IProfile { - - /** - * Constructs a new Profile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile); - - /** Profile fields. */ - public fields: google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]; - - /** - * Creates a new Profile instance using the specified properties. - * @param [properties] Properties to set - * @returns Profile instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile): google.cloud.dataplex.v1.DataProfileResult.Profile; - - /** - * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. - * @param message Profile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. - * @param message Profile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Profile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Profile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile; - - /** - * Decodes a Profile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Profile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile; - - /** - * Verifies a Profile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Profile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Profile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile; - - /** - * Creates a plain object from a Profile message. Also converts values to other types if specified. - * @param message Profile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Profile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Profile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Profile { - - /** Properties of a Field. */ - interface IField { - - /** Field name */ - name?: (string|null); - - /** Field type */ - type?: (string|null); - - /** Field mode */ - mode?: (string|null); - - /** Field profile */ - profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); - } - - /** Represents a Field. */ - class Field implements IField { - - /** - * Constructs a new Field. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField); - - /** Field name. */ - public name: string; - - /** Field type. */ - public type: string; - - /** Field mode. */ - public mode: string; - - /** Field profile. */ - public profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); - - /** - * Creates a new Field instance using the specified properties. - * @param [properties] Properties to set - * @returns Field instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - - /** - * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Field message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - - /** - * Verifies a Field message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Field - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @param message Field - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Field to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Field - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Field { - - /** Properties of a ProfileInfo. */ - interface IProfileInfo { - - /** ProfileInfo nullRatio */ - nullRatio?: (number|null); - - /** ProfileInfo distinctRatio */ - distinctRatio?: (number|null); - - /** ProfileInfo topNValues */ - topNValues?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]|null); - - /** ProfileInfo stringProfile */ - stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); - - /** ProfileInfo integerProfile */ - integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); - - /** ProfileInfo doubleProfile */ - doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); - } - - /** Represents a ProfileInfo. */ - class ProfileInfo implements IProfileInfo { - - /** - * Constructs a new ProfileInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo); - - /** ProfileInfo nullRatio. */ - public nullRatio: number; - - /** ProfileInfo distinctRatio. */ - public distinctRatio: number; - - /** ProfileInfo topNValues. */ - public topNValues: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]; - - /** ProfileInfo stringProfile. */ - public stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); - - /** ProfileInfo integerProfile. */ - public integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); - - /** ProfileInfo doubleProfile. */ - public doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); - - /** ProfileInfo fieldInfo. */ - public fieldInfo?: ("stringProfile"|"integerProfile"|"doubleProfile"); - - /** - * Creates a new ProfileInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProfileInfo instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; - - /** - * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. - * @param message ProfileInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. - * @param message ProfileInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProfileInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProfileInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; - - /** - * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProfileInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; - - /** - * Verifies a ProfileInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProfileInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProfileInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; - - /** - * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. - * @param message ProfileInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProfileInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProfileInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProfileInfo { - - /** Properties of a StringFieldInfo. */ - interface IStringFieldInfo { - - /** StringFieldInfo minLength */ - minLength?: (number|Long|string|null); - - /** StringFieldInfo maxLength */ - maxLength?: (number|Long|string|null); - - /** StringFieldInfo averageLength */ - averageLength?: (number|null); - } - - /** Represents a StringFieldInfo. */ - class StringFieldInfo implements IStringFieldInfo { - - /** - * Constructs a new StringFieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo); - - /** StringFieldInfo minLength. */ - public minLength: (number|Long|string); - - /** StringFieldInfo maxLength. */ - public maxLength: (number|Long|string); - - /** StringFieldInfo averageLength. */ - public averageLength: number; - - /** - * Creates a new StringFieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFieldInfo instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; - - /** - * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. - * @param message StringFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. - * @param message StringFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringFieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; - - /** - * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; - - /** - * Verifies a StringFieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringFieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; - - /** - * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. - * @param message StringFieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringFieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringFieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IntegerFieldInfo. */ - interface IIntegerFieldInfo { - - /** IntegerFieldInfo average */ - average?: (number|null); - - /** IntegerFieldInfo standardDeviation */ - standardDeviation?: (number|null); - - /** IntegerFieldInfo min */ - min?: (number|Long|string|null); - - /** IntegerFieldInfo quartiles */ - quartiles?: ((number|Long|string)[]|null); - - /** IntegerFieldInfo max */ - max?: (number|Long|string|null); - } - - /** Represents an IntegerFieldInfo. */ - class IntegerFieldInfo implements IIntegerFieldInfo { - - /** - * Constructs a new IntegerFieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo); - - /** IntegerFieldInfo average. */ - public average: number; - - /** IntegerFieldInfo standardDeviation. */ - public standardDeviation: number; - - /** IntegerFieldInfo min. */ - public min: (number|Long|string); - - /** IntegerFieldInfo quartiles. */ - public quartiles: (number|Long|string)[]; - - /** IntegerFieldInfo max. */ - public max: (number|Long|string); - - /** - * Creates a new IntegerFieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns IntegerFieldInfo instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; - - /** - * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. - * @param message IntegerFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. - * @param message IntegerFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntegerFieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IntegerFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; - - /** - * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IntegerFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; - - /** - * Verifies an IntegerFieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntegerFieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; - - /** - * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. - * @param message IntegerFieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntegerFieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IntegerFieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoubleFieldInfo. */ - interface IDoubleFieldInfo { - - /** DoubleFieldInfo average */ - average?: (number|null); - - /** DoubleFieldInfo standardDeviation */ - standardDeviation?: (number|null); - - /** DoubleFieldInfo min */ - min?: (number|null); - - /** DoubleFieldInfo quartiles */ - quartiles?: (number[]|null); - - /** DoubleFieldInfo max */ - max?: (number|null); - } - - /** Represents a DoubleFieldInfo. */ - class DoubleFieldInfo implements IDoubleFieldInfo { - - /** - * Constructs a new DoubleFieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo); - - /** DoubleFieldInfo average. */ - public average: number; - - /** DoubleFieldInfo standardDeviation. */ - public standardDeviation: number; - - /** DoubleFieldInfo min. */ - public min: number; - - /** DoubleFieldInfo quartiles. */ - public quartiles: number[]; - - /** DoubleFieldInfo max. */ - public max: number; - - /** - * Creates a new DoubleFieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleFieldInfo instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; - - /** - * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. - * @param message DoubleFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. - * @param message DoubleFieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleFieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; - - /** - * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; - - /** - * Verifies a DoubleFieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleFieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; - - /** - * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. - * @param message DoubleFieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleFieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleFieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TopNValue. */ - interface ITopNValue { - - /** TopNValue value */ - value?: (string|null); - - /** TopNValue count */ - count?: (number|Long|string|null); - - /** TopNValue ratio */ - ratio?: (number|null); - } - - /** Represents a TopNValue. */ - class TopNValue implements ITopNValue { - - /** - * Constructs a new TopNValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue); - - /** TopNValue value. */ - public value: string; - - /** TopNValue count. */ - public count: (number|Long|string); - - /** TopNValue ratio. */ - public ratio: number; - - /** - * Creates a new TopNValue instance using the specified properties. - * @param [properties] Properties to set - * @returns TopNValue instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; - - /** - * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. - * @param message TopNValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. - * @param message TopNValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TopNValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TopNValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; - - /** - * Decodes a TopNValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TopNValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; - - /** - * Verifies a TopNValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TopNValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TopNValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; - - /** - * Creates a plain object from a TopNValue message. Also converts values to other types if specified. - * @param message TopNValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TopNValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TopNValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Properties of a PostScanActionsResult. */ - interface IPostScanActionsResult { - - /** PostScanActionsResult bigqueryExportResult */ - bigqueryExportResult?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null); - } - - /** Represents a PostScanActionsResult. */ - class PostScanActionsResult implements IPostScanActionsResult { - - /** - * Constructs a new PostScanActionsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult); - - /** PostScanActionsResult bigqueryExportResult. */ - public bigqueryExportResult?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null); - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns PostScanActionsResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; - - /** - * Verifies a PostScanActionsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostScanActionsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @param message PostScanActionsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostScanActionsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostScanActionsResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostScanActionsResult { - - /** Properties of a BigQueryExportResult. */ - interface IBigQueryExportResult { - - /** BigQueryExportResult state */ - state?: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|null); - - /** BigQueryExportResult message */ - message?: (string|null); - } - - /** Represents a BigQueryExportResult. */ - class BigQueryExportResult implements IBigQueryExportResult { - - /** - * Constructs a new BigQueryExportResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult); - - /** BigQueryExportResult state. */ - public state: (google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State); - - /** BigQueryExportResult message. */ - public message: string; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryExportResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Verifies a BigQueryExportResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryExportResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @param message BigQueryExportResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryExportResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryExportResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryExportResult { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - SKIPPED = 3 - } - } - } - } - - /** Properties of a Trigger. */ - interface ITrigger { - - /** Trigger onDemand */ - onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); - - /** Trigger schedule */ - schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); - } - - /** Represents a Trigger. */ - class Trigger implements ITrigger { - - /** - * Constructs a new Trigger. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ITrigger); - - /** Trigger onDemand. */ - public onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); - - /** Trigger schedule. */ - public schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); - - /** Trigger mode. */ - public mode?: ("onDemand"|"schedule"); - - /** - * Creates a new Trigger instance using the specified properties. - * @param [properties] Properties to set - * @returns Trigger instance - */ - public static create(properties?: google.cloud.dataplex.v1.ITrigger): google.cloud.dataplex.v1.Trigger; - - /** - * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger; - - /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger; - - /** - * Verifies a Trigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trigger - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger; - - /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. - * @param message Trigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Trigger { - - /** Properties of an OnDemand. */ - interface IOnDemand { - } - - /** Represents an OnDemand. */ - class OnDemand implements IOnDemand { - - /** - * Constructs a new OnDemand. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand); - - /** - * Creates a new OnDemand instance using the specified properties. - * @param [properties] Properties to set - * @returns OnDemand instance - */ - public static create(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand): google.cloud.dataplex.v1.Trigger.OnDemand; - - /** - * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. - * @param message OnDemand message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. - * @param message OnDemand message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OnDemand message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OnDemand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.OnDemand; - - /** - * Decodes an OnDemand message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OnDemand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.OnDemand; - - /** - * Verifies an OnDemand message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OnDemand - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.OnDemand; - - /** - * Creates a plain object from an OnDemand message. Also converts values to other types if specified. - * @param message OnDemand - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Trigger.OnDemand, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OnDemand to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OnDemand - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Schedule. */ - interface ISchedule { - - /** Schedule cron */ - cron?: (string|null); - } - - /** Represents a Schedule. */ - class Schedule implements ISchedule { - - /** - * Constructs a new Schedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Trigger.ISchedule); - - /** Schedule cron. */ - public cron: string; - - /** - * Creates a new Schedule instance using the specified properties. - * @param [properties] Properties to set - * @returns Schedule instance - */ - public static create(properties?: google.cloud.dataplex.v1.Trigger.ISchedule): google.cloud.dataplex.v1.Trigger.Schedule; - - /** - * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.Schedule; - - /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.Schedule; - - /** - * Verifies a Schedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.Schedule; - - /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @param message Schedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Trigger.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Schedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataSource. */ - interface IDataSource { - - /** DataSource entity */ - entity?: (string|null); - - /** DataSource resource */ - resource?: (string|null); - } - - /** Represents a DataSource. */ - class DataSource implements IDataSource { - - /** - * Constructs a new DataSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataSource); - - /** DataSource entity. */ - public entity?: (string|null); - - /** DataSource resource. */ - public resource?: (string|null); - - /** DataSource source. */ - public source?: ("entity"|"resource"); - - /** - * Creates a new DataSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSource instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataSource): google.cloud.dataplex.v1.DataSource; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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; - } - - /** Properties of a ScannedData. */ - interface IScannedData { - - /** ScannedData incrementalField */ - incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); - } - - /** Represents a ScannedData. */ - class ScannedData implements IScannedData { - - /** - * Constructs a new ScannedData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IScannedData); - - /** ScannedData incrementalField. */ - public incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); - - /** ScannedData dataRange. */ - public dataRange?: "incrementalField"; - - /** - * Creates a new ScannedData instance using the specified properties. - * @param [properties] Properties to set - * @returns ScannedData instance - */ - public static create(properties?: google.cloud.dataplex.v1.IScannedData): google.cloud.dataplex.v1.ScannedData; - - /** - * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. - * @param message ScannedData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. - * @param message ScannedData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScannedData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScannedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ScannedData; - - /** - * Decodes a ScannedData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScannedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ScannedData; - - /** - * Verifies a ScannedData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScannedData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScannedData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData; - - /** - * Creates a plain object from a ScannedData message. Also converts values to other types if specified. - * @param message ScannedData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ScannedData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScannedData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScannedData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ScannedData { - - /** Properties of an IncrementalField. */ - interface IIncrementalField { - - /** IncrementalField field */ - field?: (string|null); - - /** IncrementalField start */ - start?: (string|null); - - /** IncrementalField end */ - end?: (string|null); - } - - /** Represents an IncrementalField. */ - class IncrementalField implements IIncrementalField { - - /** - * Constructs a new IncrementalField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField); - - /** IncrementalField field. */ - public field: string; - - /** IncrementalField start. */ - public start: string; - - /** IncrementalField end. */ - public end: string; - - /** - * Creates a new IncrementalField instance using the specified properties. - * @param [properties] Properties to set - * @returns IncrementalField instance - */ - public static create(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField): google.cloud.dataplex.v1.ScannedData.IncrementalField; - - /** - * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. - * @param message IncrementalField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. - * @param message IncrementalField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IncrementalField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IncrementalField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ScannedData.IncrementalField; - - /** - * Decodes an IncrementalField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IncrementalField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ScannedData.IncrementalField; - - /** - * Verifies an IncrementalField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IncrementalField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IncrementalField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData.IncrementalField; - - /** - * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. - * @param message IncrementalField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ScannedData.IncrementalField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IncrementalField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IncrementalField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataQualitySpec. */ - interface IDataQualitySpec { - - /** DataQualitySpec rules */ - rules?: (google.cloud.dataplex.v1.IDataQualityRule[]|null); - - /** DataQualitySpec samplingPercent */ - samplingPercent?: (number|null); - - /** DataQualitySpec rowFilter */ - rowFilter?: (string|null); - - /** DataQualitySpec postScanActions */ - postScanActions?: (google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null); - } - - /** Represents a DataQualitySpec. */ - class DataQualitySpec implements IDataQualitySpec { - - /** - * Constructs a new DataQualitySpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualitySpec); - - /** DataQualitySpec rules. */ - public rules: google.cloud.dataplex.v1.IDataQualityRule[]; - - /** DataQualitySpec samplingPercent. */ - public samplingPercent: number; - - /** DataQualitySpec rowFilter. */ - public rowFilter: string; - - /** DataQualitySpec postScanActions. */ - public postScanActions?: (google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null); - - /** - * Creates a new DataQualitySpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualitySpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualitySpec): google.cloud.dataplex.v1.DataQualitySpec; - - /** - * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. - * @param message DataQualitySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. - * @param message DataQualitySpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualitySpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec; - - /** - * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec; - - /** - * Verifies a DataQualitySpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualitySpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualitySpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec; - - /** - * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. - * @param message DataQualitySpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualitySpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualitySpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataQualitySpec { - - /** Properties of a PostScanActions. */ - interface IPostScanActions { - - /** PostScanActions bigqueryExport */ - bigqueryExport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null); - - /** PostScanActions notificationReport */ - notificationReport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null); - } - - /** Represents a PostScanActions. */ - class PostScanActions implements IPostScanActions { - - /** - * Constructs a new PostScanActions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions); - - /** PostScanActions bigqueryExport. */ - public bigqueryExport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null); - - /** PostScanActions notificationReport. */ - public notificationReport?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null); - - /** - * Creates a new PostScanActions instance using the specified properties. - * @param [properties] Properties to set - * @returns PostScanActions instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; - - /** - * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. - * @param message PostScanActions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. - * @param message PostScanActions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostScanActions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; - - /** - * Decodes a PostScanActions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; - - /** - * Verifies a PostScanActions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostScanActions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions; - - /** - * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. - * @param message PostScanActions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostScanActions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostScanActions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostScanActions { - - /** Properties of a BigQueryExport. */ - interface IBigQueryExport { - - /** BigQueryExport resultsTable */ - resultsTable?: (string|null); - } - - /** Represents a BigQueryExport. */ - class BigQueryExport implements IBigQueryExport { - - /** - * Constructs a new BigQueryExport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport); - - /** BigQueryExport resultsTable. */ - public resultsTable: string; - - /** - * Creates a new BigQueryExport instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryExport instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; - - /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @param message BigQueryExport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; - - /** - * Verifies a BigQueryExport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryExport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport; - - /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. - * @param message BigQueryExport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryExport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryExport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Recipients. */ - interface IRecipients { - - /** Recipients emails */ - emails?: (string[]|null); - } - - /** Represents a Recipients. */ - class Recipients implements IRecipients { - - /** - * Constructs a new Recipients. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients); - - /** Recipients emails. */ - public emails: string[]; - - /** - * Creates a new Recipients instance using the specified properties. - * @param [properties] Properties to set - * @returns Recipients instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; - - /** - * Encodes the specified Recipients message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. - * @param message Recipients message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Recipients message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. - * @param message Recipients message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Recipients message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Recipients - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; - - /** - * Decodes a Recipients message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Recipients - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; - - /** - * Verifies a Recipients message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Recipients message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Recipients - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients; - - /** - * Creates a plain object from a Recipients message. Also converts values to other types if specified. - * @param message Recipients - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Recipients to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Recipients - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScoreThresholdTrigger. */ - interface IScoreThresholdTrigger { - - /** ScoreThresholdTrigger scoreThreshold */ - scoreThreshold?: (number|null); - } - - /** Represents a ScoreThresholdTrigger. */ - class ScoreThresholdTrigger implements IScoreThresholdTrigger { - - /** - * Constructs a new ScoreThresholdTrigger. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger); - - /** ScoreThresholdTrigger scoreThreshold. */ - public scoreThreshold: number; - - /** - * Creates a new ScoreThresholdTrigger instance using the specified properties. - * @param [properties] Properties to set - * @returns ScoreThresholdTrigger instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; - - /** - * Encodes the specified ScoreThresholdTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. - * @param message ScoreThresholdTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScoreThresholdTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. - * @param message ScoreThresholdTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScoreThresholdTrigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScoreThresholdTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; - - /** - * Decodes a ScoreThresholdTrigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScoreThresholdTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; - - /** - * Verifies a ScoreThresholdTrigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScoreThresholdTrigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScoreThresholdTrigger - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger; - - /** - * Creates a plain object from a ScoreThresholdTrigger message. Also converts values to other types if specified. - * @param message ScoreThresholdTrigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScoreThresholdTrigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScoreThresholdTrigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JobFailureTrigger. */ - interface IJobFailureTrigger { - } - - /** Represents a JobFailureTrigger. */ - class JobFailureTrigger implements IJobFailureTrigger { - - /** - * Constructs a new JobFailureTrigger. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger); - - /** - * Creates a new JobFailureTrigger instance using the specified properties. - * @param [properties] Properties to set - * @returns JobFailureTrigger instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; - - /** - * Encodes the specified JobFailureTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. - * @param message JobFailureTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JobFailureTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. - * @param message JobFailureTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JobFailureTrigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JobFailureTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; - - /** - * Decodes a JobFailureTrigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JobFailureTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; - - /** - * Verifies a JobFailureTrigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JobFailureTrigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JobFailureTrigger - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger; - - /** - * Creates a plain object from a JobFailureTrigger message. Also converts values to other types if specified. - * @param message JobFailureTrigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JobFailureTrigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JobFailureTrigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JobEndTrigger. */ - interface IJobEndTrigger { - } - - /** Represents a JobEndTrigger. */ - class JobEndTrigger implements IJobEndTrigger { - - /** - * Constructs a new JobEndTrigger. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger); - - /** - * Creates a new JobEndTrigger instance using the specified properties. - * @param [properties] Properties to set - * @returns JobEndTrigger instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; - - /** - * Encodes the specified JobEndTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. - * @param message JobEndTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JobEndTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. - * @param message JobEndTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JobEndTrigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JobEndTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; - - /** - * Decodes a JobEndTrigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JobEndTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; - - /** - * Verifies a JobEndTrigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JobEndTrigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JobEndTrigger - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger; - - /** - * Creates a plain object from a JobEndTrigger message. Also converts values to other types if specified. - * @param message JobEndTrigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JobEndTrigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JobEndTrigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NotificationReport. */ - interface INotificationReport { - - /** NotificationReport recipients */ - recipients?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null); - - /** NotificationReport scoreThresholdTrigger */ - scoreThresholdTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null); - - /** NotificationReport jobFailureTrigger */ - jobFailureTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null); - - /** NotificationReport jobEndTrigger */ - jobEndTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null); - } - - /** Represents a NotificationReport. */ - class NotificationReport implements INotificationReport { - - /** - * Constructs a new NotificationReport. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport); - - /** NotificationReport recipients. */ - public recipients?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null); - - /** NotificationReport scoreThresholdTrigger. */ - public scoreThresholdTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null); - - /** NotificationReport jobFailureTrigger. */ - public jobFailureTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null); - - /** NotificationReport jobEndTrigger. */ - public jobEndTrigger?: (google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null); - - /** - * Creates a new NotificationReport instance using the specified properties. - * @param [properties] Properties to set - * @returns NotificationReport instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; - - /** - * Encodes the specified NotificationReport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. - * @param message NotificationReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotificationReport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. - * @param message NotificationReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotificationReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotificationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; - - /** - * Decodes a NotificationReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotificationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; - - /** - * Verifies a NotificationReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NotificationReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotificationReport - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport; - - /** - * Creates a plain object from a NotificationReport message. Also converts values to other types if specified. - * @param message NotificationReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotificationReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NotificationReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a DataQualityResult. */ - interface IDataQualityResult { - - /** DataQualityResult passed */ - passed?: (boolean|null); - - /** DataQualityResult score */ - score?: (number|null); - - /** DataQualityResult dimensions */ - dimensions?: (google.cloud.dataplex.v1.IDataQualityDimensionResult[]|null); - - /** DataQualityResult columns */ - columns?: (google.cloud.dataplex.v1.IDataQualityColumnResult[]|null); - - /** DataQualityResult rules */ - rules?: (google.cloud.dataplex.v1.IDataQualityRuleResult[]|null); - - /** DataQualityResult rowCount */ - rowCount?: (number|Long|string|null); - - /** DataQualityResult scannedData */ - scannedData?: (google.cloud.dataplex.v1.IScannedData|null); - - /** DataQualityResult postScanActionsResult */ - postScanActionsResult?: (google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null); - } - - /** Represents a DataQualityResult. */ - class DataQualityResult implements IDataQualityResult { - - /** - * Constructs a new DataQualityResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityResult); - - /** DataQualityResult passed. */ - public passed: boolean; - - /** DataQualityResult score. */ - public score?: (number|null); - - /** DataQualityResult dimensions. */ - public dimensions: google.cloud.dataplex.v1.IDataQualityDimensionResult[]; - - /** DataQualityResult columns. */ - public columns: google.cloud.dataplex.v1.IDataQualityColumnResult[]; - - /** DataQualityResult rules. */ - public rules: google.cloud.dataplex.v1.IDataQualityRuleResult[]; - - /** DataQualityResult rowCount. */ - public rowCount: (number|Long|string); - - /** DataQualityResult scannedData. */ - public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); - - /** DataQualityResult postScanActionsResult. */ - public postScanActionsResult?: (google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null); - - /** DataQualityResult _score. */ - public _score?: "score"; - - /** - * Creates a new DataQualityResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityResult): google.cloud.dataplex.v1.DataQualityResult; - - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult; - - /** - * Verifies a DataQualityResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult; - - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @param message DataQualityResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataQualityResult { - - /** Properties of a PostScanActionsResult. */ - interface IPostScanActionsResult { - - /** PostScanActionsResult bigqueryExportResult */ - bigqueryExportResult?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null); - } - - /** Represents a PostScanActionsResult. */ - class PostScanActionsResult implements IPostScanActionsResult { - - /** - * Constructs a new PostScanActionsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult); - - /** PostScanActionsResult bigqueryExportResult. */ - public bigqueryExportResult?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null); - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns PostScanActionsResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; - - /** - * Verifies a PostScanActionsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostScanActionsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @param message PostScanActionsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostScanActionsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostScanActionsResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostScanActionsResult { - - /** Properties of a BigQueryExportResult. */ - interface IBigQueryExportResult { - - /** BigQueryExportResult state */ - state?: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|null); - - /** BigQueryExportResult message */ - message?: (string|null); - } - - /** Represents a BigQueryExportResult. */ - class BigQueryExportResult implements IBigQueryExportResult { - - /** - * Constructs a new BigQueryExportResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult); - - /** BigQueryExportResult state. */ - public state: (google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State); - - /** BigQueryExportResult message. */ - public message: string; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryExportResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Verifies a BigQueryExportResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryExportResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @param message BigQueryExportResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryExportResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryExportResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryExportResult { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - SKIPPED = 3 - } - } - } - } - - /** Properties of a DataQualityRuleResult. */ - interface IDataQualityRuleResult { - - /** DataQualityRuleResult rule */ - rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); - - /** DataQualityRuleResult passed */ - passed?: (boolean|null); - - /** DataQualityRuleResult evaluatedCount */ - evaluatedCount?: (number|Long|string|null); - - /** DataQualityRuleResult passedCount */ - passedCount?: (number|Long|string|null); - - /** DataQualityRuleResult nullCount */ - nullCount?: (number|Long|string|null); - - /** DataQualityRuleResult passRatio */ - passRatio?: (number|null); - - /** DataQualityRuleResult failingRowsQuery */ - failingRowsQuery?: (string|null); - - /** DataQualityRuleResult assertionRowCount */ - assertionRowCount?: (number|Long|string|null); - } - - /** Represents a DataQualityRuleResult. */ - class DataQualityRuleResult implements IDataQualityRuleResult { - - /** - * Constructs a new DataQualityRuleResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult); - - /** DataQualityRuleResult rule. */ - public rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); - - /** DataQualityRuleResult passed. */ - public passed: boolean; - - /** DataQualityRuleResult evaluatedCount. */ - public evaluatedCount: (number|Long|string); - - /** DataQualityRuleResult passedCount. */ - public passedCount: (number|Long|string); - - /** DataQualityRuleResult nullCount. */ - public nullCount: (number|Long|string); - - /** DataQualityRuleResult passRatio. */ - public passRatio: number; - - /** DataQualityRuleResult failingRowsQuery. */ - public failingRowsQuery: string; - - /** DataQualityRuleResult assertionRowCount. */ - public assertionRowCount: (number|Long|string); - - /** - * Creates a new DataQualityRuleResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityRuleResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult): google.cloud.dataplex.v1.DataQualityRuleResult; - - /** - * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. - * @param message DataQualityRuleResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. - * @param message DataQualityRuleResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityRuleResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRuleResult; - - /** - * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRuleResult; - - /** - * Verifies a DataQualityRuleResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityRuleResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRuleResult; - - /** - * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. - * @param message DataQualityRuleResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRuleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityRuleResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityRuleResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataQualityDimensionResult. */ - interface IDataQualityDimensionResult { - - /** DataQualityDimensionResult dimension */ - dimension?: (google.cloud.dataplex.v1.IDataQualityDimension|null); - - /** DataQualityDimensionResult passed */ - passed?: (boolean|null); - - /** DataQualityDimensionResult score */ - score?: (number|null); - } - - /** Represents a DataQualityDimensionResult. */ - class DataQualityDimensionResult implements IDataQualityDimensionResult { - - /** - * Constructs a new DataQualityDimensionResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult); - - /** DataQualityDimensionResult dimension. */ - public dimension?: (google.cloud.dataplex.v1.IDataQualityDimension|null); - - /** DataQualityDimensionResult passed. */ - public passed: boolean; - - /** DataQualityDimensionResult score. */ - public score?: (number|null); - - /** DataQualityDimensionResult _score. */ - public _score?: "score"; - - /** - * Creates a new DataQualityDimensionResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityDimensionResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult): google.cloud.dataplex.v1.DataQualityDimensionResult; - - /** - * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. - * @param message DataQualityDimensionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. - * @param message DataQualityDimensionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityDimensionResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityDimensionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityDimensionResult; - - /** - * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityDimensionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityDimensionResult; - - /** - * Verifies a DataQualityDimensionResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityDimensionResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityDimensionResult; - - /** - * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. - * @param message DataQualityDimensionResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityDimensionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityDimensionResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityDimensionResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataQualityDimension. */ - interface IDataQualityDimension { - - /** DataQualityDimension name */ - name?: (string|null); - } - - /** Represents a DataQualityDimension. */ - class DataQualityDimension implements IDataQualityDimension { - - /** - * Constructs a new DataQualityDimension. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityDimension); - - /** DataQualityDimension name. */ - public name: string; - - /** - * Creates a new DataQualityDimension instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityDimension instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityDimension): google.cloud.dataplex.v1.DataQualityDimension; - - /** - * Encodes the specified DataQualityDimension message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. - * @param message DataQualityDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityDimension message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. - * @param message DataQualityDimension message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityDimension, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityDimension message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityDimension; - - /** - * Decodes a DataQualityDimension message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityDimension; - - /** - * Verifies a DataQualityDimension message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityDimension message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityDimension - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityDimension; - - /** - * Creates a plain object from a DataQualityDimension message. Also converts values to other types if specified. - * @param message DataQualityDimension - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityDimension to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityDimension - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataQualityRule. */ - interface IDataQualityRule { - - /** DataQualityRule rangeExpectation */ - rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); - - /** DataQualityRule nonNullExpectation */ - nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); - - /** DataQualityRule setExpectation */ - setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); - - /** DataQualityRule regexExpectation */ - regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); - - /** DataQualityRule uniquenessExpectation */ - uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); - - /** DataQualityRule statisticRangeExpectation */ - statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); - - /** DataQualityRule rowConditionExpectation */ - rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); - - /** DataQualityRule tableConditionExpectation */ - tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); - - /** DataQualityRule sqlAssertion */ - sqlAssertion?: (google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null); - - /** DataQualityRule column */ - column?: (string|null); - - /** DataQualityRule ignoreNull */ - ignoreNull?: (boolean|null); - - /** DataQualityRule dimension */ - dimension?: (string|null); - - /** DataQualityRule threshold */ - threshold?: (number|null); - - /** DataQualityRule name */ - name?: (string|null); - - /** DataQualityRule description */ - description?: (string|null); - - /** DataQualityRule suspended */ - suspended?: (boolean|null); - } - - /** Represents a DataQualityRule. */ - class DataQualityRule implements IDataQualityRule { - - /** - * Constructs a new DataQualityRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityRule); - - /** DataQualityRule rangeExpectation. */ - public rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); - - /** DataQualityRule nonNullExpectation. */ - public nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); - - /** DataQualityRule setExpectation. */ - public setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); - - /** DataQualityRule regexExpectation. */ - public regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); - - /** DataQualityRule uniquenessExpectation. */ - public uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); - - /** DataQualityRule statisticRangeExpectation. */ - public statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); - - /** DataQualityRule rowConditionExpectation. */ - public rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); - - /** DataQualityRule tableConditionExpectation. */ - public tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); - - /** DataQualityRule sqlAssertion. */ - public sqlAssertion?: (google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null); - - /** DataQualityRule column. */ - public column: string; - - /** DataQualityRule ignoreNull. */ - public ignoreNull: boolean; - - /** DataQualityRule dimension. */ - public dimension: string; - - /** DataQualityRule threshold. */ - public threshold: number; - - /** DataQualityRule name. */ - public name: string; - - /** DataQualityRule description. */ - public description: string; - - /** DataQualityRule suspended. */ - public suspended: boolean; - - /** DataQualityRule ruleType. */ - public ruleType?: ("rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|"sqlAssertion"); - - /** - * Creates a new DataQualityRule instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityRule instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityRule): google.cloud.dataplex.v1.DataQualityRule; - - /** - * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. - * @param message DataQualityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. - * @param message DataQualityRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule; - - /** - * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule; - - /** - * Verifies a DataQualityRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule; - - /** - * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. - * @param message DataQualityRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataQualityRule { - - /** Properties of a RangeExpectation. */ - interface IRangeExpectation { - - /** RangeExpectation minValue */ - minValue?: (string|null); - - /** RangeExpectation maxValue */ - maxValue?: (string|null); - - /** RangeExpectation strictMinEnabled */ - strictMinEnabled?: (boolean|null); - - /** RangeExpectation strictMaxEnabled */ - strictMaxEnabled?: (boolean|null); - } - - /** Represents a RangeExpectation. */ - class RangeExpectation implements IRangeExpectation { - - /** - * Constructs a new RangeExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation); - - /** RangeExpectation minValue. */ - public minValue: string; - - /** RangeExpectation maxValue. */ - public maxValue: string; - - /** RangeExpectation strictMinEnabled. */ - public strictMinEnabled: boolean; - - /** RangeExpectation strictMaxEnabled. */ - public strictMaxEnabled: boolean; - - /** - * Creates a new RangeExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns RangeExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; - - /** - * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. - * @param message RangeExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. - * @param message RangeExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RangeExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; - - /** - * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; - - /** - * Verifies a RangeExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RangeExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RangeExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; - - /** - * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. - * @param message RangeExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RangeExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RangeExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NonNullExpectation. */ - interface INonNullExpectation { - } - - /** Represents a NonNullExpectation. */ - class NonNullExpectation implements INonNullExpectation { - - /** - * Constructs a new NonNullExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation); - - /** - * Creates a new NonNullExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns NonNullExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; - - /** - * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. - * @param message NonNullExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. - * @param message NonNullExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NonNullExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NonNullExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; - - /** - * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NonNullExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; - - /** - * Verifies a NonNullExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NonNullExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NonNullExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; - - /** - * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. - * @param message NonNullExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NonNullExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NonNullExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetExpectation. */ - interface ISetExpectation { - - /** SetExpectation values */ - values?: (string[]|null); - } - - /** Represents a SetExpectation. */ - class SetExpectation implements ISetExpectation { - - /** - * Constructs a new SetExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation); - - /** SetExpectation values. */ - public values: string[]; - - /** - * Creates a new SetExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns SetExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; - - /** - * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. - * @param message SetExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. - * @param message SetExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; - - /** - * Decodes a SetExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; - - /** - * Verifies a SetExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; - - /** - * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. - * @param message SetExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.SetExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RegexExpectation. */ - interface IRegexExpectation { - - /** RegexExpectation regex */ - regex?: (string|null); - } - - /** Represents a RegexExpectation. */ - class RegexExpectation implements IRegexExpectation { - - /** - * Constructs a new RegexExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation); - - /** RegexExpectation regex. */ - public regex: string; - - /** - * Creates a new RegexExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns RegexExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; - - /** - * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. - * @param message RegexExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. - * @param message RegexExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegexExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegexExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; - - /** - * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegexExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; - - /** - * Verifies a RegexExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegexExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegexExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; - - /** - * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. - * @param message RegexExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RegexExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegexExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RegexExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UniquenessExpectation. */ - interface IUniquenessExpectation { - } - - /** Represents an UniquenessExpectation. */ - class UniquenessExpectation implements IUniquenessExpectation { - - /** - * Constructs a new UniquenessExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation); - - /** - * Creates a new UniquenessExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns UniquenessExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; - - /** - * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. - * @param message UniquenessExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. - * @param message UniquenessExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UniquenessExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UniquenessExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; - - /** - * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UniquenessExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; - - /** - * Verifies an UniquenessExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UniquenessExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UniquenessExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; - - /** - * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. - * @param message UniquenessExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UniquenessExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UniquenessExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StatisticRangeExpectation. */ - interface IStatisticRangeExpectation { - - /** StatisticRangeExpectation statistic */ - statistic?: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null); - - /** StatisticRangeExpectation minValue */ - minValue?: (string|null); - - /** StatisticRangeExpectation maxValue */ - maxValue?: (string|null); - - /** StatisticRangeExpectation strictMinEnabled */ - strictMinEnabled?: (boolean|null); - - /** StatisticRangeExpectation strictMaxEnabled */ - strictMaxEnabled?: (boolean|null); - } - - /** Represents a StatisticRangeExpectation. */ - class StatisticRangeExpectation implements IStatisticRangeExpectation { - - /** - * Constructs a new StatisticRangeExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation); - - /** StatisticRangeExpectation statistic. */ - public statistic: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic); - - /** StatisticRangeExpectation minValue. */ - public minValue: string; - - /** StatisticRangeExpectation maxValue. */ - public maxValue: string; - - /** StatisticRangeExpectation strictMinEnabled. */ - public strictMinEnabled: boolean; - - /** StatisticRangeExpectation strictMaxEnabled. */ - public strictMaxEnabled: boolean; - - /** - * Creates a new StatisticRangeExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns StatisticRangeExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; - - /** - * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. - * @param message StatisticRangeExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. - * @param message StatisticRangeExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatisticRangeExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatisticRangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; - - /** - * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatisticRangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; - - /** - * Verifies a StatisticRangeExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatisticRangeExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; - - /** - * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. - * @param message StatisticRangeExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatisticRangeExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StatisticRangeExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StatisticRangeExpectation { - - /** ColumnStatistic enum. */ - enum ColumnStatistic { - STATISTIC_UNDEFINED = 0, - MEAN = 1, - MIN = 2, - MAX = 3 - } - } - - /** Properties of a RowConditionExpectation. */ - interface IRowConditionExpectation { - - /** RowConditionExpectation sqlExpression */ - sqlExpression?: (string|null); - } - - /** Represents a RowConditionExpectation. */ - class RowConditionExpectation implements IRowConditionExpectation { - - /** - * Constructs a new RowConditionExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation); - - /** RowConditionExpectation sqlExpression. */ - public sqlExpression: string; - - /** - * Creates a new RowConditionExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns RowConditionExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; - - /** - * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. - * @param message RowConditionExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. - * @param message RowConditionExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RowConditionExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RowConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; - - /** - * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RowConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; - - /** - * Verifies a RowConditionExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RowConditionExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RowConditionExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; - - /** - * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. - * @param message RowConditionExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RowConditionExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RowConditionExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TableConditionExpectation. */ - interface ITableConditionExpectation { - - /** TableConditionExpectation sqlExpression */ - sqlExpression?: (string|null); - } - - /** Represents a TableConditionExpectation. */ - class TableConditionExpectation implements ITableConditionExpectation { - - /** - * Constructs a new TableConditionExpectation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation); - - /** TableConditionExpectation sqlExpression. */ - public sqlExpression: string; - - /** - * Creates a new TableConditionExpectation instance using the specified properties. - * @param [properties] Properties to set - * @returns TableConditionExpectation instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; - - /** - * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. - * @param message TableConditionExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. - * @param message TableConditionExpectation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableConditionExpectation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; - - /** - * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; - - /** - * Verifies a TableConditionExpectation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableConditionExpectation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableConditionExpectation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; - - /** - * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. - * @param message TableConditionExpectation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableConditionExpectation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TableConditionExpectation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlAssertion. */ - interface ISqlAssertion { - - /** SqlAssertion sqlStatement */ - sqlStatement?: (string|null); - } - - /** Represents a SqlAssertion. */ - class SqlAssertion implements ISqlAssertion { - - /** - * Constructs a new SqlAssertion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion); - - /** SqlAssertion sqlStatement. */ - public sqlStatement: string; - - /** - * Creates a new SqlAssertion instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlAssertion instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; - - /** - * Encodes the specified SqlAssertion message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. - * @param message SqlAssertion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlAssertion message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. - * @param message SqlAssertion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlAssertion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlAssertion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; - - /** - * Decodes a SqlAssertion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlAssertion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; - - /** - * Verifies a SqlAssertion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SqlAssertion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlAssertion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.SqlAssertion; - - /** - * Creates a plain object from a SqlAssertion message. Also converts values to other types if specified. - * @param message SqlAssertion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.SqlAssertion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlAssertion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlAssertion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataQualityColumnResult. */ - interface IDataQualityColumnResult { - - /** DataQualityColumnResult column */ - column?: (string|null); - - /** DataQualityColumnResult score */ - score?: (number|null); - } - - /** Represents a DataQualityColumnResult. */ - class DataQualityColumnResult implements IDataQualityColumnResult { - - /** - * Constructs a new DataQualityColumnResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityColumnResult); - - /** DataQualityColumnResult column. */ - public column: string; - - /** DataQualityColumnResult score. */ - public score?: (number|null); - - /** DataQualityColumnResult _score. */ - public _score?: "score"; - - /** - * Creates a new DataQualityColumnResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityColumnResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityColumnResult): google.cloud.dataplex.v1.DataQualityColumnResult; - - /** - * Encodes the specified DataQualityColumnResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. - * @param message DataQualityColumnResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityColumnResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityColumnResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. - * @param message DataQualityColumnResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityColumnResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityColumnResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityColumnResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityColumnResult; - - /** - * Decodes a DataQualityColumnResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityColumnResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityColumnResult; - - /** - * Verifies a DataQualityColumnResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityColumnResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityColumnResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityColumnResult; - - /** - * Creates a plain object from a DataQualityColumnResult message. Also converts values to other types if specified. - * @param message DataQualityColumnResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityColumnResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityColumnResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityColumnResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a DataTaxonomyService */ - class DataTaxonomyService extends $protobuf.rpc.Service { - - /** - * Constructs a new DataTaxonomyService 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 DataTaxonomyService 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): DataTaxonomyService; - - /** - * Calls CreateDataTaxonomy. - * @param request CreateDataTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDataTaxonomy(request: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomyCallback): void; - - /** - * Calls CreateDataTaxonomy. - * @param request CreateDataTaxonomyRequest message or plain object - * @returns Promise - */ - public createDataTaxonomy(request: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest): Promise; - - /** - * Calls UpdateDataTaxonomy. - * @param request UpdateDataTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataTaxonomy(request: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomyCallback): void; - - /** - * Calls UpdateDataTaxonomy. - * @param request UpdateDataTaxonomyRequest message or plain object - * @returns Promise - */ - public updateDataTaxonomy(request: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest): Promise; - - /** - * Calls DeleteDataTaxonomy. - * @param request DeleteDataTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDataTaxonomy(request: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomyCallback): void; - - /** - * Calls DeleteDataTaxonomy. - * @param request DeleteDataTaxonomyRequest message or plain object - * @returns Promise - */ - public deleteDataTaxonomy(request: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest): Promise; - - /** - * Calls ListDataTaxonomies. - * @param request ListDataTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataTaxonomiesResponse - */ - public listDataTaxonomies(request: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomiesCallback): void; - - /** - * Calls ListDataTaxonomies. - * @param request ListDataTaxonomiesRequest message or plain object - * @returns Promise - */ - public listDataTaxonomies(request: google.cloud.dataplex.v1.IListDataTaxonomiesRequest): Promise; - - /** - * Calls GetDataTaxonomy. - * @param request GetDataTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataTaxonomy - */ - public getDataTaxonomy(request: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomyCallback): void; - - /** - * Calls GetDataTaxonomy. - * @param request GetDataTaxonomyRequest message or plain object - * @returns Promise - */ - public getDataTaxonomy(request: google.cloud.dataplex.v1.IGetDataTaxonomyRequest): Promise; - - /** - * Calls CreateDataAttributeBinding. - * @param request CreateDataAttributeBindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDataAttributeBinding(request: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBindingCallback): void; - - /** - * Calls CreateDataAttributeBinding. - * @param request CreateDataAttributeBindingRequest message or plain object - * @returns Promise - */ - public createDataAttributeBinding(request: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest): Promise; - - /** - * Calls UpdateDataAttributeBinding. - * @param request UpdateDataAttributeBindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataAttributeBinding(request: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBindingCallback): void; - - /** - * Calls UpdateDataAttributeBinding. - * @param request UpdateDataAttributeBindingRequest message or plain object - * @returns Promise - */ - public updateDataAttributeBinding(request: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest): Promise; - - /** - * Calls DeleteDataAttributeBinding. - * @param request DeleteDataAttributeBindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDataAttributeBinding(request: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBindingCallback): void; - - /** - * Calls DeleteDataAttributeBinding. - * @param request DeleteDataAttributeBindingRequest message or plain object - * @returns Promise - */ - public deleteDataAttributeBinding(request: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest): Promise; - - /** - * Calls ListDataAttributeBindings. - * @param request ListDataAttributeBindingsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataAttributeBindingsResponse - */ - public listDataAttributeBindings(request: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindingsCallback): void; - - /** - * Calls ListDataAttributeBindings. - * @param request ListDataAttributeBindingsRequest message or plain object - * @returns Promise - */ - public listDataAttributeBindings(request: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest): Promise; - - /** - * Calls GetDataAttributeBinding. - * @param request GetDataAttributeBindingRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataAttributeBinding - */ - public getDataAttributeBinding(request: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBindingCallback): void; - - /** - * Calls GetDataAttributeBinding. - * @param request GetDataAttributeBindingRequest message or plain object - * @returns Promise - */ - public getDataAttributeBinding(request: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest): Promise; - - /** - * Calls CreateDataAttribute. - * @param request CreateDataAttributeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDataAttribute(request: google.cloud.dataplex.v1.ICreateDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeCallback): void; - - /** - * Calls CreateDataAttribute. - * @param request CreateDataAttributeRequest message or plain object - * @returns Promise - */ - public createDataAttribute(request: google.cloud.dataplex.v1.ICreateDataAttributeRequest): Promise; - - /** - * Calls UpdateDataAttribute. - * @param request UpdateDataAttributeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataAttribute(request: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeCallback): void; - - /** - * Calls UpdateDataAttribute. - * @param request UpdateDataAttributeRequest message or plain object - * @returns Promise - */ - public updateDataAttribute(request: google.cloud.dataplex.v1.IUpdateDataAttributeRequest): Promise; - - /** - * Calls DeleteDataAttribute. - * @param request DeleteDataAttributeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDataAttribute(request: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeCallback): void; - - /** - * Calls DeleteDataAttribute. - * @param request DeleteDataAttributeRequest message or plain object - * @returns Promise - */ - public deleteDataAttribute(request: google.cloud.dataplex.v1.IDeleteDataAttributeRequest): Promise; - - /** - * Calls ListDataAttributes. - * @param request ListDataAttributesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataAttributesResponse - */ - public listDataAttributes(request: google.cloud.dataplex.v1.IListDataAttributesRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributesCallback): void; - - /** - * Calls ListDataAttributes. - * @param request ListDataAttributesRequest message or plain object - * @returns Promise - */ - public listDataAttributes(request: google.cloud.dataplex.v1.IListDataAttributesRequest): Promise; - - /** - * Calls GetDataAttribute. - * @param request GetDataAttributeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataAttribute - */ - public getDataAttribute(request: google.cloud.dataplex.v1.IGetDataAttributeRequest, callback: google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeCallback): void; - - /** - * Calls GetDataAttribute. - * @param request GetDataAttributeRequest message or plain object - * @returns Promise - */ - public getDataAttribute(request: google.cloud.dataplex.v1.IGetDataAttributeRequest): Promise; - } - - namespace DataTaxonomyService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataTaxonomy}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataTaxonomy}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataTaxonomy}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteDataTaxonomyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataTaxonomies}. - * @param error Error, if any - * @param [response] ListDataTaxonomiesResponse - */ - type ListDataTaxonomiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataTaxonomiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataTaxonomy}. - * @param error Error, if any - * @param [response] DataTaxonomy - */ - type GetDataTaxonomyCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataTaxonomy) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttributeBinding}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttributeBinding}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttributeBinding}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteDataAttributeBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributeBindings}. - * @param error Error, if any - * @param [response] ListDataAttributeBindingsResponse - */ - type ListDataAttributeBindingsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttributeBinding}. - * @param error Error, if any - * @param [response] DataAttributeBinding - */ - type GetDataAttributeBindingCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataAttributeBinding) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttribute}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttribute}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttribute}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteDataAttributeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributes}. - * @param error Error, if any - * @param [response] ListDataAttributesResponse - */ - type ListDataAttributesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataAttributesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttribute}. - * @param error Error, if any - * @param [response] DataAttribute - */ - type GetDataAttributeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataAttribute) => void; - } - - /** Properties of a DataTaxonomy. */ - interface IDataTaxonomy { - - /** DataTaxonomy name */ - name?: (string|null); - - /** DataTaxonomy uid */ - uid?: (string|null); - - /** DataTaxonomy createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataTaxonomy updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataTaxonomy description */ - description?: (string|null); - - /** DataTaxonomy displayName */ - displayName?: (string|null); - - /** DataTaxonomy labels */ - labels?: ({ [k: string]: string }|null); - - /** DataTaxonomy attributeCount */ - attributeCount?: (number|null); - - /** DataTaxonomy etag */ - etag?: (string|null); - - /** DataTaxonomy classCount */ - classCount?: (number|null); - } - - /** Represents a DataTaxonomy. */ - class DataTaxonomy implements IDataTaxonomy { - - /** - * Constructs a new DataTaxonomy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataTaxonomy); - - /** DataTaxonomy name. */ - public name: string; - - /** DataTaxonomy uid. */ - public uid: string; - - /** DataTaxonomy createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataTaxonomy updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataTaxonomy description. */ - public description: string; - - /** DataTaxonomy displayName. */ - public displayName: string; - - /** DataTaxonomy labels. */ - public labels: { [k: string]: string }; - - /** DataTaxonomy attributeCount. */ - public attributeCount: number; - - /** DataTaxonomy etag. */ - public etag: string; - - /** DataTaxonomy classCount. */ - public classCount: number; - - /** - * Creates a new DataTaxonomy instance using the specified properties. - * @param [properties] Properties to set - * @returns DataTaxonomy instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataTaxonomy): google.cloud.dataplex.v1.DataTaxonomy; - - /** - * Encodes the specified DataTaxonomy message. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. - * @param message DataTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataTaxonomy message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. - * @param message DataTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataTaxonomy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataTaxonomy; - - /** - * Decodes a DataTaxonomy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataTaxonomy; - - /** - * Verifies a DataTaxonomy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataTaxonomy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataTaxonomy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataTaxonomy; - - /** - * Creates a plain object from a DataTaxonomy message. Also converts values to other types if specified. - * @param message DataTaxonomy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataTaxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataTaxonomy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataTaxonomy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataAttribute. */ - interface IDataAttribute { - - /** DataAttribute name */ - name?: (string|null); - - /** DataAttribute uid */ - uid?: (string|null); - - /** DataAttribute createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataAttribute updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataAttribute description */ - description?: (string|null); - - /** DataAttribute displayName */ - displayName?: (string|null); - - /** DataAttribute labels */ - labels?: ({ [k: string]: string }|null); - - /** DataAttribute parentId */ - parentId?: (string|null); - - /** DataAttribute attributeCount */ - attributeCount?: (number|null); - - /** DataAttribute etag */ - etag?: (string|null); - - /** DataAttribute resourceAccessSpec */ - resourceAccessSpec?: (google.cloud.dataplex.v1.IResourceAccessSpec|null); - - /** DataAttribute dataAccessSpec */ - dataAccessSpec?: (google.cloud.dataplex.v1.IDataAccessSpec|null); - } - - /** Represents a DataAttribute. */ - class DataAttribute implements IDataAttribute { - - /** - * Constructs a new DataAttribute. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataAttribute); - - /** DataAttribute name. */ - public name: string; - - /** DataAttribute uid. */ - public uid: string; - - /** DataAttribute createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataAttribute updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataAttribute description. */ - public description: string; - - /** DataAttribute displayName. */ - public displayName: string; - - /** DataAttribute labels. */ - public labels: { [k: string]: string }; - - /** DataAttribute parentId. */ - public parentId: string; - - /** DataAttribute attributeCount. */ - public attributeCount: number; - - /** DataAttribute etag. */ - public etag: string; - - /** DataAttribute resourceAccessSpec. */ - public resourceAccessSpec?: (google.cloud.dataplex.v1.IResourceAccessSpec|null); - - /** DataAttribute dataAccessSpec. */ - public dataAccessSpec?: (google.cloud.dataplex.v1.IDataAccessSpec|null); - - /** - * Creates a new DataAttribute instance using the specified properties. - * @param [properties] Properties to set - * @returns DataAttribute instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataAttribute): google.cloud.dataplex.v1.DataAttribute; - - /** - * Encodes the specified DataAttribute message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. - * @param message DataAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataAttribute message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. - * @param message DataAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataAttribute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttribute; - - /** - * Decodes a DataAttribute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttribute; - - /** - * Verifies a DataAttribute message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataAttribute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataAttribute - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttribute; - - /** - * Creates a plain object from a DataAttribute message. Also converts values to other types if specified. - * @param message DataAttribute - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataAttribute to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataAttribute - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataAttributeBinding. */ - interface IDataAttributeBinding { - - /** DataAttributeBinding name */ - name?: (string|null); - - /** DataAttributeBinding uid */ - uid?: (string|null); - - /** DataAttributeBinding createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataAttributeBinding updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataAttributeBinding description */ - description?: (string|null); - - /** DataAttributeBinding displayName */ - displayName?: (string|null); - - /** DataAttributeBinding labels */ - labels?: ({ [k: string]: string }|null); - - /** DataAttributeBinding etag */ - etag?: (string|null); - - /** DataAttributeBinding resource */ - resource?: (string|null); - - /** DataAttributeBinding attributes */ - attributes?: (string[]|null); - - /** DataAttributeBinding paths */ - paths?: (google.cloud.dataplex.v1.DataAttributeBinding.IPath[]|null); - } - - /** Represents a DataAttributeBinding. */ - class DataAttributeBinding implements IDataAttributeBinding { - - /** - * Constructs a new DataAttributeBinding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataAttributeBinding); - - /** DataAttributeBinding name. */ - public name: string; - - /** DataAttributeBinding uid. */ - public uid: string; - - /** DataAttributeBinding createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataAttributeBinding updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataAttributeBinding description. */ - public description: string; - - /** DataAttributeBinding displayName. */ - public displayName: string; - - /** DataAttributeBinding labels. */ - public labels: { [k: string]: string }; - - /** DataAttributeBinding etag. */ - public etag: string; - - /** DataAttributeBinding resource. */ - public resource?: (string|null); - - /** DataAttributeBinding attributes. */ - public attributes: string[]; - - /** DataAttributeBinding paths. */ - public paths: google.cloud.dataplex.v1.DataAttributeBinding.IPath[]; - - /** DataAttributeBinding resourceReference. */ - public resourceReference?: "resource"; - - /** - * Creates a new DataAttributeBinding instance using the specified properties. - * @param [properties] Properties to set - * @returns DataAttributeBinding instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataAttributeBinding): google.cloud.dataplex.v1.DataAttributeBinding; - - /** - * Encodes the specified DataAttributeBinding message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. - * @param message DataAttributeBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataAttributeBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataAttributeBinding message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. - * @param message DataAttributeBinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAttributeBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataAttributeBinding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataAttributeBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttributeBinding; - - /** - * Decodes a DataAttributeBinding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataAttributeBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttributeBinding; - - /** - * Verifies a DataAttributeBinding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataAttributeBinding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataAttributeBinding - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttributeBinding; - - /** - * Creates a plain object from a DataAttributeBinding message. Also converts values to other types if specified. - * @param message DataAttributeBinding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataAttributeBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataAttributeBinding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataAttributeBinding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataAttributeBinding { - - /** Properties of a Path. */ - interface IPath { - - /** Path name */ - name?: (string|null); - - /** Path attributes */ - attributes?: (string[]|null); - } - - /** Represents a Path. */ - class Path implements IPath { - - /** - * Constructs a new Path. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataAttributeBinding.IPath); - - /** Path name. */ - public name: string; - - /** Path attributes. */ - public attributes: string[]; - - /** - * Creates a new Path instance using the specified properties. - * @param [properties] Properties to set - * @returns Path instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataAttributeBinding.IPath): google.cloud.dataplex.v1.DataAttributeBinding.Path; - - /** - * Encodes the specified Path message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. - * @param message Path message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataAttributeBinding.IPath, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Path message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. - * @param message Path message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataAttributeBinding.IPath, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Path message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Path - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAttributeBinding.Path; - - /** - * Decodes a Path message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Path - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAttributeBinding.Path; - - /** - * Verifies a Path message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Path message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Path - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAttributeBinding.Path; - - /** - * Creates a plain object from a Path message. Also converts values to other types if specified. - * @param message Path - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataAttributeBinding.Path, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Path to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Path - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateDataTaxonomyRequest. */ - interface ICreateDataTaxonomyRequest { - - /** CreateDataTaxonomyRequest parent */ - parent?: (string|null); - - /** CreateDataTaxonomyRequest dataTaxonomyId */ - dataTaxonomyId?: (string|null); - - /** CreateDataTaxonomyRequest dataTaxonomy */ - dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); - - /** CreateDataTaxonomyRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateDataTaxonomyRequest. */ - class CreateDataTaxonomyRequest implements ICreateDataTaxonomyRequest { - - /** - * Constructs a new CreateDataTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest); - - /** CreateDataTaxonomyRequest parent. */ - public parent: string; - - /** CreateDataTaxonomyRequest dataTaxonomyId. */ - public dataTaxonomyId: string; - - /** CreateDataTaxonomyRequest dataTaxonomy. */ - public dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); - - /** CreateDataTaxonomyRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateDataTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDataTaxonomyRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; - - /** - * Encodes the specified CreateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. - * @param message CreateDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. - * @param message CreateDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; - - /** - * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; - - /** - * Verifies a CreateDataTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDataTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataTaxonomyRequest; - - /** - * Creates a plain object from a CreateDataTaxonomyRequest message. Also converts values to other types if specified. - * @param message CreateDataTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateDataTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateDataTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataTaxonomyRequest. */ - interface IUpdateDataTaxonomyRequest { - - /** UpdateDataTaxonomyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataTaxonomyRequest dataTaxonomy */ - dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); - - /** UpdateDataTaxonomyRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateDataTaxonomyRequest. */ - class UpdateDataTaxonomyRequest implements IUpdateDataTaxonomyRequest { - - /** - * Constructs a new UpdateDataTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest); - - /** UpdateDataTaxonomyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataTaxonomyRequest dataTaxonomy. */ - public dataTaxonomy?: (google.cloud.dataplex.v1.IDataTaxonomy|null); - - /** UpdateDataTaxonomyRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateDataTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataTaxonomyRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; - - /** - * Encodes the specified UpdateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. - * @param message UpdateDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. - * @param message UpdateDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; - - /** - * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; - - /** - * Verifies an UpdateDataTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; - - /** - * Creates a plain object from an UpdateDataTaxonomyRequest message. Also converts values to other types if specified. - * @param message UpdateDataTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataTaxonomyRequest. */ - interface IGetDataTaxonomyRequest { - - /** GetDataTaxonomyRequest name */ - name?: (string|null); - } - - /** Represents a GetDataTaxonomyRequest. */ - class GetDataTaxonomyRequest implements IGetDataTaxonomyRequest { - - /** - * Constructs a new GetDataTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetDataTaxonomyRequest); - - /** GetDataTaxonomyRequest name. */ - public name: string; - - /** - * Creates a new GetDataTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataTaxonomyRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetDataTaxonomyRequest): google.cloud.dataplex.v1.GetDataTaxonomyRequest; - - /** - * Encodes the specified GetDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. - * @param message GetDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. - * @param message GetDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataTaxonomyRequest; - - /** - * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataTaxonomyRequest; - - /** - * Verifies a GetDataTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataTaxonomyRequest; - - /** - * Creates a plain object from a GetDataTaxonomyRequest message. Also converts values to other types if specified. - * @param message GetDataTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataTaxonomiesRequest. */ - interface IListDataTaxonomiesRequest { - - /** ListDataTaxonomiesRequest parent */ - parent?: (string|null); - - /** ListDataTaxonomiesRequest pageSize */ - pageSize?: (number|null); - - /** ListDataTaxonomiesRequest pageToken */ - pageToken?: (string|null); - - /** ListDataTaxonomiesRequest filter */ - filter?: (string|null); - - /** ListDataTaxonomiesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataTaxonomiesRequest. */ - class ListDataTaxonomiesRequest implements IListDataTaxonomiesRequest { - - /** - * Constructs a new ListDataTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesRequest); - - /** ListDataTaxonomiesRequest parent. */ - public parent: string; - - /** ListDataTaxonomiesRequest pageSize. */ - public pageSize: number; - - /** ListDataTaxonomiesRequest pageToken. */ - public pageToken: string; - - /** ListDataTaxonomiesRequest filter. */ - public filter: string; - - /** ListDataTaxonomiesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesRequest): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; - - /** - * Encodes the specified ListDataTaxonomiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. - * @param message ListDataTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. - * @param message ListDataTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; - - /** - * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; - - /** - * Verifies a ListDataTaxonomiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataTaxonomiesRequest; - - /** - * Creates a plain object from a ListDataTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ListDataTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataTaxonomiesResponse. */ - interface IListDataTaxonomiesResponse { - - /** ListDataTaxonomiesResponse dataTaxonomies */ - dataTaxonomies?: (google.cloud.dataplex.v1.IDataTaxonomy[]|null); - - /** ListDataTaxonomiesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataTaxonomiesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListDataTaxonomiesResponse. */ - class ListDataTaxonomiesResponse implements IListDataTaxonomiesResponse { - - /** - * Constructs a new ListDataTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesResponse); - - /** ListDataTaxonomiesResponse dataTaxonomies. */ - public dataTaxonomies: google.cloud.dataplex.v1.IDataTaxonomy[]; - - /** ListDataTaxonomiesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataTaxonomiesResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListDataTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataTaxonomiesResponse): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; - - /** - * Encodes the specified ListDataTaxonomiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. - * @param message ListDataTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. - * @param message ListDataTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; - - /** - * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; - - /** - * Verifies a ListDataTaxonomiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataTaxonomiesResponse; - - /** - * Creates a plain object from a ListDataTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ListDataTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteDataTaxonomyRequest. */ - interface IDeleteDataTaxonomyRequest { - - /** DeleteDataTaxonomyRequest name */ - name?: (string|null); - - /** DeleteDataTaxonomyRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteDataTaxonomyRequest. */ - class DeleteDataTaxonomyRequest implements IDeleteDataTaxonomyRequest { - - /** - * Constructs a new DeleteDataTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest); - - /** DeleteDataTaxonomyRequest name. */ - public name: string; - - /** DeleteDataTaxonomyRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteDataTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDataTaxonomyRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; - - /** - * Encodes the specified DeleteDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. - * @param message DeleteDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. - * @param message DeleteDataTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; - - /** - * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; - - /** - * Verifies a DeleteDataTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDataTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; - - /** - * Creates a plain object from a DeleteDataTaxonomyRequest message. Also converts values to other types if specified. - * @param message DeleteDataTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteDataTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteDataTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateDataAttributeRequest. */ - interface ICreateDataAttributeRequest { - - /** CreateDataAttributeRequest parent */ - parent?: (string|null); - - /** CreateDataAttributeRequest dataAttributeId */ - dataAttributeId?: (string|null); - - /** CreateDataAttributeRequest dataAttribute */ - dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); - - /** CreateDataAttributeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateDataAttributeRequest. */ - class CreateDataAttributeRequest implements ICreateDataAttributeRequest { - - /** - * Constructs a new CreateDataAttributeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateDataAttributeRequest); - - /** CreateDataAttributeRequest parent. */ - public parent: string; - - /** CreateDataAttributeRequest dataAttributeId. */ - public dataAttributeId: string; - - /** CreateDataAttributeRequest dataAttribute. */ - public dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); - - /** CreateDataAttributeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateDataAttributeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDataAttributeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateDataAttributeRequest): google.cloud.dataplex.v1.CreateDataAttributeRequest; - - /** - * Encodes the specified CreateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. - * @param message CreateDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. - * @param message CreateDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateDataAttributeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataAttributeRequest; - - /** - * Decodes a CreateDataAttributeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataAttributeRequest; - - /** - * Verifies a CreateDataAttributeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDataAttributeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataAttributeRequest; - - /** - * Creates a plain object from a CreateDataAttributeRequest message. Also converts values to other types if specified. - * @param message CreateDataAttributeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateDataAttributeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateDataAttributeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataAttributeRequest. */ - interface IUpdateDataAttributeRequest { - - /** UpdateDataAttributeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataAttributeRequest dataAttribute */ - dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); - - /** UpdateDataAttributeRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateDataAttributeRequest. */ - class UpdateDataAttributeRequest implements IUpdateDataAttributeRequest { - - /** - * Constructs a new UpdateDataAttributeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeRequest); - - /** UpdateDataAttributeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataAttributeRequest dataAttribute. */ - public dataAttribute?: (google.cloud.dataplex.v1.IDataAttribute|null); - - /** UpdateDataAttributeRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateDataAttributeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataAttributeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeRequest): google.cloud.dataplex.v1.UpdateDataAttributeRequest; - - /** - * Encodes the specified UpdateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. - * @param message UpdateDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. - * @param message UpdateDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataAttributeRequest; - - /** - * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataAttributeRequest; - - /** - * Verifies an UpdateDataAttributeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataAttributeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataAttributeRequest; - - /** - * Creates a plain object from an UpdateDataAttributeRequest message. Also converts values to other types if specified. - * @param message UpdateDataAttributeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataAttributeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataAttributeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataAttributeRequest. */ - interface IGetDataAttributeRequest { - - /** GetDataAttributeRequest name */ - name?: (string|null); - } - - /** Represents a GetDataAttributeRequest. */ - class GetDataAttributeRequest implements IGetDataAttributeRequest { - - /** - * Constructs a new GetDataAttributeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetDataAttributeRequest); - - /** GetDataAttributeRequest name. */ - public name: string; - - /** - * Creates a new GetDataAttributeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataAttributeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetDataAttributeRequest): google.cloud.dataplex.v1.GetDataAttributeRequest; - - /** - * Encodes the specified GetDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. - * @param message GetDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. - * @param message GetDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataAttributeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataAttributeRequest; - - /** - * Decodes a GetDataAttributeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataAttributeRequest; - - /** - * Verifies a GetDataAttributeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataAttributeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataAttributeRequest; - - /** - * Creates a plain object from a GetDataAttributeRequest message. Also converts values to other types if specified. - * @param message GetDataAttributeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataAttributeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataAttributeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataAttributesRequest. */ - interface IListDataAttributesRequest { - - /** ListDataAttributesRequest parent */ - parent?: (string|null); - - /** ListDataAttributesRequest pageSize */ - pageSize?: (number|null); - - /** ListDataAttributesRequest pageToken */ - pageToken?: (string|null); - - /** ListDataAttributesRequest filter */ - filter?: (string|null); - - /** ListDataAttributesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataAttributesRequest. */ - class ListDataAttributesRequest implements IListDataAttributesRequest { - - /** - * Constructs a new ListDataAttributesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataAttributesRequest); - - /** ListDataAttributesRequest parent. */ - public parent: string; - - /** ListDataAttributesRequest pageSize. */ - public pageSize: number; - - /** ListDataAttributesRequest pageToken. */ - public pageToken: string; - - /** ListDataAttributesRequest filter. */ - public filter: string; - - /** ListDataAttributesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataAttributesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataAttributesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataAttributesRequest): google.cloud.dataplex.v1.ListDataAttributesRequest; - - /** - * Encodes the specified ListDataAttributesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. - * @param message ListDataAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataAttributesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. - * @param message ListDataAttributesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataAttributesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributesRequest; - - /** - * Decodes a ListDataAttributesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributesRequest; - - /** - * Verifies a ListDataAttributesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataAttributesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributesRequest; - - /** - * Creates a plain object from a ListDataAttributesRequest message. Also converts values to other types if specified. - * @param message ListDataAttributesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataAttributesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataAttributesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataAttributesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataAttributesResponse. */ - interface IListDataAttributesResponse { - - /** ListDataAttributesResponse dataAttributes */ - dataAttributes?: (google.cloud.dataplex.v1.IDataAttribute[]|null); - - /** ListDataAttributesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataAttributesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListDataAttributesResponse. */ - class ListDataAttributesResponse implements IListDataAttributesResponse { - - /** - * Constructs a new ListDataAttributesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataAttributesResponse); - - /** ListDataAttributesResponse dataAttributes. */ - public dataAttributes: google.cloud.dataplex.v1.IDataAttribute[]; - - /** ListDataAttributesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataAttributesResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListDataAttributesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataAttributesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataAttributesResponse): google.cloud.dataplex.v1.ListDataAttributesResponse; - - /** - * Encodes the specified ListDataAttributesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. - * @param message ListDataAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataAttributesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. - * @param message ListDataAttributesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataAttributesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributesResponse; - - /** - * Decodes a ListDataAttributesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributesResponse; - - /** - * Verifies a ListDataAttributesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataAttributesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributesResponse; - - /** - * Creates a plain object from a ListDataAttributesResponse message. Also converts values to other types if specified. - * @param message ListDataAttributesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataAttributesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataAttributesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataAttributesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteDataAttributeRequest. */ - interface IDeleteDataAttributeRequest { - - /** DeleteDataAttributeRequest name */ - name?: (string|null); - - /** DeleteDataAttributeRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteDataAttributeRequest. */ - class DeleteDataAttributeRequest implements IDeleteDataAttributeRequest { - - /** - * Constructs a new DeleteDataAttributeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeRequest); - - /** DeleteDataAttributeRequest name. */ - public name: string; - - /** DeleteDataAttributeRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteDataAttributeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDataAttributeRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeRequest): google.cloud.dataplex.v1.DeleteDataAttributeRequest; - - /** - * Encodes the specified DeleteDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. - * @param message DeleteDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. - * @param message DeleteDataAttributeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataAttributeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataAttributeRequest; - - /** - * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataAttributeRequest; - - /** - * Verifies a DeleteDataAttributeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDataAttributeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataAttributeRequest; - - /** - * Creates a plain object from a DeleteDataAttributeRequest message. Also converts values to other types if specified. - * @param message DeleteDataAttributeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteDataAttributeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteDataAttributeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteDataAttributeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateDataAttributeBindingRequest. */ - interface ICreateDataAttributeBindingRequest { - - /** CreateDataAttributeBindingRequest parent */ - parent?: (string|null); - - /** CreateDataAttributeBindingRequest dataAttributeBindingId */ - dataAttributeBindingId?: (string|null); - - /** CreateDataAttributeBindingRequest dataAttributeBinding */ - dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); - - /** CreateDataAttributeBindingRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateDataAttributeBindingRequest. */ - class CreateDataAttributeBindingRequest implements ICreateDataAttributeBindingRequest { - - /** - * Constructs a new CreateDataAttributeBindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest); - - /** CreateDataAttributeBindingRequest parent. */ - public parent: string; - - /** CreateDataAttributeBindingRequest dataAttributeBindingId. */ - public dataAttributeBindingId: string; - - /** CreateDataAttributeBindingRequest dataAttributeBinding. */ - public dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); - - /** CreateDataAttributeBindingRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateDataAttributeBindingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDataAttributeBindingRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; - - /** - * Encodes the specified CreateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. - * @param message CreateDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. - * @param message CreateDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; - - /** - * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; - - /** - * Verifies a CreateDataAttributeBindingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDataAttributeBindingRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; - - /** - * Creates a plain object from a CreateDataAttributeBindingRequest message. Also converts values to other types if specified. - * @param message CreateDataAttributeBindingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateDataAttributeBindingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateDataAttributeBindingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataAttributeBindingRequest. */ - interface IUpdateDataAttributeBindingRequest { - - /** UpdateDataAttributeBindingRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataAttributeBindingRequest dataAttributeBinding */ - dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); - - /** UpdateDataAttributeBindingRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateDataAttributeBindingRequest. */ - class UpdateDataAttributeBindingRequest implements IUpdateDataAttributeBindingRequest { - - /** - * Constructs a new UpdateDataAttributeBindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest); - - /** UpdateDataAttributeBindingRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataAttributeBindingRequest dataAttributeBinding. */ - public dataAttributeBinding?: (google.cloud.dataplex.v1.IDataAttributeBinding|null); - - /** UpdateDataAttributeBindingRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateDataAttributeBindingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataAttributeBindingRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; - - /** - * Encodes the specified UpdateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. - * @param message UpdateDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. - * @param message UpdateDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; - - /** - * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; - - /** - * Verifies an UpdateDataAttributeBindingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataAttributeBindingRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; - - /** - * Creates a plain object from an UpdateDataAttributeBindingRequest message. Also converts values to other types if specified. - * @param message UpdateDataAttributeBindingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataAttributeBindingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataAttributeBindingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataAttributeBindingRequest. */ - interface IGetDataAttributeBindingRequest { - - /** GetDataAttributeBindingRequest name */ - name?: (string|null); - } - - /** Represents a GetDataAttributeBindingRequest. */ - class GetDataAttributeBindingRequest implements IGetDataAttributeBindingRequest { - - /** - * Constructs a new GetDataAttributeBindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest); - - /** GetDataAttributeBindingRequest name. */ - public name: string; - - /** - * Creates a new GetDataAttributeBindingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataAttributeBindingRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; - - /** - * Encodes the specified GetDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. - * @param message GetDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. - * @param message GetDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; - - /** - * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; - - /** - * Verifies a GetDataAttributeBindingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataAttributeBindingRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataAttributeBindingRequest; - - /** - * Creates a plain object from a GetDataAttributeBindingRequest message. Also converts values to other types if specified. - * @param message GetDataAttributeBindingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataAttributeBindingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataAttributeBindingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataAttributeBindingsRequest. */ - interface IListDataAttributeBindingsRequest { - - /** ListDataAttributeBindingsRequest parent */ - parent?: (string|null); - - /** ListDataAttributeBindingsRequest pageSize */ - pageSize?: (number|null); - - /** ListDataAttributeBindingsRequest pageToken */ - pageToken?: (string|null); - - /** ListDataAttributeBindingsRequest filter */ - filter?: (string|null); - - /** ListDataAttributeBindingsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataAttributeBindingsRequest. */ - class ListDataAttributeBindingsRequest implements IListDataAttributeBindingsRequest { - - /** - * Constructs a new ListDataAttributeBindingsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest); - - /** ListDataAttributeBindingsRequest parent. */ - public parent: string; - - /** ListDataAttributeBindingsRequest pageSize. */ - public pageSize: number; - - /** ListDataAttributeBindingsRequest pageToken. */ - public pageToken: string; - - /** ListDataAttributeBindingsRequest filter. */ - public filter: string; - - /** ListDataAttributeBindingsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataAttributeBindingsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataAttributeBindingsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; - - /** - * Encodes the specified ListDataAttributeBindingsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. - * @param message ListDataAttributeBindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataAttributeBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. - * @param message ListDataAttributeBindingsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataAttributeBindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; - - /** - * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataAttributeBindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; - - /** - * Verifies a ListDataAttributeBindingsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataAttributeBindingsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataAttributeBindingsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; - - /** - * Creates a plain object from a ListDataAttributeBindingsRequest message. Also converts values to other types if specified. - * @param message ListDataAttributeBindingsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataAttributeBindingsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataAttributeBindingsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataAttributeBindingsResponse. */ - interface IListDataAttributeBindingsResponse { - - /** ListDataAttributeBindingsResponse dataAttributeBindings */ - dataAttributeBindings?: (google.cloud.dataplex.v1.IDataAttributeBinding[]|null); - - /** ListDataAttributeBindingsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataAttributeBindingsResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } - - /** Represents a ListDataAttributeBindingsResponse. */ - class ListDataAttributeBindingsResponse implements IListDataAttributeBindingsResponse { - - /** - * Constructs a new ListDataAttributeBindingsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse); - - /** ListDataAttributeBindingsResponse dataAttributeBindings. */ - public dataAttributeBindings: google.cloud.dataplex.v1.IDataAttributeBinding[]; - - /** ListDataAttributeBindingsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataAttributeBindingsResponse unreachableLocations. */ - public unreachableLocations: string[]; - - /** - * Creates a new ListDataAttributeBindingsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataAttributeBindingsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; - - /** - * Encodes the specified ListDataAttributeBindingsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. - * @param message ListDataAttributeBindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataAttributeBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. - * @param message ListDataAttributeBindingsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataAttributeBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataAttributeBindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; - - /** - * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataAttributeBindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; - - /** - * Verifies a ListDataAttributeBindingsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataAttributeBindingsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataAttributeBindingsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; - - /** - * Creates a plain object from a ListDataAttributeBindingsResponse message. Also converts values to other types if specified. - * @param message ListDataAttributeBindingsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataAttributeBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataAttributeBindingsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataAttributeBindingsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteDataAttributeBindingRequest. */ - interface IDeleteDataAttributeBindingRequest { - - /** DeleteDataAttributeBindingRequest name */ - name?: (string|null); - - /** DeleteDataAttributeBindingRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteDataAttributeBindingRequest. */ - class DeleteDataAttributeBindingRequest implements IDeleteDataAttributeBindingRequest { - - /** - * Constructs a new DeleteDataAttributeBindingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest); - - /** DeleteDataAttributeBindingRequest name. */ - public name: string; - - /** DeleteDataAttributeBindingRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteDataAttributeBindingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDataAttributeBindingRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; - - /** - * Encodes the specified DeleteDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. - * @param message DeleteDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. - * @param message DeleteDataAttributeBindingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; - - /** - * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; - - /** - * Verifies a DeleteDataAttributeBindingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDataAttributeBindingRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; - - /** - * Creates a plain object from a DeleteDataAttributeBindingRequest message. Also converts values to other types if specified. - * @param message DeleteDataAttributeBindingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteDataAttributeBindingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteDataAttributeBindingRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceAccessSpec. */ - interface IResourceAccessSpec { - - /** ResourceAccessSpec readers */ - readers?: (string[]|null); - - /** ResourceAccessSpec writers */ - writers?: (string[]|null); - - /** ResourceAccessSpec owners */ - owners?: (string[]|null); - } - - /** Represents a ResourceAccessSpec. */ - class ResourceAccessSpec implements IResourceAccessSpec { - - /** - * Constructs a new ResourceAccessSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IResourceAccessSpec); - - /** ResourceAccessSpec readers. */ - public readers: string[]; - - /** ResourceAccessSpec writers. */ - public writers: string[]; - - /** ResourceAccessSpec owners. */ - public owners: string[]; - - /** - * Creates a new ResourceAccessSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceAccessSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.IResourceAccessSpec): google.cloud.dataplex.v1.ResourceAccessSpec; - - /** - * Encodes the specified ResourceAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. - * @param message ResourceAccessSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IResourceAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. - * @param message ResourceAccessSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IResourceAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceAccessSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ResourceAccessSpec; - - /** - * Decodes a ResourceAccessSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ResourceAccessSpec; - - /** - * Verifies a ResourceAccessSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceAccessSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceAccessSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ResourceAccessSpec; - - /** - * Creates a plain object from a ResourceAccessSpec message. Also converts values to other types if specified. - * @param message ResourceAccessSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ResourceAccessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceAccessSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceAccessSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataAccessSpec. */ - interface IDataAccessSpec { - - /** DataAccessSpec readers */ - readers?: (string[]|null); - } - - /** Represents a DataAccessSpec. */ - class DataAccessSpec implements IDataAccessSpec { - - /** - * Constructs a new DataAccessSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataAccessSpec); - - /** DataAccessSpec readers. */ - public readers: string[]; - - /** - * Creates a new DataAccessSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataAccessSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataAccessSpec): google.cloud.dataplex.v1.DataAccessSpec; - - /** - * Encodes the specified DataAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. - * @param message DataAccessSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. - * @param message DataAccessSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataAccessSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataAccessSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataAccessSpec; - - /** - * Decodes a DataAccessSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataAccessSpec; - - /** - * Verifies a DataAccessSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataAccessSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataAccessSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataAccessSpec; - - /** - * Creates a plain object from a DataAccessSpec message. Also converts values to other types if specified. - * @param message DataAccessSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataAccessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataAccessSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataAccessSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a DataScanService */ - class DataScanService extends $protobuf.rpc.Service { - - /** - * Constructs a new DataScanService 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 DataScanService 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): DataScanService; - - /** - * Calls CreateDataScan. - * @param request CreateDataScanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback): void; - - /** - * Calls CreateDataScan. - * @param request CreateDataScanRequest message or plain object - * @returns Promise - */ - public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest): Promise; - - /** - * Calls UpdateDataScan. - * @param request UpdateDataScanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback): void; - - /** - * Calls UpdateDataScan. - * @param request UpdateDataScanRequest message or plain object - * @returns Promise - */ - public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest): Promise; - - /** - * Calls DeleteDataScan. - * @param request DeleteDataScanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback): void; - - /** - * Calls DeleteDataScan. - * @param request DeleteDataScanRequest message or plain object - * @returns Promise - */ - public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest): Promise; - - /** - * Calls GetDataScan. - * @param request GetDataScanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataScan - */ - public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanCallback): void; - - /** - * Calls GetDataScan. - * @param request GetDataScanRequest message or plain object - * @returns Promise - */ - public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest): Promise; - - /** - * Calls ListDataScans. - * @param request ListDataScansRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataScansResponse - */ - public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScansCallback): void; - - /** - * Calls ListDataScans. - * @param request ListDataScansRequest message or plain object - * @returns Promise - */ - public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest): Promise; - - /** - * Calls RunDataScan. - * @param request RunDataScanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunDataScanResponse - */ - public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.RunDataScanCallback): void; - - /** - * Calls RunDataScan. - * @param request RunDataScanRequest message or plain object - * @returns Promise - */ - public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest): Promise; - - /** - * Calls GetDataScanJob. - * @param request GetDataScanJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataScanJob - */ - public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback): void; - - /** - * Calls GetDataScanJob. - * @param request GetDataScanJobRequest message or plain object - * @returns Promise - */ - public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest): Promise; - - /** - * Calls ListDataScanJobs. - * @param request ListDataScanJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataScanJobsResponse - */ - public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback): void; - - /** - * Calls ListDataScanJobs. - * @param request ListDataScanJobsRequest message or plain object - * @returns Promise - */ - public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest): Promise; - - /** - * Calls GenerateDataQualityRules. - * @param request GenerateDataQualityRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GenerateDataQualityRulesResponse - */ - public generateDataQualityRules(request: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, callback: google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRulesCallback): void; - - /** - * Calls GenerateDataQualityRules. - * @param request GenerateDataQualityRulesRequest message or plain object - * @returns Promise - */ - public generateDataQualityRules(request: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest): Promise; - } - - namespace DataScanService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. - * @param error Error, if any - * @param [response] DataScan - */ - type GetDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScan) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. - * @param error Error, if any - * @param [response] ListDataScansResponse - */ - type ListDataScansCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScansResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. - * @param error Error, if any - * @param [response] RunDataScanResponse - */ - type RunDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunDataScanResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. - * @param error Error, if any - * @param [response] DataScanJob - */ - type GetDataScanJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScanJob) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. - * @param error Error, if any - * @param [response] ListDataScanJobsResponse - */ - type ListDataScanJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScanJobsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|generateDataQualityRules}. - * @param error Error, if any - * @param [response] GenerateDataQualityRulesResponse - */ - type GenerateDataQualityRulesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.GenerateDataQualityRulesResponse) => void; - } - - /** Properties of a CreateDataScanRequest. */ - interface ICreateDataScanRequest { - - /** CreateDataScanRequest parent */ - parent?: (string|null); - - /** CreateDataScanRequest dataScan */ - dataScan?: (google.cloud.dataplex.v1.IDataScan|null); - - /** CreateDataScanRequest dataScanId */ - dataScanId?: (string|null); - - /** CreateDataScanRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateDataScanRequest. */ - class CreateDataScanRequest implements ICreateDataScanRequest { - - /** - * Constructs a new CreateDataScanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest); - - /** CreateDataScanRequest parent. */ - public parent: string; - - /** CreateDataScanRequest dataScan. */ - public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); - - /** CreateDataScanRequest dataScanId. */ - public dataScanId: string; - - /** CreateDataScanRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateDataScanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDataScanRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest): google.cloud.dataplex.v1.CreateDataScanRequest; - - /** - * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. - * @param message CreateDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. - * @param message CreateDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateDataScanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateDataScanRequest; - - /** - * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateDataScanRequest; - - /** - * Verifies a CreateDataScanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateDataScanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataScanRequest; - - /** - * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. - * @param message CreateDataScanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateDataScanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateDataScanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataScanRequest. */ - interface IUpdateDataScanRequest { - - /** UpdateDataScanRequest dataScan */ - dataScan?: (google.cloud.dataplex.v1.IDataScan|null); - - /** UpdateDataScanRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataScanRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateDataScanRequest. */ - class UpdateDataScanRequest implements IUpdateDataScanRequest { - - /** - * Constructs a new UpdateDataScanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest); - - /** UpdateDataScanRequest dataScan. */ - public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); - - /** UpdateDataScanRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataScanRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateDataScanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataScanRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest): google.cloud.dataplex.v1.UpdateDataScanRequest; - - /** - * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. - * @param message UpdateDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. - * @param message UpdateDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataScanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateDataScanRequest; - - /** - * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateDataScanRequest; - - /** - * Verifies an UpdateDataScanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataScanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataScanRequest; - - /** - * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. - * @param message UpdateDataScanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataScanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataScanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteDataScanRequest. */ - interface IDeleteDataScanRequest { - - /** DeleteDataScanRequest name */ - name?: (string|null); - } - - /** Represents a DeleteDataScanRequest. */ - class DeleteDataScanRequest implements IDeleteDataScanRequest { - - /** - * Constructs a new DeleteDataScanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest); - - /** DeleteDataScanRequest name. */ - public name: string; - - /** - * Creates a new DeleteDataScanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteDataScanRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest): google.cloud.dataplex.v1.DeleteDataScanRequest; - - /** - * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. - * @param message DeleteDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. - * @param message DeleteDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteDataScanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteDataScanRequest; - - /** - * Decodes a DeleteDataScanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteDataScanRequest; - - /** - * Verifies a DeleteDataScanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteDataScanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataScanRequest; - - /** - * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. - * @param message DeleteDataScanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteDataScanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteDataScanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataScanRequest. */ - interface IGetDataScanRequest { - - /** GetDataScanRequest name */ - name?: (string|null); - - /** GetDataScanRequest view */ - view?: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null); - } - - /** Represents a GetDataScanRequest. */ - class GetDataScanRequest implements IGetDataScanRequest { - - /** - * Constructs a new GetDataScanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetDataScanRequest); - - /** GetDataScanRequest name. */ - public name: string; - - /** GetDataScanRequest view. */ - public view: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView); - - /** - * Creates a new GetDataScanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataScanRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetDataScanRequest): google.cloud.dataplex.v1.GetDataScanRequest; - - /** - * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. - * @param message GetDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. - * @param message GetDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataScanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataScanRequest; - - /** - * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataScanRequest; - - /** - * Verifies a GetDataScanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataScanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanRequest; - - /** - * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. - * @param message GetDataScanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataScanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataScanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetDataScanRequest { - - /** DataScanView enum. */ - enum DataScanView { - DATA_SCAN_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 10 - } - } - - /** Properties of a ListDataScansRequest. */ - interface IListDataScansRequest { - - /** ListDataScansRequest parent */ - parent?: (string|null); - - /** ListDataScansRequest pageSize */ - pageSize?: (number|null); - - /** ListDataScansRequest pageToken */ - pageToken?: (string|null); - - /** ListDataScansRequest filter */ - filter?: (string|null); - - /** ListDataScansRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataScansRequest. */ - class ListDataScansRequest implements IListDataScansRequest { - - /** - * Constructs a new ListDataScansRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataScansRequest); - - /** ListDataScansRequest parent. */ - public parent: string; - - /** ListDataScansRequest pageSize. */ - public pageSize: number; - - /** ListDataScansRequest pageToken. */ - public pageToken: string; - - /** ListDataScansRequest filter. */ - public filter: string; - - /** ListDataScansRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataScansRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataScansRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataScansRequest): google.cloud.dataplex.v1.ListDataScansRequest; - - /** - * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. - * @param message ListDataScansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. - * @param message ListDataScansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataScansRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataScansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScansRequest; - - /** - * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataScansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScansRequest; - - /** - * Verifies a ListDataScansRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataScansRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataScansRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansRequest; - - /** - * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. - * @param message ListDataScansRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataScansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataScansRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataScansRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataScansResponse. */ - interface IListDataScansResponse { - - /** ListDataScansResponse dataScans */ - dataScans?: (google.cloud.dataplex.v1.IDataScan[]|null); - - /** ListDataScansResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataScansResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListDataScansResponse. */ - class ListDataScansResponse implements IListDataScansResponse { - - /** - * Constructs a new ListDataScansResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataScansResponse); - - /** ListDataScansResponse dataScans. */ - public dataScans: google.cloud.dataplex.v1.IDataScan[]; - - /** ListDataScansResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataScansResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListDataScansResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataScansResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataScansResponse): google.cloud.dataplex.v1.ListDataScansResponse; - - /** - * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. - * @param message ListDataScansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. - * @param message ListDataScansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataScansResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataScansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScansResponse; - - /** - * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataScansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScansResponse; - - /** - * Verifies a ListDataScansResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataScansResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataScansResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansResponse; - - /** - * Creates a plain object from a ListDataScansResponse message. Also converts values to other types if specified. - * @param message ListDataScansResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataScansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataScansResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataScansResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunDataScanRequest. */ - interface IRunDataScanRequest { - - /** RunDataScanRequest name */ - name?: (string|null); - } - - /** Represents a RunDataScanRequest. */ - class RunDataScanRequest implements IRunDataScanRequest { - - /** - * Constructs a new RunDataScanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IRunDataScanRequest); - - /** RunDataScanRequest name. */ - public name: string; - - /** - * Creates a new RunDataScanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunDataScanRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IRunDataScanRequest): google.cloud.dataplex.v1.RunDataScanRequest; - - /** - * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. - * @param message RunDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. - * @param message RunDataScanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunDataScanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunDataScanRequest; - - /** - * Decodes a RunDataScanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunDataScanRequest; - - /** - * Verifies a RunDataScanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunDataScanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanRequest; - - /** - * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. - * @param message RunDataScanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.RunDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunDataScanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunDataScanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RunDataScanResponse. */ - interface IRunDataScanResponse { - - /** RunDataScanResponse job */ - job?: (google.cloud.dataplex.v1.IDataScanJob|null); - } - - /** Represents a RunDataScanResponse. */ - class RunDataScanResponse implements IRunDataScanResponse { - - /** - * Constructs a new RunDataScanResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IRunDataScanResponse); - - /** RunDataScanResponse job. */ - public job?: (google.cloud.dataplex.v1.IDataScanJob|null); - - /** - * Creates a new RunDataScanResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunDataScanResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IRunDataScanResponse): google.cloud.dataplex.v1.RunDataScanResponse; - - /** - * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. - * @param message RunDataScanResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. - * @param message RunDataScanResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunDataScanResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunDataScanResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunDataScanResponse; - - /** - * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunDataScanResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunDataScanResponse; - - /** - * Verifies a RunDataScanResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunDataScanResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunDataScanResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanResponse; - - /** - * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. - * @param message RunDataScanResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.RunDataScanResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunDataScanResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RunDataScanResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataScanJobRequest. */ - interface IGetDataScanJobRequest { - - /** GetDataScanJobRequest name */ - name?: (string|null); - - /** GetDataScanJobRequest view */ - view?: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null); - } - - /** Represents a GetDataScanJobRequest. */ - class GetDataScanJobRequest implements IGetDataScanJobRequest { - - /** - * Constructs a new GetDataScanJobRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest); - - /** GetDataScanJobRequest name. */ - public name: string; - - /** GetDataScanJobRequest view. */ - public view: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView); - - /** - * Creates a new GetDataScanJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataScanJobRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest): google.cloud.dataplex.v1.GetDataScanJobRequest; - - /** - * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. - * @param message GetDataScanJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. - * @param message GetDataScanJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataScanJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataScanJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetDataScanJobRequest; - - /** - * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataScanJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetDataScanJobRequest; - - /** - * Verifies a GetDataScanJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataScanJobRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanJobRequest; - - /** - * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. - * @param message GetDataScanJobRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetDataScanJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataScanJobRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataScanJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetDataScanJobRequest { - - /** DataScanJobView enum. */ - enum DataScanJobView { - DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 10 - } - } - - /** Properties of a ListDataScanJobsRequest. */ - interface IListDataScanJobsRequest { - - /** ListDataScanJobsRequest parent */ - parent?: (string|null); - - /** ListDataScanJobsRequest pageSize */ - pageSize?: (number|null); - - /** ListDataScanJobsRequest pageToken */ - pageToken?: (string|null); - - /** ListDataScanJobsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListDataScanJobsRequest. */ - class ListDataScanJobsRequest implements IListDataScanJobsRequest { - - /** - * Constructs a new ListDataScanJobsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest); - - /** ListDataScanJobsRequest parent. */ - public parent: string; - - /** ListDataScanJobsRequest pageSize. */ - public pageSize: number; - - /** ListDataScanJobsRequest pageToken. */ - public pageToken: string; - - /** ListDataScanJobsRequest filter. */ - public filter: string; - - /** - * Creates a new ListDataScanJobsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataScanJobsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest): google.cloud.dataplex.v1.ListDataScanJobsRequest; - - /** - * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. - * @param message ListDataScanJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. - * @param message ListDataScanJobsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataScanJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScanJobsRequest; - - /** - * Decodes a ListDataScanJobsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataScanJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScanJobsRequest; - - /** - * Verifies a ListDataScanJobsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataScanJobsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsRequest; - - /** - * Creates a plain object from a ListDataScanJobsRequest message. Also converts values to other types if specified. - * @param message ListDataScanJobsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataScanJobsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataScanJobsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataScanJobsResponse. */ - interface IListDataScanJobsResponse { - - /** ListDataScanJobsResponse dataScanJobs */ - dataScanJobs?: (google.cloud.dataplex.v1.IDataScanJob[]|null); - - /** ListDataScanJobsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDataScanJobsResponse. */ - class ListDataScanJobsResponse implements IListDataScanJobsResponse { - - /** - * Constructs a new ListDataScanJobsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse); - - /** ListDataScanJobsResponse dataScanJobs. */ - public dataScanJobs: google.cloud.dataplex.v1.IDataScanJob[]; - - /** ListDataScanJobsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListDataScanJobsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataScanJobsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse): google.cloud.dataplex.v1.ListDataScanJobsResponse; - - /** - * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. - * @param message ListDataScanJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. - * @param message ListDataScanJobsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataScanJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListDataScanJobsResponse; - - /** - * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataScanJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListDataScanJobsResponse; - - /** - * Verifies a ListDataScanJobsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataScanJobsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsResponse; - - /** - * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. - * @param message ListDataScanJobsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataScanJobsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataScanJobsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GenerateDataQualityRulesRequest. */ - interface IGenerateDataQualityRulesRequest { - - /** GenerateDataQualityRulesRequest name */ - name?: (string|null); - } - - /** Represents a GenerateDataQualityRulesRequest. */ - class GenerateDataQualityRulesRequest implements IGenerateDataQualityRulesRequest { - - /** - * Constructs a new GenerateDataQualityRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest); - - /** GenerateDataQualityRulesRequest name. */ - public name: string; - - /** - * Creates a new GenerateDataQualityRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GenerateDataQualityRulesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; - - /** - * Encodes the specified GenerateDataQualityRulesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. - * @param message GenerateDataQualityRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenerateDataQualityRulesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. - * @param message GenerateDataQualityRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenerateDataQualityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; - - /** - * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenerateDataQualityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; - - /** - * Verifies a GenerateDataQualityRulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenerateDataQualityRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenerateDataQualityRulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GenerateDataQualityRulesRequest; - - /** - * Creates a plain object from a GenerateDataQualityRulesRequest message. Also converts values to other types if specified. - * @param message GenerateDataQualityRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GenerateDataQualityRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenerateDataQualityRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenerateDataQualityRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GenerateDataQualityRulesResponse. */ - interface IGenerateDataQualityRulesResponse { - - /** GenerateDataQualityRulesResponse rule */ - rule?: (google.cloud.dataplex.v1.IDataQualityRule[]|null); - } - - /** Represents a GenerateDataQualityRulesResponse. */ - class GenerateDataQualityRulesResponse implements IGenerateDataQualityRulesResponse { - - /** - * Constructs a new GenerateDataQualityRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse); - - /** GenerateDataQualityRulesResponse rule. */ - public rule: google.cloud.dataplex.v1.IDataQualityRule[]; - - /** - * Creates a new GenerateDataQualityRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GenerateDataQualityRulesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; - - /** - * Encodes the specified GenerateDataQualityRulesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. - * @param message GenerateDataQualityRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenerateDataQualityRulesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. - * @param message GenerateDataQualityRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenerateDataQualityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; - - /** - * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenerateDataQualityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; - - /** - * Verifies a GenerateDataQualityRulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenerateDataQualityRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenerateDataQualityRulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GenerateDataQualityRulesResponse; - - /** - * Creates a plain object from a GenerateDataQualityRulesResponse message. Also converts values to other types if specified. - * @param message GenerateDataQualityRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GenerateDataQualityRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenerateDataQualityRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenerateDataQualityRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataScan. */ - interface IDataScan { - - /** DataScan name */ - name?: (string|null); - - /** DataScan uid */ - uid?: (string|null); - - /** DataScan description */ - description?: (string|null); - - /** DataScan displayName */ - displayName?: (string|null); - - /** DataScan labels */ - labels?: ({ [k: string]: string }|null); - - /** DataScan state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); - - /** DataScan createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataScan updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataScan data */ - data?: (google.cloud.dataplex.v1.IDataSource|null); - - /** DataScan executionSpec */ - executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); - - /** DataScan executionStatus */ - executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); - - /** DataScan type */ - type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); - - /** DataScan dataQualitySpec */ - dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); - - /** DataScan dataProfileSpec */ - dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); - - /** DataScan dataDiscoverySpec */ - dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); - - /** DataScan dataQualityResult */ - dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); - - /** DataScan dataProfileResult */ - dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); - - /** DataScan dataDiscoveryResult */ - dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); - } - - /** Represents a DataScan. */ - class DataScan implements IDataScan { - - /** - * Constructs a new DataScan. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataScan); - - /** DataScan name. */ - public name: string; - - /** DataScan uid. */ - public uid: string; - - /** DataScan description. */ - public description: string; - - /** DataScan displayName. */ - public displayName: string; - - /** DataScan labels. */ - public labels: { [k: string]: string }; - - /** DataScan state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); - - /** DataScan createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataScan updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataScan data. */ - public data?: (google.cloud.dataplex.v1.IDataSource|null); - - /** DataScan executionSpec. */ - public executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); - - /** DataScan executionStatus. */ - public executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); - - /** DataScan type. */ - public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); - - /** DataScan dataQualitySpec. */ - public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); - - /** DataScan dataProfileSpec. */ - public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); - - /** DataScan dataDiscoverySpec. */ - public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); - - /** DataScan dataQualityResult. */ - public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); - - /** DataScan dataProfileResult. */ - public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); - - /** DataScan dataDiscoveryResult. */ - public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); - - /** DataScan spec. */ - public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); - - /** DataScan result. */ - public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); - - /** - * Creates a new DataScan instance using the specified properties. - * @param [properties] Properties to set - * @returns DataScan instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataScan): google.cloud.dataplex.v1.DataScan; - - /** - * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. - * @param message DataScan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. - * @param message DataScan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataScan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataScan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan; - - /** - * Decodes a DataScan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataScan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan; - - /** - * Verifies a DataScan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataScan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataScan - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan; - - /** - * Creates a plain object from a DataScan message. Also converts values to other types if specified. - * @param message DataScan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScan, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataScan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataScan - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataScan { - - /** Properties of an ExecutionSpec. */ - interface IExecutionSpec { - - /** ExecutionSpec trigger */ - trigger?: (google.cloud.dataplex.v1.ITrigger|null); - - /** ExecutionSpec field */ - field?: (string|null); - } - - /** Represents an ExecutionSpec. */ - class ExecutionSpec implements IExecutionSpec { - - /** - * Constructs a new ExecutionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec); - - /** ExecutionSpec trigger. */ - public trigger?: (google.cloud.dataplex.v1.ITrigger|null); - - /** ExecutionSpec field. */ - public field?: (string|null); - - /** ExecutionSpec incremental. */ - public incremental?: "field"; - - /** - * Creates a new ExecutionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecutionSpec instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec): google.cloud.dataplex.v1.DataScan.ExecutionSpec; - - /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan.ExecutionSpec; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan.ExecutionSpec; - - /** - * Verifies an ExecutionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionSpec; - - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @param message ExecutionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecutionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecutionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecutionStatus. */ - interface IExecutionStatus { - - /** ExecutionStatus latestJobStartTime */ - latestJobStartTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJobEndTime */ - latestJobEndTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJobCreateTime */ - latestJobCreateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ExecutionStatus. */ - class ExecutionStatus implements IExecutionStatus { - - /** - * Constructs a new ExecutionStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus); - - /** ExecutionStatus latestJobStartTime. */ - public latestJobStartTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJobEndTime. */ - public latestJobEndTime?: (google.protobuf.ITimestamp|null); - - /** ExecutionStatus latestJobCreateTime. */ - public latestJobCreateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new ExecutionStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecutionStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus): google.cloud.dataplex.v1.DataScan.ExecutionStatus; - - /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScan.ExecutionStatus; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScan.ExecutionStatus; - - /** - * Verifies an ExecutionStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutionStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionStatus; - - /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @param message ExecutionStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecutionStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecutionStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataScanJob. */ - interface IDataScanJob { - - /** DataScanJob name */ - name?: (string|null); - - /** DataScanJob uid */ - uid?: (string|null); - - /** DataScanJob createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob state */ - state?: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State|null); - - /** DataScanJob message */ - message?: (string|null); - - /** DataScanJob type */ - type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); - - /** DataScanJob dataQualitySpec */ - dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); - - /** DataScanJob dataProfileSpec */ - dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); - - /** DataScanJob dataDiscoverySpec */ - dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); - - /** DataScanJob dataQualityResult */ - dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); - - /** DataScanJob dataProfileResult */ - dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); - - /** DataScanJob dataDiscoveryResult */ - dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); - } - - /** Represents a DataScanJob. */ - class DataScanJob implements IDataScanJob { - - /** - * Constructs a new DataScanJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataScanJob); - - /** DataScanJob name. */ - public name: string; - - /** DataScanJob uid. */ - public uid: string; - - /** DataScanJob createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** DataScanJob state. */ - public state: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State); - - /** DataScanJob message. */ - public message: string; - - /** DataScanJob type. */ - public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); - - /** DataScanJob dataQualitySpec. */ - public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); - - /** DataScanJob dataProfileSpec. */ - public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); - - /** DataScanJob dataDiscoverySpec. */ - public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); - - /** DataScanJob dataQualityResult. */ - public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); - - /** DataScanJob dataProfileResult. */ - public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); - - /** DataScanJob dataDiscoveryResult. */ - public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); - - /** DataScanJob spec. */ - public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); - - /** DataScanJob result. */ - public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); - - /** - * Creates a new DataScanJob instance using the specified properties. - * @param [properties] Properties to set - * @returns DataScanJob instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataScanJob): google.cloud.dataplex.v1.DataScanJob; - - /** - * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. - * @param message DataScanJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. - * @param message DataScanJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataScanJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataScanJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanJob; - - /** - * Decodes a DataScanJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataScanJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanJob; - - /** - * Verifies a DataScanJob message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataScanJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataScanJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanJob; - - /** - * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. - * @param message DataScanJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataScanJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataScanJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataScanJob { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - CANCELING = 2, - CANCELLED = 3, - SUCCEEDED = 4, - FAILED = 5, - PENDING = 7 - } - } - - /** DataScanType enum. */ - enum DataScanType { - DATA_SCAN_TYPE_UNSPECIFIED = 0, - DATA_QUALITY = 1, - DATA_PROFILE = 2, - DATA_DISCOVERY = 3 - } - - /** Properties of a DiscoveryEvent. */ - interface IDiscoveryEvent { - - /** DiscoveryEvent message */ - message?: (string|null); - - /** DiscoveryEvent lakeId */ - lakeId?: (string|null); - - /** DiscoveryEvent zoneId */ - zoneId?: (string|null); - - /** DiscoveryEvent assetId */ - assetId?: (string|null); - - /** DiscoveryEvent dataLocation */ - dataLocation?: (string|null); - - /** DiscoveryEvent datascanId */ - datascanId?: (string|null); - - /** DiscoveryEvent type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); - - /** DiscoveryEvent config */ - config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - - /** DiscoveryEvent entity */ - entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); - - /** DiscoveryEvent partition */ - partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); - - /** DiscoveryEvent action */ - action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); - - /** DiscoveryEvent table */ - table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); - } - - /** Represents a DiscoveryEvent. */ - class DiscoveryEvent implements IDiscoveryEvent { - - /** - * Constructs a new DiscoveryEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); - - /** DiscoveryEvent message. */ - public message: string; - - /** DiscoveryEvent lakeId. */ - public lakeId: string; - - /** DiscoveryEvent zoneId. */ - public zoneId: string; - - /** DiscoveryEvent assetId. */ - public assetId: string; - - /** DiscoveryEvent dataLocation. */ - public dataLocation: string; - - /** DiscoveryEvent datascanId. */ - public datascanId: string; - - /** DiscoveryEvent type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); - - /** DiscoveryEvent config. */ - public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - - /** DiscoveryEvent entity. */ - public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); - - /** DiscoveryEvent partition. */ - public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); - - /** DiscoveryEvent action. */ - public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); - - /** DiscoveryEvent table. */ - public table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); - - /** DiscoveryEvent details. */ - public details?: ("config"|"entity"|"partition"|"action"|"table"); - - /** - * Creates a new DiscoveryEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoveryEvent instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; - - /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; - - /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; - - /** - * Verifies a DiscoveryEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoveryEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; - - /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @param message DiscoveryEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DiscoveryEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DiscoveryEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DiscoveryEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - CONFIG = 1, - ENTITY_CREATED = 2, - ENTITY_UPDATED = 3, - ENTITY_DELETED = 4, - PARTITION_CREATED = 5, - PARTITION_UPDATED = 6, - PARTITION_DELETED = 7, - TABLE_PUBLISHED = 10, - TABLE_UPDATED = 11, - TABLE_IGNORED = 12, - TABLE_DELETED = 13 - } - - /** EntityType enum. */ - enum EntityType { - ENTITY_TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } - - /** TableType enum. */ - enum TableType { - TABLE_TYPE_UNSPECIFIED = 0, - EXTERNAL_TABLE = 1, - BIGLAKE_TABLE = 2, - OBJECT_TABLE = 3 - } - - /** Properties of a ConfigDetails. */ - interface IConfigDetails { - - /** ConfigDetails parameters */ - parameters?: ({ [k: string]: string }|null); - } - - /** Represents a ConfigDetails. */ - class ConfigDetails implements IConfigDetails { - - /** - * Constructs a new ConfigDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); - - /** ConfigDetails parameters. */ - public parameters: { [k: string]: string }; - - /** - * Creates a new ConfigDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfigDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; - - /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfigDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; - - /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; - - /** - * Verifies a ConfigDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfigDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; - - /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @param message ConfigDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfigDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfigDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EntityDetails. */ - interface IEntityDetails { - - /** EntityDetails entity */ - entity?: (string|null); - - /** EntityDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - } - - /** Represents an EntityDetails. */ - class EntityDetails implements IEntityDetails { - - /** - * Constructs a new EntityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); - - /** EntityDetails entity. */ - public entity: string; - - /** EntityDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); - - /** - * Creates a new EntityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns EntityDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; - - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; - - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; - - /** - * Verifies an EntityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; - - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @param message EntityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TableDetails. */ - interface ITableDetails { - - /** TableDetails table */ - table?: (string|null); - - /** TableDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType|null); - } - - /** Represents a TableDetails. */ - class TableDetails implements ITableDetails { - - /** - * Constructs a new TableDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails); - - /** TableDetails table. */ - public table: string; - - /** TableDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType); - - /** - * Creates a new TableDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns TableDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; - - /** - * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. - * @param message TableDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. - * @param message TableDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; - - /** - * Decodes a TableDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; - - /** - * Verifies a TableDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; - - /** - * Creates a plain object from a TableDetails message. Also converts values to other types if specified. - * @param message TableDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.TableDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TableDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PartitionDetails. */ - interface IPartitionDetails { - - /** PartitionDetails partition */ - partition?: (string|null); - - /** PartitionDetails entity */ - entity?: (string|null); - - /** PartitionDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - - /** PartitionDetails sampledDataLocations */ - sampledDataLocations?: (string[]|null); - } - - /** Represents a PartitionDetails. */ - class PartitionDetails implements IPartitionDetails { - - /** - * Constructs a new PartitionDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); - - /** PartitionDetails partition. */ - public partition: string; - - /** PartitionDetails entity. */ - public entity: string; - - /** PartitionDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); - - /** PartitionDetails sampledDataLocations. */ - public sampledDataLocations: string[]; - - /** - * Creates a new PartitionDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PartitionDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - - /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PartitionDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - - /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - - /** - * Verifies a PartitionDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartitionDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - - /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @param message PartitionDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartitionDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PartitionDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActionDetails. */ - interface IActionDetails { - - /** ActionDetails type */ - type?: (string|null); - - /** ActionDetails issue */ - issue?: (string|null); - } - - /** Represents an ActionDetails. */ - class ActionDetails implements IActionDetails { - - /** - * Constructs a new ActionDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); - - /** ActionDetails type. */ - public type: string; - - /** ActionDetails issue. */ - public issue: string; - - /** - * Creates a new ActionDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ActionDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - - /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActionDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - - /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - - /** - * Verifies an ActionDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActionDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - - /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @param message ActionDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActionDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActionDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a JobEvent. */ - interface IJobEvent { - - /** JobEvent message */ - message?: (string|null); - - /** JobEvent jobId */ - jobId?: (string|null); - - /** JobEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent state */ - state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); - - /** JobEvent retries */ - retries?: (number|null); - - /** JobEvent type */ - type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); - - /** JobEvent service */ - service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); - - /** JobEvent serviceJob */ - serviceJob?: (string|null); - - /** JobEvent executionTrigger */ - executionTrigger?: (google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|keyof typeof google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|null); - } - - /** Represents a JobEvent. */ - class JobEvent implements IJobEvent { - - /** - * Constructs a new JobEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IJobEvent); - - /** JobEvent message. */ - public message: string; - - /** JobEvent jobId. */ - public jobId: string; - - /** JobEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent state. */ - public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); - - /** JobEvent retries. */ - public retries: number; - - /** JobEvent type. */ - public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); - - /** JobEvent service. */ - public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); - - /** JobEvent serviceJob. */ - public serviceJob: string; - - /** JobEvent executionTrigger. */ - public executionTrigger: (google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|keyof typeof google.cloud.dataplex.v1.JobEvent.ExecutionTrigger); - - /** - * Creates a new JobEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns JobEvent instance - */ - public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; - - /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JobEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JobEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; - - /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JobEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; - - /** - * Verifies a JobEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JobEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; - - /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. - * @param message JobEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JobEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JobEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace JobEvent { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SPARK = 1, - NOTEBOOK = 2 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - CANCELLED = 3, - ABORTED = 4 - } - - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 - } - - /** ExecutionTrigger enum. */ - enum ExecutionTrigger { - EXECUTION_TRIGGER_UNSPECIFIED = 0, - TASK_CONFIG = 1, - RUN_REQUEST = 2 - } - } - - /** Properties of a SessionEvent. */ - interface ISessionEvent { - - /** SessionEvent message */ - message?: (string|null); - - /** SessionEvent userId */ - userId?: (string|null); - - /** SessionEvent sessionId */ - sessionId?: (string|null); - - /** SessionEvent type */ - type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); - - /** SessionEvent query */ - query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - - /** SessionEvent eventSucceeded */ - eventSucceeded?: (boolean|null); - - /** SessionEvent fastStartupEnabled */ - fastStartupEnabled?: (boolean|null); - - /** SessionEvent unassignedDuration */ - unassignedDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a SessionEvent. */ - class SessionEvent implements ISessionEvent { - - /** - * Constructs a new SessionEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); - - /** SessionEvent message. */ - public message: string; - - /** SessionEvent userId. */ - public userId: string; - - /** SessionEvent sessionId. */ - public sessionId: string; - - /** SessionEvent type. */ - public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); - - /** SessionEvent query. */ - public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - - /** SessionEvent eventSucceeded. */ - public eventSucceeded: boolean; - - /** SessionEvent fastStartupEnabled. */ - public fastStartupEnabled: boolean; - - /** SessionEvent unassignedDuration. */ - public unassignedDuration?: (google.protobuf.IDuration|null); - - /** SessionEvent detail. */ - public detail?: "query"; - - /** - * Creates a new SessionEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionEvent instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; - - /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SessionEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SessionEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; - - /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; - - /** - * Verifies a SessionEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; - - /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. - * @param message SessionEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SessionEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SessionEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SessionEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - START = 1, - STOP = 2, - QUERY = 3, - CREATE = 4 - } - - /** Properties of a QueryDetail. */ - interface IQueryDetail { - - /** QueryDetail queryId */ - queryId?: (string|null); - - /** QueryDetail queryText */ - queryText?: (string|null); - - /** QueryDetail engine */ - engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); - - /** QueryDetail duration */ - duration?: (google.protobuf.IDuration|null); - - /** QueryDetail resultSizeBytes */ - resultSizeBytes?: (number|Long|string|null); - - /** QueryDetail dataProcessedBytes */ - dataProcessedBytes?: (number|Long|string|null); - } - - /** Represents a QueryDetail. */ - class QueryDetail implements IQueryDetail { - - /** - * Constructs a new QueryDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); - - /** QueryDetail queryId. */ - public queryId: string; - - /** QueryDetail queryText. */ - public queryText: string; - - /** QueryDetail engine. */ - public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); - - /** QueryDetail duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** QueryDetail resultSizeBytes. */ - public resultSizeBytes: (number|Long|string); - - /** QueryDetail dataProcessedBytes. */ - public dataProcessedBytes: (number|Long|string); - - /** - * Creates a new QueryDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryDetail instance - */ - public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Verifies a QueryDetail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @param message QueryDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace QueryDetail { - - /** Engine enum. */ - enum Engine { - ENGINE_UNSPECIFIED = 0, - SPARK_SQL = 1, - BIGQUERY = 2 - } - } - } - - /** Properties of a GovernanceEvent. */ - interface IGovernanceEvent { - - /** GovernanceEvent message */ - message?: (string|null); - - /** GovernanceEvent eventType */ - eventType?: (google.cloud.dataplex.v1.GovernanceEvent.EventType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.EventType|null); - - /** GovernanceEvent entity */ - entity?: (google.cloud.dataplex.v1.GovernanceEvent.IEntity|null); - } - - /** Represents a GovernanceEvent. */ - class GovernanceEvent implements IGovernanceEvent { - - /** - * Constructs a new GovernanceEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGovernanceEvent); - - /** GovernanceEvent message. */ - public message: string; - - /** GovernanceEvent eventType. */ - public eventType: (google.cloud.dataplex.v1.GovernanceEvent.EventType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.EventType); - - /** GovernanceEvent entity. */ - public entity?: (google.cloud.dataplex.v1.GovernanceEvent.IEntity|null); - - /** GovernanceEvent _entity. */ - public _entity?: "entity"; - - /** - * Creates a new GovernanceEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceEvent instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGovernanceEvent): google.cloud.dataplex.v1.GovernanceEvent; - - /** - * Encodes the specified GovernanceEvent message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. - * @param message GovernanceEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGovernanceEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. - * @param message GovernanceEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGovernanceEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GovernanceEvent; - - /** - * Decodes a GovernanceEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GovernanceEvent; - - /** - * Verifies a GovernanceEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GovernanceEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GovernanceEvent; - - /** - * Creates a plain object from a GovernanceEvent message. Also converts values to other types if specified. - * @param message GovernanceEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GovernanceEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GovernanceEvent { - - /** Properties of an Entity. */ - interface IEntity { - - /** Entity entity */ - entity?: (string|null); - - /** Entity entityType */ - entityType?: (google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|null); - } - - /** Represents an Entity. */ - class Entity implements IEntity { - - /** - * Constructs a new Entity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.GovernanceEvent.IEntity); - - /** Entity entity. */ - public entity: string; - - /** Entity entityType. */ - public entityType: (google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|keyof typeof google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType); - - /** - * Creates a new Entity instance using the specified properties. - * @param [properties] Properties to set - * @returns Entity instance - */ - public static create(properties?: google.cloud.dataplex.v1.GovernanceEvent.IEntity): google.cloud.dataplex.v1.GovernanceEvent.Entity; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.GovernanceEvent.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.GovernanceEvent.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GovernanceEvent.Entity; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GovernanceEvent.Entity; - - /** - * Verifies an Entity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GovernanceEvent.Entity; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GovernanceEvent.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Entity { - - /** EntityType enum. */ - enum EntityType { - ENTITY_TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } - } - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - RESOURCE_IAM_POLICY_UPDATE = 1, - BIGQUERY_TABLE_CREATE = 2, - BIGQUERY_TABLE_UPDATE = 3, - BIGQUERY_TABLE_DELETE = 4, - BIGQUERY_CONNECTION_CREATE = 5, - BIGQUERY_CONNECTION_UPDATE = 6, - BIGQUERY_CONNECTION_DELETE = 7, - BIGQUERY_TAXONOMY_CREATE = 10, - BIGQUERY_POLICY_TAG_CREATE = 11, - BIGQUERY_POLICY_TAG_DELETE = 12, - BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13, - ACCESS_POLICY_UPDATE = 14, - GOVERNANCE_RULE_MATCHED_RESOURCES = 15, - GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16, - GOVERNANCE_RULE_ERRORS = 17, - GOVERNANCE_RULE_PROCESSING = 18 - } - } - - /** Properties of a DataScanEvent. */ - interface IDataScanEvent { - - /** DataScanEvent dataSource */ - dataSource?: (string|null); - - /** DataScanEvent jobId */ - jobId?: (string|null); - - /** DataScanEvent createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent type */ - type?: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType|null); - - /** DataScanEvent state */ - state?: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State|null); - - /** DataScanEvent message */ - message?: (string|null); - - /** DataScanEvent specVersion */ - specVersion?: (string|null); - - /** DataScanEvent trigger */ - trigger?: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger|null); - - /** DataScanEvent scope */ - scope?: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope|null); - - /** DataScanEvent dataProfile */ - dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); - - /** DataScanEvent dataQuality */ - dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); - - /** DataScanEvent dataProfileConfigs */ - dataProfileConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null); - - /** DataScanEvent dataQualityConfigs */ - dataQualityConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null); - - /** DataScanEvent postScanActionsResult */ - postScanActionsResult?: (google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null); - } - - /** Represents a DataScanEvent. */ - class DataScanEvent implements IDataScanEvent { - - /** - * Constructs a new DataScanEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataScanEvent); - - /** DataScanEvent dataSource. */ - public dataSource: string; - - /** DataScanEvent jobId. */ - public jobId: string; - - /** DataScanEvent createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** DataScanEvent type. */ - public type: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType); - - /** DataScanEvent state. */ - public state: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State); - - /** DataScanEvent message. */ - public message: string; - - /** DataScanEvent specVersion. */ - public specVersion: string; - - /** DataScanEvent trigger. */ - public trigger: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger); - - /** DataScanEvent scope. */ - public scope: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope); - - /** DataScanEvent dataProfile. */ - public dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); - - /** DataScanEvent dataQuality. */ - public dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); - - /** DataScanEvent dataProfileConfigs. */ - public dataProfileConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null); - - /** DataScanEvent dataQualityConfigs. */ - public dataQualityConfigs?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null); - - /** DataScanEvent postScanActionsResult. */ - public postScanActionsResult?: (google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null); - - /** DataScanEvent result. */ - public result?: ("dataProfile"|"dataQuality"); - - /** DataScanEvent appliedConfigs. */ - public appliedConfigs?: ("dataProfileConfigs"|"dataQualityConfigs"); - - /** - * Creates a new DataScanEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns DataScanEvent instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataScanEvent): google.cloud.dataplex.v1.DataScanEvent; - - /** - * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @param message DataScanEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @param message DataScanEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataScanEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataScanEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent; - - /** - * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataScanEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent; - - /** - * Verifies a DataScanEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataScanEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent; - - /** - * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. - * @param message DataScanEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataScanEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataScanEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataScanEvent { - - /** ScanType enum. */ - enum ScanType { - SCAN_TYPE_UNSPECIFIED = 0, - DATA_PROFILE = 1, - DATA_QUALITY = 2, - DATA_DISCOVERY = 4 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4, - CREATED = 5 - } - - /** Trigger enum. */ - enum Trigger { - TRIGGER_UNSPECIFIED = 0, - ON_DEMAND = 1, - SCHEDULE = 2 - } - - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - FULL = 1, - INCREMENTAL = 2 - } - - /** Properties of a DataProfileResult. */ - interface IDataProfileResult { - - /** DataProfileResult rowCount */ - rowCount?: (number|Long|string|null); - } - - /** Represents a DataProfileResult. */ - class DataProfileResult implements IDataProfileResult { - - /** - * Constructs a new DataProfileResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult); - - /** DataProfileResult rowCount. */ - public rowCount: (number|Long|string); - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataProfileResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; - - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; - - /** - * Verifies a DataProfileResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataProfileResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; - - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @param message DataProfileResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataProfileResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataProfileResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataQualityResult. */ - interface IDataQualityResult { - - /** DataQualityResult rowCount */ - rowCount?: (number|Long|string|null); - - /** DataQualityResult passed */ - passed?: (boolean|null); - - /** DataQualityResult dimensionPassed */ - dimensionPassed?: ({ [k: string]: boolean }|null); - - /** DataQualityResult score */ - score?: (number|null); - - /** DataQualityResult dimensionScore */ - dimensionScore?: ({ [k: string]: number }|null); - - /** DataQualityResult columnScore */ - columnScore?: ({ [k: string]: number }|null); - } - - /** Represents a DataQualityResult. */ - class DataQualityResult implements IDataQualityResult { - - /** - * Constructs a new DataQualityResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult); - - /** DataQualityResult rowCount. */ - public rowCount: (number|Long|string); - - /** DataQualityResult passed. */ - public passed: boolean; - - /** DataQualityResult dimensionPassed. */ - public dimensionPassed: { [k: string]: boolean }; - - /** DataQualityResult score. */ - public score: number; - - /** DataQualityResult dimensionScore. */ - public dimensionScore: { [k: string]: number }; - - /** DataQualityResult columnScore. */ - public columnScore: { [k: string]: number }; - - /** - * Creates a new DataQualityResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; - - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; - - /** - * Verifies a DataQualityResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; - - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @param message DataQualityResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataProfileAppliedConfigs. */ - interface IDataProfileAppliedConfigs { - - /** DataProfileAppliedConfigs samplingPercent */ - samplingPercent?: (number|null); - - /** DataProfileAppliedConfigs rowFilterApplied */ - rowFilterApplied?: (boolean|null); - - /** DataProfileAppliedConfigs columnFilterApplied */ - columnFilterApplied?: (boolean|null); - } - - /** Represents a DataProfileAppliedConfigs. */ - class DataProfileAppliedConfigs implements IDataProfileAppliedConfigs { - - /** - * Constructs a new DataProfileAppliedConfigs. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs); - - /** DataProfileAppliedConfigs samplingPercent. */ - public samplingPercent: number; - - /** DataProfileAppliedConfigs rowFilterApplied. */ - public rowFilterApplied: boolean; - - /** DataProfileAppliedConfigs columnFilterApplied. */ - public columnFilterApplied: boolean; - - /** - * Creates a new DataProfileAppliedConfigs instance using the specified properties. - * @param [properties] Properties to set - * @returns DataProfileAppliedConfigs instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; - - /** - * Encodes the specified DataProfileAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. - * @param message DataProfileAppliedConfigs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataProfileAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. - * @param message DataProfileAppliedConfigs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataProfileAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; - - /** - * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataProfileAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; - - /** - * Verifies a DataProfileAppliedConfigs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataProfileAppliedConfigs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataProfileAppliedConfigs - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs; - - /** - * Creates a plain object from a DataProfileAppliedConfigs message. Also converts values to other types if specified. - * @param message DataProfileAppliedConfigs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataProfileAppliedConfigs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataProfileAppliedConfigs - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataQualityAppliedConfigs. */ - interface IDataQualityAppliedConfigs { - - /** DataQualityAppliedConfigs samplingPercent */ - samplingPercent?: (number|null); - - /** DataQualityAppliedConfigs rowFilterApplied */ - rowFilterApplied?: (boolean|null); - } - - /** Represents a DataQualityAppliedConfigs. */ - class DataQualityAppliedConfigs implements IDataQualityAppliedConfigs { - - /** - * Constructs a new DataQualityAppliedConfigs. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs); - - /** DataQualityAppliedConfigs samplingPercent. */ - public samplingPercent: number; - - /** DataQualityAppliedConfigs rowFilterApplied. */ - public rowFilterApplied: boolean; - - /** - * Creates a new DataQualityAppliedConfigs instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityAppliedConfigs instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; - - /** - * Encodes the specified DataQualityAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. - * @param message DataQualityAppliedConfigs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. - * @param message DataQualityAppliedConfigs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; - - /** - * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; - - /** - * Verifies a DataQualityAppliedConfigs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityAppliedConfigs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityAppliedConfigs - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs; - - /** - * Creates a plain object from a DataQualityAppliedConfigs message. Also converts values to other types if specified. - * @param message DataQualityAppliedConfigs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityAppliedConfigs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityAppliedConfigs - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostScanActionsResult. */ - interface IPostScanActionsResult { - - /** PostScanActionsResult bigqueryExportResult */ - bigqueryExportResult?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null); - } - - /** Represents a PostScanActionsResult. */ - class PostScanActionsResult implements IPostScanActionsResult { - - /** - * Constructs a new PostScanActionsResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult); - - /** PostScanActionsResult bigqueryExportResult. */ - public bigqueryExportResult?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null); - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @param [properties] Properties to set - * @returns PostScanActionsResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. - * @param message PostScanActionsResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; - - /** - * Verifies a PostScanActionsResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostScanActionsResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @param message PostScanActionsResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostScanActionsResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostScanActionsResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PostScanActionsResult { - - /** Properties of a BigQueryExportResult. */ - interface IBigQueryExportResult { - - /** BigQueryExportResult state */ - state?: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|null); - - /** BigQueryExportResult message */ - message?: (string|null); - } - - /** Represents a BigQueryExportResult. */ - class BigQueryExportResult implements IBigQueryExportResult { - - /** - * Constructs a new BigQueryExportResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult); - - /** BigQueryExportResult state. */ - public state: (google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State); - - /** BigQueryExportResult message. */ - public message: string; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryExportResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @param message BigQueryExportResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; - - /** - * Verifies a BigQueryExportResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryExportResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @param message BigQueryExportResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryExportResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryExportResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryExportResult { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - SKIPPED = 3 - } - } - } - } - - /** Properties of a DataQualityScanRuleResult. */ - interface IDataQualityScanRuleResult { - - /** DataQualityScanRuleResult jobId */ - jobId?: (string|null); - - /** DataQualityScanRuleResult dataSource */ - dataSource?: (string|null); - - /** DataQualityScanRuleResult column */ - column?: (string|null); - - /** DataQualityScanRuleResult ruleName */ - ruleName?: (string|null); - - /** DataQualityScanRuleResult ruleType */ - ruleType?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|null); - - /** DataQualityScanRuleResult evalutionType */ - evalutionType?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|null); - - /** DataQualityScanRuleResult ruleDimension */ - ruleDimension?: (string|null); - - /** DataQualityScanRuleResult thresholdPercent */ - thresholdPercent?: (number|null); - - /** DataQualityScanRuleResult result */ - result?: (google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|null); - - /** DataQualityScanRuleResult evaluatedRowCount */ - evaluatedRowCount?: (number|Long|string|null); - - /** DataQualityScanRuleResult passedRowCount */ - passedRowCount?: (number|Long|string|null); - - /** DataQualityScanRuleResult nullRowCount */ - nullRowCount?: (number|Long|string|null); - - /** DataQualityScanRuleResult assertionRowCount */ - assertionRowCount?: (number|Long|string|null); - } - - /** Represents a DataQualityScanRuleResult. */ - class DataQualityScanRuleResult implements IDataQualityScanRuleResult { - - /** - * Constructs a new DataQualityScanRuleResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDataQualityScanRuleResult); - - /** DataQualityScanRuleResult jobId. */ - public jobId: string; - - /** DataQualityScanRuleResult dataSource. */ - public dataSource: string; - - /** DataQualityScanRuleResult column. */ - public column: string; - - /** DataQualityScanRuleResult ruleName. */ - public ruleName: string; - - /** DataQualityScanRuleResult ruleType. */ - public ruleType: (google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType); - - /** DataQualityScanRuleResult evalutionType. */ - public evalutionType: (google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType); - - /** DataQualityScanRuleResult ruleDimension. */ - public ruleDimension: string; - - /** DataQualityScanRuleResult thresholdPercent. */ - public thresholdPercent: number; - - /** DataQualityScanRuleResult result. */ - public result: (google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|keyof typeof google.cloud.dataplex.v1.DataQualityScanRuleResult.Result); - - /** DataQualityScanRuleResult evaluatedRowCount. */ - public evaluatedRowCount: (number|Long|string); - - /** DataQualityScanRuleResult passedRowCount. */ - public passedRowCount: (number|Long|string); - - /** DataQualityScanRuleResult nullRowCount. */ - public nullRowCount: (number|Long|string); - - /** DataQualityScanRuleResult assertionRowCount. */ - public assertionRowCount: (number|Long|string); - - /** - * Creates a new DataQualityScanRuleResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityScanRuleResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDataQualityScanRuleResult): google.cloud.dataplex.v1.DataQualityScanRuleResult; - - /** - * Encodes the specified DataQualityScanRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. - * @param message DataQualityScanRuleResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDataQualityScanRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataQualityScanRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. - * @param message DataQualityScanRuleResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityScanRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataQualityScanRuleResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityScanRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataQualityScanRuleResult; - - /** - * Decodes a DataQualityScanRuleResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityScanRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataQualityScanRuleResult; - - /** - * Verifies a DataQualityScanRuleResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataQualityScanRuleResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityScanRuleResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityScanRuleResult; - - /** - * Creates a plain object from a DataQualityScanRuleResult message. Also converts values to other types if specified. - * @param message DataQualityScanRuleResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataQualityScanRuleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataQualityScanRuleResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataQualityScanRuleResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataQualityScanRuleResult { - - /** RuleType enum. */ - enum RuleType { - RULE_TYPE_UNSPECIFIED = 0, - NON_NULL_EXPECTATION = 1, - RANGE_EXPECTATION = 2, - REGEX_EXPECTATION = 3, - ROW_CONDITION_EXPECTATION = 4, - SET_EXPECTATION = 5, - STATISTIC_RANGE_EXPECTATION = 6, - TABLE_CONDITION_EXPECTATION = 7, - UNIQUENESS_EXPECTATION = 8, - SQL_ASSERTION = 9 - } - - /** EvaluationType enum. */ - enum EvaluationType { - EVALUATION_TYPE_UNSPECIFIED = 0, - PER_ROW = 1, - AGGREGATE = 2 - } - - /** Result enum. */ - enum Result { - RESULT_UNSPECIFIED = 0, - PASSED = 1, - FAILED = 2 - } - } - - /** Represents a MetadataService */ - class MetadataService extends $protobuf.rpc.Service { - - /** - * Constructs a new MetadataService 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 MetadataService 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): MetadataService; - - /** - * Calls CreateEntity. - * @param request CreateEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity - */ - public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.CreateEntityCallback): void; - - /** - * Calls CreateEntity. - * @param request CreateEntityRequest message or plain object - * @returns Promise - */ - public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest): Promise; - - /** - * Calls UpdateEntity. - * @param request UpdateEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity - */ - public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback): void; - - /** - * Calls UpdateEntity. - * @param request UpdateEntityRequest message or plain object - * @returns Promise - */ - public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest): Promise; - - /** - * Calls DeleteEntity. - * @param request DeleteEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback): void; - - /** - * Calls DeleteEntity. - * @param request DeleteEntityRequest message or plain object - * @returns Promise - */ - public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest): Promise; - - /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity - */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; - - /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @returns Promise - */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; - - /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse - */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; - - /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @returns Promise - */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; - - /** - * Calls CreatePartition. - * @param request CreatePartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Partition - */ - public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback): void; - - /** - * Calls CreatePartition. - * @param request CreatePartitionRequest message or plain object - * @returns Promise - */ - public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest): Promise; - - /** - * Calls DeletePartition. - * @param request DeletePartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback): void; - - /** - * Calls DeletePartition. - * @param request DeletePartitionRequest message or plain object - * @returns Promise - */ - public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest): Promise; - - /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Partition - */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; - - /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @returns Promise - */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; - - /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse - */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; - - /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @returns Promise - */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; - } - - namespace MetadataService { - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. - * @param error Error, if any - * @param [response] Entity - */ - type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. - * @param error Error, if any - * @param [response] Entity - */ - type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. - * @param error Error, if any - * @param [response] Entity - */ - type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. - * @param error Error, if any - * @param [response] ListEntitiesResponse - */ - type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. - * @param error Error, if any - * @param [response] Partition - */ - type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. - * @param error Error, if any - * @param [response] Empty - */ - type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. - * @param error Error, if any - * @param [response] Partition - */ - type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. - * @param error Error, if any - * @param [response] ListPartitionsResponse - */ - type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; - } - - /** Properties of a CreateEntityRequest. */ - interface ICreateEntityRequest { - - /** CreateEntityRequest parent */ - parent?: (string|null); - - /** CreateEntityRequest entity */ - entity?: (google.cloud.dataplex.v1.IEntity|null); - - /** CreateEntityRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateEntityRequest. */ - class CreateEntityRequest implements ICreateEntityRequest { - - /** - * Constructs a new CreateEntityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEntityRequest); - - /** CreateEntityRequest parent. */ - public parent: string; - - /** CreateEntityRequest entity. */ - public entity?: (google.cloud.dataplex.v1.IEntity|null); - - /** CreateEntityRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateEntityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntityRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEntityRequest): google.cloud.dataplex.v1.CreateEntityRequest; - - /** - * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @param message CreateEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @param message CreateEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntityRequest; - - /** - * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntityRequest; - - /** - * Verifies a CreateEntityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntityRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntityRequest; - - /** - * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. - * @param message CreateEntityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntityRequest. */ - interface IUpdateEntityRequest { - - /** UpdateEntityRequest entity */ - entity?: (google.cloud.dataplex.v1.IEntity|null); - - /** UpdateEntityRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateEntityRequest. */ - class UpdateEntityRequest implements IUpdateEntityRequest { - - /** - * Constructs a new UpdateEntityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest); - - /** UpdateEntityRequest entity. */ - public entity?: (google.cloud.dataplex.v1.IEntity|null); - - /** UpdateEntityRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateEntityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntityRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest): google.cloud.dataplex.v1.UpdateEntityRequest; - - /** - * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @param message UpdateEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @param message UpdateEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntityRequest; - - /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntityRequest; - - /** - * Verifies an UpdateEntityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntityRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntityRequest; - - /** - * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. - * @param message UpdateEntityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntityRequest. */ - interface IDeleteEntityRequest { - - /** DeleteEntityRequest name */ - name?: (string|null); - - /** DeleteEntityRequest etag */ - etag?: (string|null); - } - - /** Represents a DeleteEntityRequest. */ - class DeleteEntityRequest implements IDeleteEntityRequest { - - /** - * Constructs a new DeleteEntityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest); - - /** DeleteEntityRequest name. */ - public name: string; - - /** DeleteEntityRequest etag. */ - public etag: string; - - /** - * Creates a new DeleteEntityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntityRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest): google.cloud.dataplex.v1.DeleteEntityRequest; - - /** - * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @param message DeleteEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @param message DeleteEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntityRequest; - - /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntityRequest; - - /** - * Verifies a DeleteEntityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntityRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntityRequest; - - /** - * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. - * @param message DeleteEntityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntitiesRequest. */ - interface IListEntitiesRequest { - - /** ListEntitiesRequest parent */ - parent?: (string|null); - - /** ListEntitiesRequest view */ - view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); - - /** ListEntitiesRequest pageSize */ - pageSize?: (number|null); - - /** ListEntitiesRequest pageToken */ - pageToken?: (string|null); - - /** ListEntitiesRequest filter */ - filter?: (string|null); - } - - /** Represents a ListEntitiesRequest. */ - class ListEntitiesRequest implements IListEntitiesRequest { - - /** - * Constructs a new ListEntitiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); - - /** ListEntitiesRequest parent. */ - public parent: string; - - /** ListEntitiesRequest view. */ - public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); - - /** ListEntitiesRequest pageSize. */ - public pageSize: number; - - /** ListEntitiesRequest pageToken. */ - public pageToken: string; - - /** ListEntitiesRequest filter. */ - public filter: string; - - /** - * Creates a new ListEntitiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntitiesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; - - /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; - - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; - - /** - * Verifies a ListEntitiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntitiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; - - /** - * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. - * @param message ListEntitiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntitiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntitiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ListEntitiesRequest { - - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - TABLES = 1, - FILESETS = 2 - } - } - - /** Properties of a ListEntitiesResponse. */ - interface IListEntitiesResponse { - - /** ListEntitiesResponse entities */ - entities?: (google.cloud.dataplex.v1.IEntity[]|null); - - /** ListEntitiesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntitiesResponse. */ - class ListEntitiesResponse implements IListEntitiesResponse { - - /** - * Constructs a new ListEntitiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); - - /** ListEntitiesResponse entities. */ - public entities: google.cloud.dataplex.v1.IEntity[]; - - /** ListEntitiesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEntitiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntitiesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; - - /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; - - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; - - /** - * Verifies a ListEntitiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntitiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; - - /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. - * @param message ListEntitiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntitiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntitiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntityRequest. */ - interface IGetEntityRequest { - - /** GetEntityRequest name */ - name?: (string|null); - - /** GetEntityRequest view */ - view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); - } - - /** Represents a GetEntityRequest. */ - class GetEntityRequest implements IGetEntityRequest { - - /** - * Constructs a new GetEntityRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); - - /** GetEntityRequest name. */ - public name: string; - - /** GetEntityRequest view. */ - public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); - - /** - * Creates a new GetEntityRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntityRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; - - /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntityRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; - - /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; - - /** - * Verifies a GetEntityRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntityRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; - - /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. - * @param message GetEntityRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntityRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntityRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GetEntityRequest { - - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - SCHEMA = 2, - FULL = 4 - } - } - - /** Properties of a ListPartitionsRequest. */ - interface IListPartitionsRequest { - - /** ListPartitionsRequest parent */ - parent?: (string|null); - - /** ListPartitionsRequest pageSize */ - pageSize?: (number|null); - - /** ListPartitionsRequest pageToken */ - pageToken?: (string|null); - - /** ListPartitionsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListPartitionsRequest. */ - class ListPartitionsRequest implements IListPartitionsRequest { - - /** - * Constructs a new ListPartitionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); - - /** ListPartitionsRequest parent. */ - public parent: string; - - /** ListPartitionsRequest pageSize. */ - public pageSize: number; - - /** ListPartitionsRequest pageToken. */ - public pageToken: string; - - /** ListPartitionsRequest filter. */ - public filter: string; - - /** - * Creates a new ListPartitionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPartitionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; - - /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; - - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; - - /** - * Verifies a ListPartitionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPartitionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; - - /** - * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. - * @param message ListPartitionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPartitionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPartitionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePartitionRequest. */ - interface ICreatePartitionRequest { - - /** CreatePartitionRequest parent */ - parent?: (string|null); - - /** CreatePartitionRequest partition */ - partition?: (google.cloud.dataplex.v1.IPartition|null); - - /** CreatePartitionRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreatePartitionRequest. */ - class CreatePartitionRequest implements ICreatePartitionRequest { - - /** - * Constructs a new CreatePartitionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest); - - /** CreatePartitionRequest parent. */ - public parent: string; - - /** CreatePartitionRequest partition. */ - public partition?: (google.cloud.dataplex.v1.IPartition|null); - - /** CreatePartitionRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreatePartitionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePartitionRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest): google.cloud.dataplex.v1.CreatePartitionRequest; - - /** - * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @param message CreatePartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @param message CreatePartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreatePartitionRequest; - - /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreatePartitionRequest; - - /** - * Verifies a CreatePartitionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePartitionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreatePartitionRequest; - - /** - * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. - * @param message CreatePartitionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreatePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePartitionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePartitionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePartitionRequest. */ - interface IDeletePartitionRequest { - - /** DeletePartitionRequest name */ - name?: (string|null); - - /** DeletePartitionRequest etag */ - etag?: (string|null); - } - - /** Represents a DeletePartitionRequest. */ - class DeletePartitionRequest implements IDeletePartitionRequest { - - /** - * Constructs a new DeletePartitionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest); - - /** DeletePartitionRequest name. */ - public name: string; - - /** DeletePartitionRequest etag. */ - public etag: string; - - /** - * Creates a new DeletePartitionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePartitionRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest): google.cloud.dataplex.v1.DeletePartitionRequest; - - /** - * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @param message DeletePartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @param message DeletePartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeletePartitionRequest; - - /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeletePartitionRequest; - - /** - * Verifies a DeletePartitionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePartitionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeletePartitionRequest; - - /** - * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. - * @param message DeletePartitionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeletePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePartitionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePartitionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPartitionsResponse. */ - interface IListPartitionsResponse { - - /** ListPartitionsResponse partitions */ - partitions?: (google.cloud.dataplex.v1.IPartition[]|null); - - /** ListPartitionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPartitionsResponse. */ - class ListPartitionsResponse implements IListPartitionsResponse { - - /** - * Constructs a new ListPartitionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); - - /** ListPartitionsResponse partitions. */ - public partitions: google.cloud.dataplex.v1.IPartition[]; - - /** ListPartitionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPartitionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPartitionsResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; - - /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; - - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; - - /** - * Verifies a ListPartitionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPartitionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; - - /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. - * @param message ListPartitionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPartitionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPartitionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPartitionRequest. */ - interface IGetPartitionRequest { - - /** GetPartitionRequest name */ - name?: (string|null); - } - - /** Represents a GetPartitionRequest. */ - class GetPartitionRequest implements IGetPartitionRequest { - - /** - * Constructs a new GetPartitionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); - - /** GetPartitionRequest name. */ - public name: string; - - /** - * Creates a new GetPartitionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPartitionRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; - - /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; - - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; - - /** - * Verifies a GetPartitionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPartitionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; - - /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. - * @param message GetPartitionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPartitionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPartitionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entity. */ - interface IEntity { - - /** Entity name */ - name?: (string|null); - - /** Entity displayName */ - displayName?: (string|null); - - /** Entity description */ - description?: (string|null); - - /** Entity createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Entity updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Entity id */ - id?: (string|null); - - /** Entity etag */ - etag?: (string|null); - - /** Entity type */ - type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); - - /** Entity asset */ - asset?: (string|null); - - /** Entity dataPath */ - dataPath?: (string|null); - - /** Entity dataPathPattern */ - dataPathPattern?: (string|null); - - /** Entity catalogEntry */ - catalogEntry?: (string|null); - - /** Entity system */ - system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); - - /** Entity format */ - format?: (google.cloud.dataplex.v1.IStorageFormat|null); - - /** Entity compatibility */ - compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); - - /** Entity access */ - access?: (google.cloud.dataplex.v1.IStorageAccess|null); - - /** Entity uid */ - uid?: (string|null); - - /** Entity schema */ - schema?: (google.cloud.dataplex.v1.ISchema|null); - } - - /** Represents an Entity. */ - class Entity implements IEntity { - - /** - * Constructs a new Entity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IEntity); - - /** Entity name. */ - public name: string; - - /** Entity displayName. */ - public displayName: string; - - /** Entity description. */ - public description: string; - - /** Entity createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Entity updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Entity id. */ - public id: string; - - /** Entity etag. */ - public etag: string; - - /** Entity type. */ - public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); - - /** Entity asset. */ - public asset: string; - - /** Entity dataPath. */ - public dataPath: string; - - /** Entity dataPathPattern. */ - public dataPathPattern: string; - - /** Entity catalogEntry. */ - public catalogEntry: string; - - /** Entity system. */ - public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); - - /** Entity format. */ - public format?: (google.cloud.dataplex.v1.IStorageFormat|null); - - /** Entity compatibility. */ - public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); - - /** Entity access. */ - public access?: (google.cloud.dataplex.v1.IStorageAccess|null); - - /** Entity uid. */ - public uid: string; - - /** Entity schema. */ - public schema?: (google.cloud.dataplex.v1.ISchema|null); - - /** - * Creates a new Entity instance using the specified properties. - * @param [properties] Properties to set - * @returns Entity instance - */ - public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; - - /** - * Verifies an Entity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Entity { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } - - /** Properties of a CompatibilityStatus. */ - interface ICompatibilityStatus { - - /** CompatibilityStatus hiveMetastore */ - hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery */ - bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - } - - /** Represents a CompatibilityStatus. */ - class CompatibilityStatus implements ICompatibilityStatus { - - /** - * Constructs a new CompatibilityStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); - - /** CompatibilityStatus hiveMetastore. */ - public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery. */ - public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** - * Creates a new CompatibilityStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns CompatibilityStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Verifies a CompatibilityStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompatibilityStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @param message CompatibilityStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompatibilityStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompatibilityStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CompatibilityStatus { - - /** Properties of a Compatibility. */ - interface ICompatibility { - - /** Compatibility compatible */ - compatible?: (boolean|null); - - /** Compatibility reason */ - reason?: (string|null); - } - - /** Represents a Compatibility. */ - class Compatibility implements ICompatibility { - - /** - * Constructs a new Compatibility. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); - - /** Compatibility compatible. */ - public compatible: boolean; - - /** Compatibility reason. */ - public reason: string; - - /** - * Creates a new Compatibility instance using the specified properties. - * @param [properties] Properties to set - * @returns Compatibility instance - */ - public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; - - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; - - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; - - /** - * Verifies a Compatibility message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Compatibility - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; - - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @param message Compatibility - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Compatibility to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Compatibility - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a Partition. */ - interface IPartition { - - /** Partition name */ - name?: (string|null); - - /** Partition values */ - values?: (string[]|null); - - /** Partition location */ - location?: (string|null); - - /** Partition etag */ - etag?: (string|null); - } - - /** Represents a Partition. */ - class Partition implements IPartition { - - /** - * Constructs a new Partition. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IPartition); - - /** Partition name. */ - public name: string; - - /** Partition values. */ - public values: string[]; - - /** Partition location. */ - public location: string; - - /** Partition etag. */ - public etag: string; - - /** - * Creates a new Partition instance using the specified properties. - * @param [properties] Properties to set - * @returns Partition instance - */ - public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; - - /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Partition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Partition; - - /** - * Decodes a Partition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Partition; - - /** - * Verifies a Partition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Partition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Partition - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; - - /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. - * @param message Partition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Partition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Partition - * @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 userManaged */ - userManaged?: (boolean|null); - - /** Schema fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); - - /** Schema partitionFields */ - partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); - - /** Schema partitionStyle */ - partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); - } - - /** Represents a Schema. */ - class Schema implements ISchema { - - /** - * Constructs a new Schema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ISchema); - - /** Schema userManaged. */ - public userManaged: boolean; - - /** Schema fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; - - /** Schema partitionFields. */ - public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; - - /** Schema partitionStyle. */ - public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); - - /** - * Creates a new Schema instance using the specified properties. - * @param [properties] Properties to set - * @returns Schema instance - */ - public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.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.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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; - } - - namespace Schema { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - BOOLEAN = 1, - BYTE = 2, - INT16 = 3, - INT32 = 4, - INT64 = 5, - FLOAT = 6, - DOUBLE = 7, - DECIMAL = 8, - STRING = 9, - BINARY = 10, - TIMESTAMP = 11, - DATE = 12, - TIME = 13, - RECORD = 14, - NULL = 100 - } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - REQUIRED = 1, - NULLABLE = 2, - REPEATED = 3 - } - - /** Properties of a SchemaField. */ - interface ISchemaField { - - /** SchemaField name */ - name?: (string|null); - - /** SchemaField description */ - description?: (string|null); - - /** SchemaField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); - - /** SchemaField mode */ - mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); - - /** SchemaField fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); - } - - /** Represents a SchemaField. */ - class SchemaField implements ISchemaField { - - /** - * Constructs a new SchemaField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); - - /** SchemaField name. */ - public name: string; - - /** SchemaField description. */ - public description: string; - - /** SchemaField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); - - /** SchemaField mode. */ - public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); - - /** SchemaField fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; - - /** - * Creates a new SchemaField instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaField instance - */ - public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; - - /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; - - /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; - - /** - * Verifies a SchemaField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; - - /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. - * @param message SchemaField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchemaField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PartitionField. */ - interface IPartitionField { - - /** PartitionField name */ - name?: (string|null); - - /** PartitionField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); - } - - /** Represents a PartitionField. */ - class PartitionField implements IPartitionField { - - /** - * Constructs a new PartitionField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); - - /** PartitionField name. */ - public name: string; - - /** PartitionField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); - - /** - * Creates a new PartitionField instance using the specified properties. - * @param [properties] Properties to set - * @returns PartitionField instance - */ - public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; - - /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PartitionField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; - - /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.PartitionField; - - /** - * Verifies a PartitionField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartitionField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; - - /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. - * @param message PartitionField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartitionField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PartitionField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** PartitionStyle enum. */ - enum PartitionStyle { - PARTITION_STYLE_UNSPECIFIED = 0, - HIVE_COMPATIBLE = 1 - } - } - - /** Properties of a StorageFormat. */ - interface IStorageFormat { - - /** StorageFormat format */ - format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); - - /** StorageFormat compressionFormat */ - compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); - - /** StorageFormat mimeType */ - mimeType?: (string|null); - - /** StorageFormat csv */ - csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); - - /** StorageFormat json */ - json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); - - /** StorageFormat iceberg */ - iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); - } - - /** Represents a StorageFormat. */ - class StorageFormat implements IStorageFormat { - - /** - * Constructs a new StorageFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); - - /** StorageFormat format. */ - public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); - - /** StorageFormat compressionFormat. */ - public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); - - /** StorageFormat mimeType. */ - public mimeType: string; - - /** StorageFormat csv. */ - public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); - - /** StorageFormat json. */ - public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); - - /** StorageFormat iceberg. */ - public iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); - - /** StorageFormat options. */ - public options?: ("csv"|"json"|"iceberg"); - - /** - * Creates a new StorageFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageFormat instance - */ - public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; - - /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat; - - /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat; - - /** - * Verifies a StorageFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageFormat - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; - - /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. - * @param message StorageFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StorageFormat { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions headerRows */ - headerRows?: (number|null); - - /** CsvOptions delimiter */ - delimiter?: (string|null); - - /** CsvOptions quote */ - quote?: (string|null); - } - - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { - - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions quote. */ - public quote: string; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Verifies a CsvOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); - } - - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { - - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; - - /** - * Verifies a JsonOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JsonOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IcebergOptions. */ - interface IIcebergOptions { - - /** IcebergOptions metadataLocation */ - metadataLocation?: (string|null); - } - - /** Represents an IcebergOptions. */ - class IcebergOptions implements IIcebergOptions { - - /** - * Constructs a new IcebergOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions); - - /** IcebergOptions metadataLocation. */ - public metadataLocation: string; - - /** - * Creates a new IcebergOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns IcebergOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; - - /** - * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @param message IcebergOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @param message IcebergOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IcebergOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; - - /** - * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; - - /** - * Verifies an IcebergOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IcebergOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; - - /** - * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. - * @param message IcebergOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.IcebergOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IcebergOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IcebergOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - PARQUET = 1, - AVRO = 2, - ORC = 3, - CSV = 100, - JSON = 101, - IMAGE = 200, - AUDIO = 201, - VIDEO = 202, - TEXT = 203, - TFRECORD = 204, - OTHER = 1000, - UNKNOWN = 1001 - } - - /** CompressionFormat enum. */ - enum CompressionFormat { - COMPRESSION_FORMAT_UNSPECIFIED = 0, - GZIP = 2, - BZIP2 = 3 - } - } - - /** Properties of a StorageAccess. */ - interface IStorageAccess { - - /** StorageAccess read */ - read?: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode|null); - } - - /** Represents a StorageAccess. */ - class StorageAccess implements IStorageAccess { - - /** - * Constructs a new StorageAccess. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IStorageAccess); - - /** StorageAccess read. */ - public read: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode); - - /** - * Creates a new StorageAccess instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageAccess instance - */ - public static create(properties?: google.cloud.dataplex.v1.IStorageAccess): google.cloud.dataplex.v1.StorageAccess; - - /** - * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. - * @param message StorageAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. - * @param message StorageAccess message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageAccess message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageAccess; - - /** - * Decodes a StorageAccess message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageAccess; - - /** - * Verifies a StorageAccess message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageAccess - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageAccess; - - /** - * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. - * @param message StorageAccess - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageAccess to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageAccess - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StorageAccess { - - /** AccessMode enum. */ - enum AccessMode { - ACCESS_MODE_UNSPECIFIED = 0, - DIRECT = 1, - MANAGED = 2 - } - } - - /** StorageSystem enum. */ - enum StorageSystem { - STORAGE_SYSTEM_UNSPECIFIED = 0, - CLOUD_STORAGE = 1, - BIGQUERY = 2 - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Struct - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Operations service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; - - /** - * Verifies an Operation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace 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-dataplex/v1/protos/protos.js b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js deleted file mode 100644 index bf450cf1bba..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.js +++ /dev/null @@ -1,114449 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_dataplex_protos || ($protobuf.roots._google_cloud_dataplex_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.dataplex = (function() { - - /** - * Namespace dataplex. - * @memberof google.cloud - * @namespace - */ - var dataplex = {}; - - dataplex.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.dataplex - * @namespace - */ - var v1 = {}; - - v1.Environment = (function() { - - /** - * Properties of an Environment. - * @memberof google.cloud.dataplex.v1 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {string|null} [displayName] Environment displayName - * @property {string|null} [uid] Environment uid - * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {Object.|null} [labels] Environment labels - * @property {string|null} [description] Environment description - * @property {google.cloud.dataplex.v1.State|null} [state] Environment state - * @property {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null} [infrastructureSpec] Environment infrastructureSpec - * @property {google.cloud.dataplex.v1.Environment.ISessionSpec|null} [sessionSpec] Environment sessionSpec - * @property {google.cloud.dataplex.v1.Environment.ISessionStatus|null} [sessionStatus] Environment sessionStatus - * @property {google.cloud.dataplex.v1.Environment.IEndpoints|null} [endpoints] Environment endpoints - */ - - /** - * Constructs a new Environment. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Environment. - * @implements IEnvironment - * @constructor - * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set - */ - function Environment(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Environment name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.displayName = ""; - - /** - * Environment uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.uid = ""; - - /** - * Environment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.createTime = null; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.updateTime = null; - - /** - * Environment labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.labels = $util.emptyObject; - - /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.description = ""; - - /** - * Environment state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.state = 0; - - /** - * Environment infrastructureSpec. - * @member {google.cloud.dataplex.v1.Environment.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.infrastructureSpec = null; - - /** - * Environment sessionSpec. - * @member {google.cloud.dataplex.v1.Environment.ISessionSpec|null|undefined} sessionSpec - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.sessionSpec = null; - - /** - * Environment sessionStatus. - * @member {google.cloud.dataplex.v1.Environment.ISessionStatus|null|undefined} sessionStatus - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.sessionStatus = null; - - /** - * Environment endpoints. - * @member {google.cloud.dataplex.v1.Environment.IEndpoints|null|undefined} endpoints - * @memberof google.cloud.dataplex.v1.Environment - * @instance - */ - Environment.prototype.endpoints = null; - - /** - * Creates a new Environment instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {google.cloud.dataplex.v1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment} Environment instance - */ - Environment.create = function create(properties) { - return new Environment(properties); - }; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.sessionSpec != null && Object.hasOwnProperty.call(message, "sessionSpec")) - $root.google.cloud.dataplex.v1.Environment.SessionSpec.encode(message.sessionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.sessionStatus != null && Object.hasOwnProperty.call(message, "sessionStatus")) - $root.google.cloud.dataplex.v1.Environment.SessionStatus.encode(message.sessionStatus, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.endpoints != null && Object.hasOwnProperty.call(message, "endpoints")) - $root.google.cloud.dataplex.v1.Environment.Endpoints.encode(message.endpoints, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {google.cloud.dataplex.v1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.uid = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - 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 7: { - message.description = reader.string(); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 100: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.decode(reader, reader.uint32()); - break; - } - case 102: { - message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.decode(reader, reader.uint32()); - break; - } - case 200: { - message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Environment message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Environment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) { - var error = $root.google.cloud.dataplex.v1.Environment.SessionSpec.verify(message.sessionSpec); - if (error) - return "sessionSpec." + error; - } - if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) { - var error = $root.google.cloud.dataplex.v1.Environment.SessionStatus.verify(message.sessionStatus); - if (error) - return "sessionStatus." + error; - } - if (message.endpoints != null && message.hasOwnProperty("endpoints")) { - var error = $root.google.cloud.dataplex.v1.Environment.Endpoints.verify(message.endpoints); - if (error) - return "endpoints." + error; - } - return null; - }; - - /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment} Environment - */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - if (object.sessionSpec != null) { - if (typeof object.sessionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.sessionSpec: object expected"); - message.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.fromObject(object.sessionSpec); - } - if (object.sessionStatus != null) { - if (typeof object.sessionStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.sessionStatus: object expected"); - message.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.fromObject(object.sessionStatus); - } - if (object.endpoints != null) { - if (typeof object.endpoints !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.endpoints: object expected"); - message.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.fromObject(object.endpoints); - } - return message; - }; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {google.cloud.dataplex.v1.Environment} message Environment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Environment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.infrastructureSpec = null; - object.sessionSpec = null; - object.sessionStatus = null; - object.endpoints = 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.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.sessionSpec != null && message.hasOwnProperty("sessionSpec")) - object.sessionSpec = $root.google.cloud.dataplex.v1.Environment.SessionSpec.toObject(message.sessionSpec, options); - if (message.sessionStatus != null && message.hasOwnProperty("sessionStatus")) - object.sessionStatus = $root.google.cloud.dataplex.v1.Environment.SessionStatus.toObject(message.sessionStatus, options); - if (message.endpoints != null && message.hasOwnProperty("endpoints")) - object.endpoints = $root.google.cloud.dataplex.v1.Environment.Endpoints.toObject(message.endpoints, options); - return object; - }; - - /** - * Converts this Environment to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment - * @instance - * @returns {Object.} JSON object - */ - Environment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Environment - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment"; - }; - - Environment.InfrastructureSpec = (function() { - - /** - * Properties of an InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Environment - * @interface IInfrastructureSpec - * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null} [compute] InfrastructureSpec compute - * @property {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null} [osImage] InfrastructureSpec osImage - */ - - /** - * Constructs a new InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Environment - * @classdesc Represents an InfrastructureSpec. - * @implements IInfrastructureSpec - * @constructor - * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set - */ - function InfrastructureSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InfrastructureSpec compute. - * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources|null|undefined} compute - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.compute = null; - - /** - * InfrastructureSpec osImage. - * @member {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime|null|undefined} osImage - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.osImage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InfrastructureSpec resources. - * @member {"compute"|undefined} resources - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "resources", { - get: $util.oneOfGetter($oneOfFields = ["compute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec runtime. - * @member {"osImage"|undefined} runtime - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "runtime", { - get: $util.oneOfGetter($oneOfFields = ["osImage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec instance - */ - InfrastructureSpec.create = function create(properties) { - return new InfrastructureSpec(properties); - }; - - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.compute != null && Object.hasOwnProperty.call(message, "compute")) - $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.encode(message.compute, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.osImage != null && Object.hasOwnProperty.call(message, "osImage")) - $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.encode(message.osImage, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 50: { - message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.decode(reader, reader.uint32()); - break; - } - case 100: { - message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InfrastructureSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InfrastructureSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.compute != null && message.hasOwnProperty("compute")) { - properties.resources = 1; - { - var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify(message.compute); - if (error) - return "compute." + error; - } - } - if (message.osImage != null && message.hasOwnProperty("osImage")) { - properties.runtime = 1; - { - var error = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify(message.osImage); - if (error) - return "osImage." + error; - } - } - return null; - }; - - /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec} InfrastructureSpec - */ - InfrastructureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec(); - if (object.compute != null) { - if (typeof object.compute !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.compute: object expected"); - message.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.fromObject(object.compute); - } - if (object.osImage != null) { - if (typeof object.osImage !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.osImage: object expected"); - message.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.fromObject(object.osImage); - } - return message; - }; - - /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec} message InfrastructureSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InfrastructureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.compute != null && message.hasOwnProperty("compute")) { - object.compute = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.toObject(message.compute, options); - if (options.oneofs) - object.resources = "compute"; - } - if (message.osImage != null && message.hasOwnProperty("osImage")) { - object.osImage = $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.toObject(message.osImage, options); - if (options.oneofs) - object.runtime = "osImage"; - } - return object; - }; - - /** - * Converts this InfrastructureSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @instance - * @returns {Object.} JSON object - */ - InfrastructureSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InfrastructureSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec"; - }; - - InfrastructureSpec.ComputeResources = (function() { - - /** - * Properties of a ComputeResources. - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @interface IComputeResources - * @property {number|null} [diskSizeGb] ComputeResources diskSizeGb - * @property {number|null} [nodeCount] ComputeResources nodeCount - * @property {number|null} [maxNodeCount] ComputeResources maxNodeCount - */ - - /** - * Constructs a new ComputeResources. - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @classdesc Represents a ComputeResources. - * @implements IComputeResources - * @constructor - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set - */ - function ComputeResources(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeResources diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @instance - */ - ComputeResources.prototype.diskSizeGb = 0; - - /** - * ComputeResources nodeCount. - * @member {number} nodeCount - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @instance - */ - ComputeResources.prototype.nodeCount = 0; - - /** - * ComputeResources maxNodeCount. - * @member {number} maxNodeCount - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @instance - */ - ComputeResources.prototype.maxNodeCount = 0; - - /** - * Creates a new ComputeResources instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources instance - */ - ComputeResources.create = function create(properties) { - return new ComputeResources(properties); - }; - - /** - * Encodes the specified ComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeResources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.diskSizeGb); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nodeCount); - if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxNodeCount); - return writer; - }; - - /** - * Encodes the specified ComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IComputeResources} message ComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeResources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeResources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeResources.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskSizeGb = reader.int32(); - break; - } - case 2: { - message.nodeCount = reader.int32(); - break; - } - case 3: { - message.maxNodeCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeResources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeResources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeResources message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeResources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - if (!$util.isInteger(message.maxNodeCount)) - return "maxNodeCount: integer expected"; - return null; - }; - - /** - * Creates a ComputeResources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} ComputeResources - */ - ComputeResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources(); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.maxNodeCount != null) - message.maxNodeCount = object.maxNodeCount | 0; - return message; - }; - - /** - * Creates a plain object from a ComputeResources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources} message ComputeResources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.diskSizeGb = 0; - object.nodeCount = 0; - object.maxNodeCount = 0; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - object.maxNodeCount = message.maxNodeCount; - return object; - }; - - /** - * Converts this ComputeResources to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @instance - * @returns {Object.} JSON object - */ - ComputeResources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeResources - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"; - }; - - return ComputeResources; - })(); - - InfrastructureSpec.OsImageRuntime = (function() { - - /** - * Properties of an OsImageRuntime. - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @interface IOsImageRuntime - * @property {string|null} [imageVersion] OsImageRuntime imageVersion - * @property {Array.|null} [javaLibraries] OsImageRuntime javaLibraries - * @property {Array.|null} [pythonPackages] OsImageRuntime pythonPackages - * @property {Object.|null} [properties] OsImageRuntime properties - */ - - /** - * Constructs a new OsImageRuntime. - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec - * @classdesc Represents an OsImageRuntime. - * @implements IOsImageRuntime - * @constructor - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set - */ - function OsImageRuntime(properties) { - this.javaLibraries = []; - this.pythonPackages = []; - this.properties = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OsImageRuntime imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @instance - */ - OsImageRuntime.prototype.imageVersion = ""; - - /** - * OsImageRuntime javaLibraries. - * @member {Array.} javaLibraries - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @instance - */ - OsImageRuntime.prototype.javaLibraries = $util.emptyArray; - - /** - * OsImageRuntime pythonPackages. - * @member {Array.} pythonPackages - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @instance - */ - OsImageRuntime.prototype.pythonPackages = $util.emptyArray; - - /** - * OsImageRuntime properties. - * @member {Object.} properties - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @instance - */ - OsImageRuntime.prototype.properties = $util.emptyObject; - - /** - * Creates a new OsImageRuntime instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime instance - */ - OsImageRuntime.create = function create(properties) { - return new OsImageRuntime(properties); - }; - - /** - * Encodes the specified OsImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OsImageRuntime.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); - if (message.javaLibraries != null && message.javaLibraries.length) - for (var i = 0; i < message.javaLibraries.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaLibraries[i]); - if (message.pythonPackages != null && message.pythonPackages.length) - for (var i = 0; i < message.pythonPackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); - if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified OsImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.IOsImageRuntime} message OsImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OsImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OsImageRuntime message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OsImageRuntime.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageVersion = reader.string(); - break; - } - case 2: { - if (!(message.javaLibraries && message.javaLibraries.length)) - message.javaLibraries = []; - message.javaLibraries.push(reader.string()); - break; - } - case 3: { - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - } - case 4: { - if (message.properties === $util.emptyObject) - message.properties = {}; - 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.properties[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OsImageRuntime message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OsImageRuntime.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OsImageRuntime message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OsImageRuntime.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - if (message.javaLibraries != null && message.hasOwnProperty("javaLibraries")) { - if (!Array.isArray(message.javaLibraries)) - return "javaLibraries: array expected"; - for (var i = 0; i < message.javaLibraries.length; ++i) - if (!$util.isString(message.javaLibraries[i])) - return "javaLibraries: string[] expected"; - } - if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { - if (!Array.isArray(message.pythonPackages)) - return "pythonPackages: array expected"; - for (var i = 0; i < message.pythonPackages.length; ++i) - if (!$util.isString(message.pythonPackages[i])) - return "pythonPackages: string[] expected"; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.properties[key[i]])) - return "properties: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an OsImageRuntime message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} OsImageRuntime - */ - OsImageRuntime.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime(); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - if (object.javaLibraries) { - if (!Array.isArray(object.javaLibraries)) - throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.javaLibraries: array expected"); - message.javaLibraries = []; - for (var i = 0; i < object.javaLibraries.length; ++i) - message.javaLibraries[i] = String(object.javaLibraries[i]); - } - if (object.pythonPackages) { - if (!Array.isArray(object.pythonPackages)) - throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.pythonPackages: array expected"); - message.pythonPackages = []; - for (var i = 0; i < object.pythonPackages.length; ++i) - message.pythonPackages[i] = String(object.pythonPackages[i]); - } - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) - message.properties[keys[i]] = String(object.properties[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an OsImageRuntime message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime} message OsImageRuntime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OsImageRuntime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.javaLibraries = []; - object.pythonPackages = []; - } - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - object.imageVersion = ""; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - if (message.javaLibraries && message.javaLibraries.length) { - object.javaLibraries = []; - for (var j = 0; j < message.javaLibraries.length; ++j) - object.javaLibraries[j] = message.javaLibraries[j]; - } - if (message.pythonPackages && message.pythonPackages.length) { - object.pythonPackages = []; - for (var j = 0; j < message.pythonPackages.length; ++j) - object.pythonPackages[j] = message.pythonPackages[j]; - } - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = message.properties[keys2[j]]; - } - return object; - }; - - /** - * Converts this OsImageRuntime to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @instance - * @returns {Object.} JSON object - */ - OsImageRuntime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OsImageRuntime - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OsImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"; - }; - - return OsImageRuntime; - })(); - - return InfrastructureSpec; - })(); - - Environment.SessionSpec = (function() { - - /** - * Properties of a SessionSpec. - * @memberof google.cloud.dataplex.v1.Environment - * @interface ISessionSpec - * @property {google.protobuf.IDuration|null} [maxIdleDuration] SessionSpec maxIdleDuration - * @property {boolean|null} [enableFastStartup] SessionSpec enableFastStartup - */ - - /** - * Constructs a new SessionSpec. - * @memberof google.cloud.dataplex.v1.Environment - * @classdesc Represents a SessionSpec. - * @implements ISessionSpec - * @constructor - * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set - */ - function SessionSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionSpec maxIdleDuration. - * @member {google.protobuf.IDuration|null|undefined} maxIdleDuration - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @instance - */ - SessionSpec.prototype.maxIdleDuration = null; - - /** - * SessionSpec enableFastStartup. - * @member {boolean} enableFastStartup - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @instance - */ - SessionSpec.prototype.enableFastStartup = false; - - /** - * Creates a new SessionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec instance - */ - SessionSpec.create = function create(properties) { - return new SessionSpec(properties); - }; - - /** - * Encodes the specified SessionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxIdleDuration != null && Object.hasOwnProperty.call(message, "maxIdleDuration")) - $root.google.protobuf.Duration.encode(message.maxIdleDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.enableFastStartup != null && Object.hasOwnProperty.call(message, "enableFastStartup")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableFastStartup); - return writer; - }; - - /** - * Encodes the specified SessionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionSpec} message SessionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxIdleDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.enableFastStartup = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) { - var error = $root.google.protobuf.Duration.verify(message.maxIdleDuration); - if (error) - return "maxIdleDuration." + error; - } - if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) - if (typeof message.enableFastStartup !== "boolean") - return "enableFastStartup: boolean expected"; - return null; - }; - - /** - * Creates a SessionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.SessionSpec} SessionSpec - */ - SessionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.SessionSpec(); - if (object.maxIdleDuration != null) { - if (typeof object.maxIdleDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.Environment.SessionSpec.maxIdleDuration: object expected"); - message.maxIdleDuration = $root.google.protobuf.Duration.fromObject(object.maxIdleDuration); - } - if (object.enableFastStartup != null) - message.enableFastStartup = Boolean(object.enableFastStartup); - return message; - }; - - /** - * Creates a plain object from a SessionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {google.cloud.dataplex.v1.Environment.SessionSpec} message SessionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.maxIdleDuration = null; - object.enableFastStartup = false; - } - if (message.maxIdleDuration != null && message.hasOwnProperty("maxIdleDuration")) - object.maxIdleDuration = $root.google.protobuf.Duration.toObject(message.maxIdleDuration, options); - if (message.enableFastStartup != null && message.hasOwnProperty("enableFastStartup")) - object.enableFastStartup = message.enableFastStartup; - return object; - }; - - /** - * Converts this SessionSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @instance - * @returns {Object.} JSON object - */ - SessionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.SessionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionSpec"; - }; - - return SessionSpec; - })(); - - Environment.SessionStatus = (function() { - - /** - * Properties of a SessionStatus. - * @memberof google.cloud.dataplex.v1.Environment - * @interface ISessionStatus - * @property {boolean|null} [active] SessionStatus active - */ - - /** - * Constructs a new SessionStatus. - * @memberof google.cloud.dataplex.v1.Environment - * @classdesc Represents a SessionStatus. - * @implements ISessionStatus - * @constructor - * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set - */ - function SessionStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionStatus active. - * @member {boolean} active - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @instance - */ - SessionStatus.prototype.active = false; - - /** - * Creates a new SessionStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus instance - */ - SessionStatus.create = function create(properties) { - return new SessionStatus(properties); - }; - - /** - * Encodes the specified SessionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.active != null && Object.hasOwnProperty.call(message, "active")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.active); - return writer; - }; - - /** - * Encodes the specified SessionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.SessionStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {google.cloud.dataplex.v1.Environment.ISessionStatus} message SessionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.active = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.active != null && message.hasOwnProperty("active")) - if (typeof message.active !== "boolean") - return "active: boolean expected"; - return null; - }; - - /** - * Creates a SessionStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.SessionStatus} SessionStatus - */ - SessionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.SessionStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.SessionStatus(); - if (object.active != null) - message.active = Boolean(object.active); - return message; - }; - - /** - * Creates a plain object from a SessionStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {google.cloud.dataplex.v1.Environment.SessionStatus} message SessionStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.active = false; - if (message.active != null && message.hasOwnProperty("active")) - object.active = message.active; - return object; - }; - - /** - * Converts this SessionStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @instance - * @returns {Object.} JSON object - */ - SessionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.SessionStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.SessionStatus"; - }; - - return SessionStatus; - })(); - - Environment.Endpoints = (function() { - - /** - * Properties of an Endpoints. - * @memberof google.cloud.dataplex.v1.Environment - * @interface IEndpoints - * @property {string|null} [notebooks] Endpoints notebooks - * @property {string|null} [sql] Endpoints sql - */ - - /** - * Constructs a new Endpoints. - * @memberof google.cloud.dataplex.v1.Environment - * @classdesc Represents an Endpoints. - * @implements IEndpoints - * @constructor - * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set - */ - function Endpoints(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Endpoints notebooks. - * @member {string} notebooks - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @instance - */ - Endpoints.prototype.notebooks = ""; - - /** - * Endpoints sql. - * @member {string} sql - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @instance - */ - Endpoints.prototype.sql = ""; - - /** - * Creates a new Endpoints instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {google.cloud.dataplex.v1.Environment.IEndpoints=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints instance - */ - Endpoints.create = function create(properties) { - return new Endpoints(properties); - }; - - /** - * Encodes the specified Endpoints message. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.notebooks != null && Object.hasOwnProperty.call(message, "notebooks")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.notebooks); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sql); - return writer; - }; - - /** - * Encodes the specified Endpoints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Environment.Endpoints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {google.cloud.dataplex.v1.Environment.IEndpoints} message Endpoints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Endpoints message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.notebooks = reader.string(); - break; - } - case 2: { - message.sql = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Endpoints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Endpoints message. - * @function verify - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Endpoints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.notebooks != null && message.hasOwnProperty("notebooks")) - if (!$util.isString(message.notebooks)) - return "notebooks: string expected"; - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; - return null; - }; - - /** - * Creates an Endpoints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Environment.Endpoints} Endpoints - */ - Endpoints.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Environment.Endpoints) - return object; - var message = new $root.google.cloud.dataplex.v1.Environment.Endpoints(); - if (object.notebooks != null) - message.notebooks = String(object.notebooks); - if (object.sql != null) - message.sql = String(object.sql); - return message; - }; - - /** - * Creates a plain object from an Endpoints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {google.cloud.dataplex.v1.Environment.Endpoints} message Endpoints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Endpoints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.notebooks = ""; - object.sql = ""; - } - if (message.notebooks != null && message.hasOwnProperty("notebooks")) - object.notebooks = message.notebooks; - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; - return object; - }; - - /** - * Converts this Endpoints to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @instance - * @returns {Object.} JSON object - */ - Endpoints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Endpoints - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Environment.Endpoints - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Endpoints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Environment.Endpoints"; - }; - - return Endpoints; - })(); - - return Environment; - })(); - - v1.Content = (function() { - - /** - * Properties of a Content. - * @memberof google.cloud.dataplex.v1 - * @interface IContent - * @property {string|null} [name] Content name - * @property {string|null} [uid] Content uid - * @property {string|null} [path] Content path - * @property {google.protobuf.ITimestamp|null} [createTime] Content createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Content updateTime - * @property {Object.|null} [labels] Content labels - * @property {string|null} [description] Content description - * @property {string|null} [dataText] Content dataText - * @property {google.cloud.dataplex.v1.Content.ISqlScript|null} [sqlScript] Content sqlScript - * @property {google.cloud.dataplex.v1.Content.INotebook|null} [notebook] Content notebook - */ - - /** - * Constructs a new Content. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Content. - * @implements IContent - * @constructor - * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set - */ - function Content(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]]; - } - - /** - * Content name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.name = ""; - - /** - * Content uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.uid = ""; - - /** - * Content path. - * @member {string} path - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.path = ""; - - /** - * Content createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.createTime = null; - - /** - * Content updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.updateTime = null; - - /** - * Content labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.labels = $util.emptyObject; - - /** - * Content description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.description = ""; - - /** - * Content dataText. - * @member {string|null|undefined} dataText - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.dataText = null; - - /** - * Content sqlScript. - * @member {google.cloud.dataplex.v1.Content.ISqlScript|null|undefined} sqlScript - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.sqlScript = null; - - /** - * Content notebook. - * @member {google.cloud.dataplex.v1.Content.INotebook|null|undefined} notebook - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Content.prototype.notebook = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Content data. - * @member {"dataText"|undefined} data - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Object.defineProperty(Content.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["dataText"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Content content. - * @member {"sqlScript"|"notebook"|undefined} content - * @memberof google.cloud.dataplex.v1.Content - * @instance - */ - Object.defineProperty(Content.prototype, "content", { - get: $util.oneOfGetter($oneOfFields = ["sqlScript", "notebook"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Content instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {google.cloud.dataplex.v1.IContent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Content} Content instance - */ - Content.create = function create(properties) { - return new Content(properties); - }; - - /** - * Encodes the specified Content message. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.dataText != null && Object.hasOwnProperty.call(message, "dataText")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataText); - if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) - $root.google.cloud.dataplex.v1.Content.SqlScript.encode(message.sqlScript, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - $root.google.cloud.dataplex.v1.Content.Notebook.encode(message.notebook, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {google.cloud.dataplex.v1.IContent} message Content message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Content.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Content message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.path = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - 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 7: { - message.description = reader.string(); - break; - } - case 9: { - message.dataText = reader.string(); - break; - } - case 100: { - message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.decode(reader, reader.uint32()); - break; - } - case 101: { - message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Content message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Content} Content - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Content.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Content message. - * @function verify - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Content.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.dataText != null && message.hasOwnProperty("dataText")) { - properties.data = 1; - if (!$util.isString(message.dataText)) - return "dataText: string expected"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - properties.content = 1; - { - var error = $root.google.cloud.dataplex.v1.Content.SqlScript.verify(message.sqlScript); - if (error) - return "sqlScript." + error; - } - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - if (properties.content === 1) - return "content: multiple values"; - properties.content = 1; - { - var error = $root.google.cloud.dataplex.v1.Content.Notebook.verify(message.notebook); - if (error) - return "notebook." + error; - } - } - return null; - }; - - /** - * Creates a Content message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Content} Content - */ - Content.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Content) - return object; - var message = new $root.google.cloud.dataplex.v1.Content(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.path != null) - message.path = String(object.path); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Content.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.dataplex.v1.Content.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Content.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - if (object.dataText != null) - message.dataText = String(object.dataText); - if (object.sqlScript != null) { - if (typeof object.sqlScript !== "object") - throw TypeError(".google.cloud.dataplex.v1.Content.sqlScript: object expected"); - message.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.fromObject(object.sqlScript); - } - if (object.notebook != null) { - if (typeof object.notebook !== "object") - throw TypeError(".google.cloud.dataplex.v1.Content.notebook: object expected"); - message.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.fromObject(object.notebook); - } - return message; - }; - - /** - * Creates a plain object from a Content message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {google.cloud.dataplex.v1.Content} message Content - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Content.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.path = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dataText != null && message.hasOwnProperty("dataText")) { - object.dataText = message.dataText; - if (options.oneofs) - object.data = "dataText"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - object.sqlScript = $root.google.cloud.dataplex.v1.Content.SqlScript.toObject(message.sqlScript, options); - if (options.oneofs) - object.content = "sqlScript"; - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - object.notebook = $root.google.cloud.dataplex.v1.Content.Notebook.toObject(message.notebook, options); - if (options.oneofs) - object.content = "notebook"; - } - return object; - }; - - /** - * Converts this Content to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Content - * @instance - * @returns {Object.} JSON object - */ - Content.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Content - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Content - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Content"; - }; - - Content.SqlScript = (function() { - - /** - * Properties of a SqlScript. - * @memberof google.cloud.dataplex.v1.Content - * @interface ISqlScript - * @property {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine|null} [engine] SqlScript engine - */ - - /** - * Constructs a new SqlScript. - * @memberof google.cloud.dataplex.v1.Content - * @classdesc Represents a SqlScript. - * @implements ISqlScript - * @constructor - * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set - */ - function SqlScript(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlScript engine. - * @member {google.cloud.dataplex.v1.Content.SqlScript.QueryEngine} engine - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @instance - */ - SqlScript.prototype.engine = 0; - - /** - * Creates a new SqlScript instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {google.cloud.dataplex.v1.Content.ISqlScript=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript instance - */ - SqlScript.create = function create(properties) { - return new SqlScript(properties); - }; - - /** - * Encodes the specified SqlScript message. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlScript.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.engine); - return writer; - }; - - /** - * Encodes the specified SqlScript message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.SqlScript.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {google.cloud.dataplex.v1.Content.ISqlScript} message SqlScript message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlScript.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlScript message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlScript.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.engine = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlScript message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlScript.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlScript message. - * @function verify - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlScript.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - switch (message.engine) { - default: - return "engine: enum value expected"; - case 0: - case 2: - break; - } - return null; - }; - - /** - * Creates a SqlScript message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Content.SqlScript} SqlScript - */ - SqlScript.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Content.SqlScript) - return object; - var message = new $root.google.cloud.dataplex.v1.Content.SqlScript(); - switch (object.engine) { - default: - if (typeof object.engine === "number") { - message.engine = object.engine; - break; - } - break; - case "QUERY_ENGINE_UNSPECIFIED": - case 0: - message.engine = 0; - break; - case "SPARK": - case 2: - message.engine = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SqlScript message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {google.cloud.dataplex.v1.Content.SqlScript} message SqlScript - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlScript.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.engine = options.enums === String ? "QUERY_ENGINE_UNSPECIFIED" : 0; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.Content.SqlScript.QueryEngine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.Content.SqlScript.QueryEngine[message.engine] : message.engine; - return object; - }; - - /** - * Converts this SqlScript to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @instance - * @returns {Object.} JSON object - */ - SqlScript.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlScript - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Content.SqlScript - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlScript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.SqlScript"; - }; - - /** - * QueryEngine enum. - * @name google.cloud.dataplex.v1.Content.SqlScript.QueryEngine - * @enum {number} - * @property {number} QUERY_ENGINE_UNSPECIFIED=0 QUERY_ENGINE_UNSPECIFIED value - * @property {number} SPARK=2 SPARK value - */ - SqlScript.QueryEngine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "QUERY_ENGINE_UNSPECIFIED"] = 0; - values[valuesById[2] = "SPARK"] = 2; - return values; - })(); - - return SqlScript; - })(); - - Content.Notebook = (function() { - - /** - * Properties of a Notebook. - * @memberof google.cloud.dataplex.v1.Content - * @interface INotebook - * @property {google.cloud.dataplex.v1.Content.Notebook.KernelType|null} [kernelType] Notebook kernelType - */ - - /** - * Constructs a new Notebook. - * @memberof google.cloud.dataplex.v1.Content - * @classdesc Represents a Notebook. - * @implements INotebook - * @constructor - * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set - */ - function Notebook(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Notebook kernelType. - * @member {google.cloud.dataplex.v1.Content.Notebook.KernelType} kernelType - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @instance - */ - Notebook.prototype.kernelType = 0; - - /** - * Creates a new Notebook instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {google.cloud.dataplex.v1.Content.INotebook=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook instance - */ - Notebook.create = function create(properties) { - return new Notebook(properties); - }; - - /** - * Encodes the specified Notebook message. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Notebook.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kernelType != null && Object.hasOwnProperty.call(message, "kernelType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kernelType); - return writer; - }; - - /** - * Encodes the specified Notebook message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Content.Notebook.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {google.cloud.dataplex.v1.Content.INotebook} message Notebook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Notebook.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Notebook message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Notebook.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Content.Notebook(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kernelType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Notebook message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Notebook.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Notebook message. - * @function verify - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Notebook.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kernelType != null && message.hasOwnProperty("kernelType")) - switch (message.kernelType) { - default: - return "kernelType: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Notebook message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Content.Notebook} Notebook - */ - Notebook.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Content.Notebook) - return object; - var message = new $root.google.cloud.dataplex.v1.Content.Notebook(); - switch (object.kernelType) { - default: - if (typeof object.kernelType === "number") { - message.kernelType = object.kernelType; - break; - } - break; - case "KERNEL_TYPE_UNSPECIFIED": - case 0: - message.kernelType = 0; - break; - case "PYTHON3": - case 1: - message.kernelType = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a Notebook message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {google.cloud.dataplex.v1.Content.Notebook} message Notebook - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Notebook.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kernelType = options.enums === String ? "KERNEL_TYPE_UNSPECIFIED" : 0; - if (message.kernelType != null && message.hasOwnProperty("kernelType")) - object.kernelType = options.enums === String ? $root.google.cloud.dataplex.v1.Content.Notebook.KernelType[message.kernelType] === undefined ? message.kernelType : $root.google.cloud.dataplex.v1.Content.Notebook.KernelType[message.kernelType] : message.kernelType; - return object; - }; - - /** - * Converts this Notebook to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @instance - * @returns {Object.} JSON object - */ - Notebook.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Notebook - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Content.Notebook - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Notebook.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Content.Notebook"; - }; - - /** - * KernelType enum. - * @name google.cloud.dataplex.v1.Content.Notebook.KernelType - * @enum {number} - * @property {number} KERNEL_TYPE_UNSPECIFIED=0 KERNEL_TYPE_UNSPECIFIED value - * @property {number} PYTHON3=1 PYTHON3 value - */ - Notebook.KernelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KERNEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PYTHON3"] = 1; - return values; - })(); - - return Notebook; - })(); - - return Content; - })(); - - v1.Session = (function() { - - /** - * Properties of a Session. - * @memberof google.cloud.dataplex.v1 - * @interface ISession - * @property {string|null} [name] Session name - * @property {string|null} [userId] Session userId - * @property {google.protobuf.ITimestamp|null} [createTime] Session createTime - * @property {google.cloud.dataplex.v1.State|null} [state] Session state - */ - - /** - * Constructs a new Session. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Session. - * @implements ISession - * @constructor - * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set - */ - function Session(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Session name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Session - * @instance - */ - Session.prototype.name = ""; - - /** - * Session userId. - * @member {string} userId - * @memberof google.cloud.dataplex.v1.Session - * @instance - */ - Session.prototype.userId = ""; - - /** - * Session createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Session - * @instance - */ - Session.prototype.createTime = null; - - /** - * Session state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Session - * @instance - */ - Session.prototype.state = 0; - - /** - * Creates a new Session instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {google.cloud.dataplex.v1.ISession=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Session} Session instance - */ - Session.create = function create(properties) { - return new Session(properties); - }; - - /** - * Encodes the specified Session message. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Session.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - return writer; - }; - - /** - * Encodes the specified Session message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Session.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {google.cloud.dataplex.v1.ISession} message Session message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Session.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Session message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Session} Session - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Session.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Session(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.userId = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Session message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Session} Session - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Session.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Session message. - * @function verify - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Session.verify = function verify(message) { - if (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.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a Session message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Session} Session - */ - Session.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Session) - return object; - var message = new $root.google.cloud.dataplex.v1.Session(); - if (object.name != null) - message.name = String(object.name); - if (object.userId != null) - message.userId = String(object.userId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Session.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a Session message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {google.cloud.dataplex.v1.Session} message Session - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Session.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.userId = ""; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - return object; - }; - - /** - * Converts this Session to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Session - * @instance - * @returns {Object.} JSON object - */ - Session.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Session - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Session - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Session.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Session"; - }; - - return Session; - })(); - - v1.Lake = (function() { - - /** - * Properties of a Lake. - * @memberof google.cloud.dataplex.v1 - * @interface ILake - * @property {string|null} [name] Lake name - * @property {string|null} [displayName] Lake displayName - * @property {string|null} [uid] Lake uid - * @property {google.protobuf.ITimestamp|null} [createTime] Lake createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Lake updateTime - * @property {Object.|null} [labels] Lake labels - * @property {string|null} [description] Lake description - * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] Lake state - * @property {string|null} [serviceAccount] Lake serviceAccount - * @property {google.cloud.dataplex.v1.Lake.IMetastore|null} [metastore] Lake metastore - * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Lake assetStatus - * @property {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null} [metastoreStatus] Lake metastoreStatus - */ - - /** - * Constructs a new Lake. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Lake. - * @implements ILake - * @constructor - * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set - */ - function Lake(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]]; - } - - /** - * Lake name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.name = ""; - - /** - * Lake displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.displayName = ""; - - /** - * Lake uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.uid = ""; - - /** - * Lake createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.createTime = null; - - /** - * Lake updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.updateTime = null; - - /** - * Lake labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.labels = $util.emptyObject; - - /** - * Lake description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.description = ""; - - /** - * Lake state. - * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.state = 0; - - /** - * Lake serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.serviceAccount = ""; - - /** - * Lake metastore. - * @member {google.cloud.dataplex.v1.Lake.IMetastore|null|undefined} metastore - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.metastore = null; - - /** - * Lake assetStatus. - * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.assetStatus = null; - - /** - * Lake metastoreStatus. - * @member {google.cloud.dataplex.v1.Lake.IMetastoreStatus|null|undefined} metastoreStatus - * @memberof google.cloud.dataplex.v1.Lake - * @instance - */ - Lake.prototype.metastoreStatus = null; - - /** - * Creates a new Lake instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake} Lake instance - */ - Lake.create = function create(properties) { - return new Lake(properties); - }; - - /** - * Encodes the specified Lake message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Lake.encode = function encode(message, writer) { - if (!writer) - 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - if (message.metastore != null && Object.hasOwnProperty.call(message, "metastore")) - $root.google.cloud.dataplex.v1.Lake.Metastore.encode(message.metastore, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) - $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.metastoreStatus != null && Object.hasOwnProperty.call(message, "metastoreStatus")) - $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.encode(message.metastoreStatus, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Lake message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.ILake} message Lake message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Lake.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Lake message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake} Lake - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Lake.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake(), 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: { - message.uid = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - 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 7: { - message.description = reader.string(); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 9: { - message.serviceAccount = reader.string(); - break; - } - case 102: { - message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.decode(reader, reader.uint32()); - break; - } - case 103: { - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); - break; - } - case 104: { - message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Lake message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake} Lake - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Lake.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Lake message. - * @function verify - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Lake.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.metastore != null && message.hasOwnProperty("metastore")) { - var error = $root.google.cloud.dataplex.v1.Lake.Metastore.verify(message.metastore); - if (error) - return "metastore." + error; - } - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { - var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); - if (error) - return "assetStatus." + error; - } - if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) { - var error = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.verify(message.metastoreStatus); - if (error) - return "metastoreStatus." + error; - } - return null; - }; - - /** - * Creates a Lake message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake} Lake - */ - Lake.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake) - return object; - var message = new $root.google.cloud.dataplex.v1.Lake(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.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.dataplex.v1.Lake.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "NONE": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.metastore != null) { - if (typeof object.metastore !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.metastore: object expected"); - message.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.fromObject(object.metastore); - } - if (object.assetStatus != null) { - if (typeof object.assetStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.assetStatus: object expected"); - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); - } - if (object.metastoreStatus != null) { - if (typeof object.metastoreStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.metastoreStatus: object expected"); - message.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.fromObject(object.metastoreStatus); - } - return message; - }; - - /** - * Creates a plain object from a Lake message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {google.cloud.dataplex.v1.Lake} message Lake - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Lake.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.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.serviceAccount = ""; - object.metastore = null; - object.assetStatus = null; - object.metastoreStatus = 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.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.metastore != null && message.hasOwnProperty("metastore")) - object.metastore = $root.google.cloud.dataplex.v1.Lake.Metastore.toObject(message.metastore, options); - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) - object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); - if (message.metastoreStatus != null && message.hasOwnProperty("metastoreStatus")) - object.metastoreStatus = $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.toObject(message.metastoreStatus, options); - return object; - }; - - /** - * Converts this Lake to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake - * @instance - * @returns {Object.} JSON object - */ - Lake.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Lake - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Lake - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Lake.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake"; - }; - - Lake.Metastore = (function() { - - /** - * Properties of a Metastore. - * @memberof google.cloud.dataplex.v1.Lake - * @interface IMetastore - * @property {string|null} [service] Metastore service - */ - - /** - * Constructs a new Metastore. - * @memberof google.cloud.dataplex.v1.Lake - * @classdesc Represents a Metastore. - * @implements IMetastore - * @constructor - * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set - */ - function Metastore(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metastore service. - * @member {string} service - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @instance - */ - Metastore.prototype.service = ""; - - /** - * Creates a new Metastore instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore instance - */ - Metastore.create = function create(properties) { - return new Metastore(properties); - }; - - /** - * Encodes the specified Metastore message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metastore.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); - return writer; - }; - - /** - * Encodes the specified Metastore message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.Metastore.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastore} message Metastore message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metastore.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metastore message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metastore.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metastore message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metastore.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metastore message. - * @function verify - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metastore.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"; - return null; - }; - - /** - * Creates a Metastore message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake.Metastore} Metastore - */ - Metastore.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake.Metastore) - return object; - var message = new $root.google.cloud.dataplex.v1.Lake.Metastore(); - if (object.service != null) - message.service = String(object.service); - return message; - }; - - /** - * Creates a plain object from a Metastore message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {google.cloud.dataplex.v1.Lake.Metastore} message Metastore - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metastore.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - return object; - }; - - /** - * Converts this Metastore to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @instance - * @returns {Object.} JSON object - */ - Metastore.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metastore - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Lake.Metastore - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metastore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.Metastore"; - }; - - return Metastore; - })(); - - Lake.MetastoreStatus = (function() { - - /** - * Properties of a MetastoreStatus. - * @memberof google.cloud.dataplex.v1.Lake - * @interface IMetastoreStatus - * @property {google.cloud.dataplex.v1.Lake.MetastoreStatus.State|null} [state] MetastoreStatus state - * @property {string|null} [message] MetastoreStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] MetastoreStatus updateTime - * @property {string|null} [endpoint] MetastoreStatus endpoint - */ - - /** - * Constructs a new MetastoreStatus. - * @memberof google.cloud.dataplex.v1.Lake - * @classdesc Represents a MetastoreStatus. - * @implements IMetastoreStatus - * @constructor - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set - */ - function MetastoreStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetastoreStatus state. - * @member {google.cloud.dataplex.v1.Lake.MetastoreStatus.State} state - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @instance - */ - MetastoreStatus.prototype.state = 0; - - /** - * MetastoreStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @instance - */ - MetastoreStatus.prototype.message = ""; - - /** - * MetastoreStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @instance - */ - MetastoreStatus.prototype.updateTime = null; - - /** - * MetastoreStatus endpoint. - * @member {string} endpoint - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @instance - */ - MetastoreStatus.prototype.endpoint = ""; - - /** - * Creates a new MetastoreStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus instance - */ - MetastoreStatus.create = function create(properties) { - return new MetastoreStatus(properties); - }; - - /** - * Encodes the specified MetastoreStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetastoreStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpoint); - return writer; - }; - - /** - * Encodes the specified MetastoreStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Lake.MetastoreStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {google.cloud.dataplex.v1.Lake.IMetastoreStatus} message MetastoreStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetastoreStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetastoreStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetastoreStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endpoint = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetastoreStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetastoreStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetastoreStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetastoreStatus.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.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - return null; - }; - - /** - * Creates a MetastoreStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Lake.MetastoreStatus} MetastoreStatus - */ - MetastoreStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Lake.MetastoreStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Lake.MetastoreStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "NONE": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Lake.MetastoreStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - return message; - }; - - /** - * Creates a plain object from a MetastoreStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {google.cloud.dataplex.v1.Lake.MetastoreStatus} message MetastoreStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetastoreStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - object.endpoint = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Lake.MetastoreStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - return object; - }; - - /** - * Converts this MetastoreStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @instance - * @returns {Object.} JSON object - */ - MetastoreStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetastoreStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Lake.MetastoreStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetastoreStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Lake.MetastoreStatus"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.Lake.MetastoreStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} ERROR=4 ERROR value - */ - MetastoreStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return MetastoreStatus; - })(); - - return Lake; - })(); - - v1.AssetStatus = (function() { - - /** - * Properties of an AssetStatus. - * @memberof google.cloud.dataplex.v1 - * @interface IAssetStatus - * @property {google.protobuf.ITimestamp|null} [updateTime] AssetStatus updateTime - * @property {number|null} [activeAssets] AssetStatus activeAssets - * @property {number|null} [securityPolicyApplyingAssets] AssetStatus securityPolicyApplyingAssets - */ - - /** - * Constructs a new AssetStatus. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an AssetStatus. - * @implements IAssetStatus - * @constructor - * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set - */ - function AssetStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AssetStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.updateTime = null; - - /** - * AssetStatus activeAssets. - * @member {number} activeAssets - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.activeAssets = 0; - - /** - * AssetStatus securityPolicyApplyingAssets. - * @member {number} securityPolicyApplyingAssets - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - */ - AssetStatus.prototype.securityPolicyApplyingAssets = 0; - - /** - * Creates a new AssetStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus instance - */ - AssetStatus.create = function create(properties) { - return new AssetStatus(properties); - }; - - /** - * Encodes the specified AssetStatus message. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetStatus.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.activeAssets != null && Object.hasOwnProperty.call(message, "activeAssets")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeAssets); - if (message.securityPolicyApplyingAssets != null && Object.hasOwnProperty.call(message, "securityPolicyApplyingAssets")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.securityPolicyApplyingAssets); - return writer; - }; - - /** - * Encodes the specified AssetStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AssetStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.IAssetStatus} message AssetStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssetStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssetStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AssetStatus(); - 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: { - message.activeAssets = reader.int32(); - break; - } - case 3: { - message.securityPolicyApplyingAssets = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssetStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssetStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssetStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssetStatus.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.activeAssets != null && message.hasOwnProperty("activeAssets")) - if (!$util.isInteger(message.activeAssets)) - return "activeAssets: integer expected"; - if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) - if (!$util.isInteger(message.securityPolicyApplyingAssets)) - return "securityPolicyApplyingAssets: integer expected"; - return null; - }; - - /** - * Creates an AssetStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AssetStatus} AssetStatus - */ - AssetStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AssetStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.AssetStatus(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.AssetStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.activeAssets != null) - message.activeAssets = object.activeAssets | 0; - if (object.securityPolicyApplyingAssets != null) - message.securityPolicyApplyingAssets = object.securityPolicyApplyingAssets | 0; - return message; - }; - - /** - * Creates a plain object from an AssetStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {google.cloud.dataplex.v1.AssetStatus} message AssetStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssetStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateTime = null; - object.activeAssets = 0; - object.securityPolicyApplyingAssets = 0; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.activeAssets != null && message.hasOwnProperty("activeAssets")) - object.activeAssets = message.activeAssets; - if (message.securityPolicyApplyingAssets != null && message.hasOwnProperty("securityPolicyApplyingAssets")) - object.securityPolicyApplyingAssets = message.securityPolicyApplyingAssets; - return object; - }; - - /** - * Converts this AssetStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AssetStatus - * @instance - * @returns {Object.} JSON object - */ - AssetStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssetStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AssetStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssetStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AssetStatus"; - }; - - return AssetStatus; - })(); - - v1.Zone = (function() { - - /** - * Properties of a Zone. - * @memberof google.cloud.dataplex.v1 - * @interface IZone - * @property {string|null} [name] Zone name - * @property {string|null} [displayName] Zone displayName - * @property {string|null} [uid] Zone uid - * @property {google.protobuf.ITimestamp|null} [createTime] Zone createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Zone updateTime - * @property {Object.|null} [labels] Zone labels - * @property {string|null} [description] Zone description - * @property {google.cloud.dataplex.v1.State|null} [state] Zone state - * @property {google.cloud.dataplex.v1.Zone.Type|null} [type] Zone type - * @property {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null} [discoverySpec] Zone discoverySpec - * @property {google.cloud.dataplex.v1.Zone.IResourceSpec|null} [resourceSpec] Zone resourceSpec - * @property {google.cloud.dataplex.v1.IAssetStatus|null} [assetStatus] Zone assetStatus - */ - - /** - * Constructs a new Zone. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Zone. - * @implements IZone - * @constructor - * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set - */ - function Zone(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]]; - } - - /** - * Zone name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.name = ""; - - /** - * Zone displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.displayName = ""; - - /** - * Zone uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.uid = ""; - - /** - * Zone createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.createTime = null; - - /** - * Zone updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.updateTime = null; - - /** - * Zone labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.labels = $util.emptyObject; - - /** - * Zone description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.description = ""; - - /** - * Zone state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.state = 0; - - /** - * Zone type. - * @member {google.cloud.dataplex.v1.Zone.Type} type - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.type = 0; - - /** - * Zone discoverySpec. - * @member {google.cloud.dataplex.v1.Zone.IDiscoverySpec|null|undefined} discoverySpec - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.discoverySpec = null; - - /** - * Zone resourceSpec. - * @member {google.cloud.dataplex.v1.Zone.IResourceSpec|null|undefined} resourceSpec - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.resourceSpec = null; - - /** - * Zone assetStatus. - * @member {google.cloud.dataplex.v1.IAssetStatus|null|undefined} assetStatus - * @memberof google.cloud.dataplex.v1.Zone - * @instance - */ - Zone.prototype.assetStatus = null; - - /** - * Creates a new Zone instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone} Zone instance - */ - Zone.create = function create(properties) { - return new Zone(properties); - }; - - /** - * Encodes the specified Zone message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zone.encode = function encode(message, writer) { - if (!writer) - 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.type); - if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) - $root.google.cloud.dataplex.v1.Zone.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.assetStatus != null && Object.hasOwnProperty.call(message, "assetStatus")) - $root.google.cloud.dataplex.v1.AssetStatus.encode(message.assetStatus, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Zone message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.IZone} message Zone message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Zone.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Zone message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone} Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zone.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone(), 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: { - message.uid = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - 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 7: { - message.description = reader.string(); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 9: { - message.type = reader.int32(); - break; - } - case 103: { - message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.decode(reader, reader.uint32()); - break; - } - case 104: { - message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.decode(reader, reader.uint32()); - break; - } - case 105: { - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Zone message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone} Zone - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Zone.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Zone message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Zone.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - 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.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.verify(message.discoverySpec); - if (error) - return "discoverySpec." + error; - } - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { - var error = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.verify(message.resourceSpec); - if (error) - return "resourceSpec." + error; - } - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) { - var error = $root.google.cloud.dataplex.v1.AssetStatus.verify(message.assetStatus); - if (error) - return "assetStatus." + error; - } - return null; - }; - - /** - * Creates a Zone message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone} Zone - */ - Zone.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.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.dataplex.v1.Zone.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "RAW": - case 1: - message.type = 1; - break; - case "CURATED": - case 2: - message.type = 2; - break; - } - if (object.discoverySpec != null) { - if (typeof object.discoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.discoverySpec: object expected"); - message.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.fromObject(object.discoverySpec); - } - if (object.resourceSpec != null) { - if (typeof object.resourceSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.resourceSpec: object expected"); - message.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.fromObject(object.resourceSpec); - } - if (object.assetStatus != null) { - if (typeof object.assetStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.assetStatus: object expected"); - message.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.fromObject(object.assetStatus); - } - return message; - }; - - /** - * Creates a plain object from a Zone message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {google.cloud.dataplex.v1.Zone} message Zone - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Zone.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.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.discoverySpec = null; - object.resourceSpec = null; - object.assetStatus = 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.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Zone.Type[message.type] : message.type; - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) - object.discoverySpec = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.toObject(message.discoverySpec, options); - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) - object.resourceSpec = $root.google.cloud.dataplex.v1.Zone.ResourceSpec.toObject(message.resourceSpec, options); - if (message.assetStatus != null && message.hasOwnProperty("assetStatus")) - object.assetStatus = $root.google.cloud.dataplex.v1.AssetStatus.toObject(message.assetStatus, options); - return object; - }; - - /** - * Converts this Zone to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone - * @instance - * @returns {Object.} JSON object - */ - Zone.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Zone - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Zone - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Zone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Zone.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} RAW=1 RAW value - * @property {number} CURATED=2 CURATED value - */ - Zone.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RAW"] = 1; - values[valuesById[2] = "CURATED"] = 2; - return values; - })(); - - Zone.ResourceSpec = (function() { - - /** - * Properties of a ResourceSpec. - * @memberof google.cloud.dataplex.v1.Zone - * @interface IResourceSpec - * @property {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType|null} [locationType] ResourceSpec locationType - */ - - /** - * Constructs a new ResourceSpec. - * @memberof google.cloud.dataplex.v1.Zone - * @classdesc Represents a ResourceSpec. - * @implements IResourceSpec - * @constructor - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set - */ - function ResourceSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceSpec locationType. - * @member {google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType} locationType - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @instance - */ - ResourceSpec.prototype.locationType = 0; - - /** - * Creates a new ResourceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec instance - */ - ResourceSpec.create = function create(properties) { - return new ResourceSpec(properties); - }; - - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationType); - return writer; - }; - - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.ResourceSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.locationType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.locationType != null && message.hasOwnProperty("locationType")) - switch (message.locationType) { - default: - return "locationType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.ResourceSpec} ResourceSpec - */ - ResourceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.ResourceSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone.ResourceSpec(); - switch (object.locationType) { - default: - if (typeof object.locationType === "number") { - message.locationType = object.locationType; - break; - } - break; - case "LOCATION_TYPE_UNSPECIFIED": - case 0: - message.locationType = 0; - break; - case "SINGLE_REGION": - case 1: - message.locationType = 1; - break; - case "MULTI_REGION": - case 2: - message.locationType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Zone.ResourceSpec} message ResourceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.locationType = options.enums === String ? "LOCATION_TYPE_UNSPECIFIED" : 0; - if (message.locationType != null && message.hasOwnProperty("locationType")) - object.locationType = options.enums === String ? $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] === undefined ? message.locationType : $root.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType[message.locationType] : message.locationType; - return object; - }; - - /** - * Converts this ResourceSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @instance - * @returns {Object.} JSON object - */ - ResourceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Zone.ResourceSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.ResourceSpec"; - }; - - /** - * LocationType enum. - * @name google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType - * @enum {number} - * @property {number} LOCATION_TYPE_UNSPECIFIED=0 LOCATION_TYPE_UNSPECIFIED value - * @property {number} SINGLE_REGION=1 SINGLE_REGION value - * @property {number} MULTI_REGION=2 MULTI_REGION value - */ - ResourceSpec.LocationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOCATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SINGLE_REGION"] = 1; - values[valuesById[2] = "MULTI_REGION"] = 2; - return values; - })(); - - return ResourceSpec; - })(); - - Zone.DiscoverySpec = (function() { - - /** - * Properties of a DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Zone - * @interface IDiscoverySpec - * @property {boolean|null} [enabled] DiscoverySpec enabled - * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns - * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns - * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions - * @property {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions - * @property {string|null} [schedule] DiscoverySpec schedule - */ - - /** - * Constructs a new DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Zone - * @classdesc Represents a DiscoverySpec. - * @implements IDiscoverySpec - * @constructor - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set - */ - function DiscoverySpec(properties) { - this.includePatterns = []; - this.excludePatterns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DiscoverySpec enabled. - * @member {boolean} enabled - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.enabled = false; - - /** - * DiscoverySpec includePatterns. - * @member {Array.} includePatterns - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.includePatterns = $util.emptyArray; - - /** - * DiscoverySpec excludePatterns. - * @member {Array.} excludePatterns - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.excludePatterns = $util.emptyArray; - - /** - * DiscoverySpec csvOptions. - * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions|null|undefined} csvOptions - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.csvOptions = null; - - /** - * DiscoverySpec jsonOptions. - * @member {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.jsonOptions = null; - - /** - * DiscoverySpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverySpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - */ - Object.defineProperty(DiscoverySpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverySpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec instance - */ - DiscoverySpec.create = function create(properties) { - return new DiscoverySpec(properties); - }; - - /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.includePatterns != null && message.includePatterns.length) - for (var i = 0; i < message.includePatterns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); - if (message.excludePatterns != null && message.excludePatterns.length) - for (var i = 0; i < message.excludePatterns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); - if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) - $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); - return writer; - }; - - /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Zone.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - } - case 3: { - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - } - case 4: { - message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); - break; - } - case 10: { - message.schedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverySpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverySpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { - if (!Array.isArray(message.includePatterns)) - return "includePatterns: array expected"; - for (var i = 0; i < message.includePatterns.length; ++i) - if (!$util.isString(message.includePatterns[i])) - return "includePatterns: string[] expected"; - } - if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { - if (!Array.isArray(message.excludePatterns)) - return "excludePatterns: array expected"; - for (var i = 0; i < message.excludePatterns.length; ++i) - if (!$util.isString(message.excludePatterns[i])) - return "excludePatterns: string[] expected"; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify(message.csvOptions); - if (error) - return "csvOptions." + error; - } - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { - var error = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify(message.jsonOptions); - if (error) - return "jsonOptions." + error; - } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; - } - return null; - }; - - /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec} DiscoverySpec - */ - DiscoverySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.includePatterns) { - if (!Array.isArray(object.includePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.includePatterns: array expected"); - message.includePatterns = []; - for (var i = 0; i < object.includePatterns.length; ++i) - message.includePatterns[i] = String(object.includePatterns[i]); - } - if (object.excludePatterns) { - if (!Array.isArray(object.excludePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.excludePatterns: array expected"); - message.excludePatterns = []; - for (var i = 0; i < object.excludePatterns.length; ++i) - message.excludePatterns[i] = String(object.excludePatterns[i]); - } - if (object.csvOptions != null) { - if (typeof object.csvOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.csvOptions: object expected"); - message.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); - } - if (object.jsonOptions != null) { - if (typeof object.jsonOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Zone.DiscoverySpec.jsonOptions: object expected"); - message.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); - } - if (object.schedule != null) - message.schedule = String(object.schedule); - return message; - }; - - /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec} message DiscoverySpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverySpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includePatterns = []; - object.excludePatterns = []; - } - if (options.defaults) { - object.enabled = false; - object.csvOptions = null; - object.jsonOptions = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.includePatterns && message.includePatterns.length) { - object.includePatterns = []; - for (var j = 0; j < message.includePatterns.length; ++j) - object.includePatterns[j] = message.includePatterns[j]; - } - if (message.excludePatterns && message.excludePatterns.length) { - object.excludePatterns = []; - for (var j = 0; j < message.excludePatterns.length; ++j) - object.excludePatterns[j] = message.excludePatterns[j]; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) - object.csvOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) - object.jsonOptions = $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; - } - return object; - }; - - /** - * Converts this DiscoverySpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @instance - * @returns {Object.} JSON object - */ - DiscoverySpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverySpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec"; - }; - - DiscoverySpec.CsvOptions = (function() { - - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @interface ICsvOptions - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [encoding] CsvOptions encoding - * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference - */ - - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; - - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; - - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; - - /** - * CsvOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.disableTypeInference = false; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); - return writer; - }; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.headerRows = reader.int32(); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - case 3: { - message.encoding = reader.string(); - break; - } - case 4: { - message.disableTypeInference = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions(); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.headerRows = 0; - object.delimiter = ""; - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; - - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CsvOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"; - }; - - return CsvOptions; - })(); - - DiscoverySpec.JsonOptions = (function() { - - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference - */ - - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; - - /** - * JsonOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.disableTypeInference = false; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); - return writer; - }; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - case 2: { - message.disableTypeInference = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; - - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"; - }; - - return JsonOptions; - })(); - - return DiscoverySpec; - })(); - - return Zone; - })(); - - v1.Action = (function() { - - /** - * Properties of an Action. - * @memberof google.cloud.dataplex.v1 - * @interface IAction - * @property {google.cloud.dataplex.v1.Action.Category|null} [category] Action category - * @property {string|null} [issue] Action issue - * @property {google.protobuf.ITimestamp|null} [detectTime] Action detectTime - * @property {string|null} [name] Action name - * @property {string|null} [lake] Action lake - * @property {string|null} [zone] Action zone - * @property {string|null} [asset] Action asset - * @property {Array.|null} [dataLocations] Action dataLocations - * @property {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null} [invalidDataFormat] Action invalidDataFormat - * @property {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null} [incompatibleDataSchema] Action incompatibleDataSchema - * @property {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null} [invalidDataPartition] Action invalidDataPartition - * @property {google.cloud.dataplex.v1.Action.IMissingData|null} [missingData] Action missingData - * @property {google.cloud.dataplex.v1.Action.IMissingResource|null} [missingResource] Action missingResource - * @property {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null} [unauthorizedResource] Action unauthorizedResource - * @property {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null} [failedSecurityPolicyApply] Action failedSecurityPolicyApply - * @property {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null} [invalidDataOrganization] Action invalidDataOrganization - */ - - /** - * Constructs a new Action. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Action. - * @implements IAction - * @constructor - * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set - */ - function Action(properties) { - this.dataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Action category. - * @member {google.cloud.dataplex.v1.Action.Category} category - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.category = 0; - - /** - * Action issue. - * @member {string} issue - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.issue = ""; - - /** - * Action detectTime. - * @member {google.protobuf.ITimestamp|null|undefined} detectTime - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.detectTime = null; - - /** - * Action name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.name = ""; - - /** - * Action lake. - * @member {string} lake - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.lake = ""; - - /** - * Action zone. - * @member {string} zone - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.zone = ""; - - /** - * Action asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.asset = ""; - - /** - * Action dataLocations. - * @member {Array.} dataLocations - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.dataLocations = $util.emptyArray; - - /** - * Action invalidDataFormat. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataFormat|null|undefined} invalidDataFormat - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.invalidDataFormat = null; - - /** - * Action incompatibleDataSchema. - * @member {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema|null|undefined} incompatibleDataSchema - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.incompatibleDataSchema = null; - - /** - * Action invalidDataPartition. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataPartition|null|undefined} invalidDataPartition - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.invalidDataPartition = null; - - /** - * Action missingData. - * @member {google.cloud.dataplex.v1.Action.IMissingData|null|undefined} missingData - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.missingData = null; - - /** - * Action missingResource. - * @member {google.cloud.dataplex.v1.Action.IMissingResource|null|undefined} missingResource - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.missingResource = null; - - /** - * Action unauthorizedResource. - * @member {google.cloud.dataplex.v1.Action.IUnauthorizedResource|null|undefined} unauthorizedResource - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.unauthorizedResource = null; - - /** - * Action failedSecurityPolicyApply. - * @member {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply|null|undefined} failedSecurityPolicyApply - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.failedSecurityPolicyApply = null; - - /** - * Action invalidDataOrganization. - * @member {google.cloud.dataplex.v1.Action.IInvalidDataOrganization|null|undefined} invalidDataOrganization - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Action.prototype.invalidDataOrganization = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Action details. - * @member {"invalidDataFormat"|"incompatibleDataSchema"|"invalidDataPartition"|"missingData"|"missingResource"|"unauthorizedResource"|"failedSecurityPolicyApply"|"invalidDataOrganization"|undefined} details - * @memberof google.cloud.dataplex.v1.Action - * @instance - */ - Object.defineProperty(Action.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["invalidDataFormat", "incompatibleDataSchema", "invalidDataPartition", "missingData", "missingResource", "unauthorizedResource", "failedSecurityPolicyApply", "invalidDataOrganization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Action instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {google.cloud.dataplex.v1.IAction=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action} Action instance - */ - Action.create = function create(properties) { - return new Action(properties); - }; - - /** - * Encodes the specified Action message. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Action.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); - if (message.detectTime != null && Object.hasOwnProperty.call(message, "detectTime")) - $root.google.protobuf.Timestamp.encode(message.detectTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.lake); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.zone); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.asset); - if (message.dataLocations != null && message.dataLocations.length) - for (var i = 0; i < message.dataLocations.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataLocations[i]); - if (message.invalidDataFormat != null && Object.hasOwnProperty.call(message, "invalidDataFormat")) - $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.encode(message.invalidDataFormat, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.incompatibleDataSchema != null && Object.hasOwnProperty.call(message, "incompatibleDataSchema")) - $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.encode(message.incompatibleDataSchema, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.invalidDataPartition != null && Object.hasOwnProperty.call(message, "invalidDataPartition")) - $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.encode(message.invalidDataPartition, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.missingData != null && Object.hasOwnProperty.call(message, "missingData")) - $root.google.cloud.dataplex.v1.Action.MissingData.encode(message.missingData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.missingResource != null && Object.hasOwnProperty.call(message, "missingResource")) - $root.google.cloud.dataplex.v1.Action.MissingResource.encode(message.missingResource, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.unauthorizedResource != null && Object.hasOwnProperty.call(message, "unauthorizedResource")) - $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.encode(message.unauthorizedResource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.failedSecurityPolicyApply != null && Object.hasOwnProperty.call(message, "failedSecurityPolicyApply")) - $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.encode(message.failedSecurityPolicyApply, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.invalidDataOrganization != null && Object.hasOwnProperty.call(message, "invalidDataOrganization")) - $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.encode(message.invalidDataOrganization, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Action message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {google.cloud.dataplex.v1.IAction} message Action message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Action.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Action message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action} Action - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Action.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.category = reader.int32(); - break; - } - case 2: { - message.issue = reader.string(); - break; - } - case 4: { - message.detectTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.name = reader.string(); - break; - } - case 6: { - message.lake = reader.string(); - break; - } - case 7: { - message.zone = reader.string(); - break; - } - case 8: { - message.asset = reader.string(); - break; - } - case 9: { - if (!(message.dataLocations && message.dataLocations.length)) - message.dataLocations = []; - message.dataLocations.push(reader.string()); - break; - } - case 10: { - message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.decode(reader, reader.uint32()); - break; - } - case 11: { - message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.decode(reader, reader.uint32()); - break; - } - case 12: { - message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.decode(reader, reader.uint32()); - break; - } - case 13: { - message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.decode(reader, reader.uint32()); - break; - } - case 14: { - message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.decode(reader, reader.uint32()); - break; - } - case 15: { - message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.decode(reader, reader.uint32()); - break; - } - case 21: { - message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.decode(reader, reader.uint32()); - break; - } - case 22: { - message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Action message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action} Action - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Action.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Action message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Action.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.issue != null && message.hasOwnProperty("issue")) - if (!$util.isString(message.issue)) - return "issue: string expected"; - if (message.detectTime != null && message.hasOwnProperty("detectTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.detectTime); - if (error) - return "detectTime." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) - if (!$util.isString(message.lake)) - return "lake: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataLocations != null && message.hasOwnProperty("dataLocations")) { - if (!Array.isArray(message.dataLocations)) - return "dataLocations: array expected"; - for (var i = 0; i < message.dataLocations.length; ++i) - if (!$util.isString(message.dataLocations[i])) - return "dataLocations: string[] expected"; - } - if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.verify(message.invalidDataFormat); - if (error) - return "invalidDataFormat." + error; - } - } - if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify(message.incompatibleDataSchema); - if (error) - return "incompatibleDataSchema." + error; - } - } - if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.verify(message.invalidDataPartition); - if (error) - return "invalidDataPartition." + error; - } - } - if (message.missingData != null && message.hasOwnProperty("missingData")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.MissingData.verify(message.missingData); - if (error) - return "missingData." + error; - } - } - if (message.missingResource != null && message.hasOwnProperty("missingResource")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.MissingResource.verify(message.missingResource); - if (error) - return "missingResource." + error; - } - } - if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.verify(message.unauthorizedResource); - if (error) - return "unauthorizedResource." + error; - } - } - if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify(message.failedSecurityPolicyApply); - if (error) - return "failedSecurityPolicyApply." + error; - } - } - if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify(message.invalidDataOrganization); - if (error) - return "invalidDataOrganization." + error; - } - } - return null; - }; - - /** - * Creates an Action message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action} Action - */ - Action.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action) - return object; - var message = new $root.google.cloud.dataplex.v1.Action(); - switch (object.category) { - default: - if (typeof object.category === "number") { - message.category = object.category; - break; - } - break; - case "CATEGORY_UNSPECIFIED": - case 0: - message.category = 0; - break; - case "RESOURCE_MANAGEMENT": - case 1: - message.category = 1; - break; - case "SECURITY_POLICY": - case 2: - message.category = 2; - break; - case "DATA_DISCOVERY": - case 3: - message.category = 3; - break; - } - if (object.issue != null) - message.issue = String(object.issue); - if (object.detectTime != null) { - if (typeof object.detectTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.detectTime: object expected"); - message.detectTime = $root.google.protobuf.Timestamp.fromObject(object.detectTime); - } - if (object.name != null) - message.name = String(object.name); - if (object.lake != null) - message.lake = String(object.lake); - if (object.zone != null) - message.zone = String(object.zone); - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataLocations) { - if (!Array.isArray(object.dataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.dataLocations: array expected"); - message.dataLocations = []; - for (var i = 0; i < object.dataLocations.length; ++i) - message.dataLocations[i] = String(object.dataLocations[i]); - } - if (object.invalidDataFormat != null) { - if (typeof object.invalidDataFormat !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataFormat: object expected"); - message.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.fromObject(object.invalidDataFormat); - } - if (object.incompatibleDataSchema != null) { - if (typeof object.incompatibleDataSchema !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.incompatibleDataSchema: object expected"); - message.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.fromObject(object.incompatibleDataSchema); - } - if (object.invalidDataPartition != null) { - if (typeof object.invalidDataPartition !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataPartition: object expected"); - message.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.fromObject(object.invalidDataPartition); - } - if (object.missingData != null) { - if (typeof object.missingData !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.missingData: object expected"); - message.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.fromObject(object.missingData); - } - if (object.missingResource != null) { - if (typeof object.missingResource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.missingResource: object expected"); - message.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.fromObject(object.missingResource); - } - if (object.unauthorizedResource != null) { - if (typeof object.unauthorizedResource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.unauthorizedResource: object expected"); - message.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.fromObject(object.unauthorizedResource); - } - if (object.failedSecurityPolicyApply != null) { - if (typeof object.failedSecurityPolicyApply !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.failedSecurityPolicyApply: object expected"); - message.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.fromObject(object.failedSecurityPolicyApply); - } - if (object.invalidDataOrganization != null) { - if (typeof object.invalidDataOrganization !== "object") - throw TypeError(".google.cloud.dataplex.v1.Action.invalidDataOrganization: object expected"); - message.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.fromObject(object.invalidDataOrganization); - } - return message; - }; - - /** - * Creates a plain object from an Action message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {google.cloud.dataplex.v1.Action} message Action - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Action.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataLocations = []; - if (options.defaults) { - object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; - object.issue = ""; - object.detectTime = null; - object.name = ""; - object.lake = ""; - object.zone = ""; - object.asset = ""; - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.google.cloud.dataplex.v1.Action.Category[message.category] === undefined ? message.category : $root.google.cloud.dataplex.v1.Action.Category[message.category] : message.category; - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = message.issue; - if (message.detectTime != null && message.hasOwnProperty("detectTime")) - object.detectTime = $root.google.protobuf.Timestamp.toObject(message.detectTime, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = message.lake; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataLocations && message.dataLocations.length) { - object.dataLocations = []; - for (var j = 0; j < message.dataLocations.length; ++j) - object.dataLocations[j] = message.dataLocations[j]; - } - if (message.invalidDataFormat != null && message.hasOwnProperty("invalidDataFormat")) { - object.invalidDataFormat = $root.google.cloud.dataplex.v1.Action.InvalidDataFormat.toObject(message.invalidDataFormat, options); - if (options.oneofs) - object.details = "invalidDataFormat"; - } - if (message.incompatibleDataSchema != null && message.hasOwnProperty("incompatibleDataSchema")) { - object.incompatibleDataSchema = $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.toObject(message.incompatibleDataSchema, options); - if (options.oneofs) - object.details = "incompatibleDataSchema"; - } - if (message.invalidDataPartition != null && message.hasOwnProperty("invalidDataPartition")) { - object.invalidDataPartition = $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.toObject(message.invalidDataPartition, options); - if (options.oneofs) - object.details = "invalidDataPartition"; - } - if (message.missingData != null && message.hasOwnProperty("missingData")) { - object.missingData = $root.google.cloud.dataplex.v1.Action.MissingData.toObject(message.missingData, options); - if (options.oneofs) - object.details = "missingData"; - } - if (message.missingResource != null && message.hasOwnProperty("missingResource")) { - object.missingResource = $root.google.cloud.dataplex.v1.Action.MissingResource.toObject(message.missingResource, options); - if (options.oneofs) - object.details = "missingResource"; - } - if (message.unauthorizedResource != null && message.hasOwnProperty("unauthorizedResource")) { - object.unauthorizedResource = $root.google.cloud.dataplex.v1.Action.UnauthorizedResource.toObject(message.unauthorizedResource, options); - if (options.oneofs) - object.details = "unauthorizedResource"; - } - if (message.failedSecurityPolicyApply != null && message.hasOwnProperty("failedSecurityPolicyApply")) { - object.failedSecurityPolicyApply = $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.toObject(message.failedSecurityPolicyApply, options); - if (options.oneofs) - object.details = "failedSecurityPolicyApply"; - } - if (message.invalidDataOrganization != null && message.hasOwnProperty("invalidDataOrganization")) { - object.invalidDataOrganization = $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization.toObject(message.invalidDataOrganization, options); - if (options.oneofs) - object.details = "invalidDataOrganization"; - } - return object; - }; - - /** - * Converts this Action to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action - * @instance - * @returns {Object.} JSON object - */ - Action.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Action - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action"; - }; - - /** - * Category enum. - * @name google.cloud.dataplex.v1.Action.Category - * @enum {number} - * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value - * @property {number} RESOURCE_MANAGEMENT=1 RESOURCE_MANAGEMENT value - * @property {number} SECURITY_POLICY=2 SECURITY_POLICY value - * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value - */ - Action.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE_MANAGEMENT"] = 1; - values[valuesById[2] = "SECURITY_POLICY"] = 2; - values[valuesById[3] = "DATA_DISCOVERY"] = 3; - return values; - })(); - - Action.MissingResource = (function() { - - /** - * Properties of a MissingResource. - * @memberof google.cloud.dataplex.v1.Action - * @interface IMissingResource - */ - - /** - * Constructs a new MissingResource. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a MissingResource. - * @implements IMissingResource - * @constructor - * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set - */ - function MissingResource(properties) { - if (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 MissingResource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource instance - */ - MissingResource.create = function create(properties) { - return new MissingResource(properties); - }; - - /** - * Encodes the specified MissingResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MissingResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingResource} message MissingResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MissingResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MissingResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MissingResource message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MissingResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MissingResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.MissingResource} MissingResource - */ - MissingResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingResource) - return object; - return new $root.google.cloud.dataplex.v1.Action.MissingResource(); - }; - - /** - * Creates a plain object from a MissingResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {google.cloud.dataplex.v1.Action.MissingResource} message MissingResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MissingResource.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MissingResource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @instance - * @returns {Object.} JSON object - */ - MissingResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MissingResource - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.MissingResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MissingResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingResource"; - }; - - return MissingResource; - })(); - - Action.UnauthorizedResource = (function() { - - /** - * Properties of an UnauthorizedResource. - * @memberof google.cloud.dataplex.v1.Action - * @interface IUnauthorizedResource - */ - - /** - * Constructs a new UnauthorizedResource. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an UnauthorizedResource. - * @implements IUnauthorizedResource - * @constructor - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set - */ - function UnauthorizedResource(properties) { - if (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 UnauthorizedResource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource instance - */ - UnauthorizedResource.create = function create(properties) { - return new UnauthorizedResource(properties); - }; - - /** - * Encodes the specified UnauthorizedResource message. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnauthorizedResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UnauthorizedResource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.UnauthorizedResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.IUnauthorizedResource} message UnauthorizedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnauthorizedResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnauthorizedResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnauthorizedResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnauthorizedResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnauthorizedResource message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnauthorizedResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UnauthorizedResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.UnauthorizedResource} UnauthorizedResource - */ - UnauthorizedResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.UnauthorizedResource) - return object; - return new $root.google.cloud.dataplex.v1.Action.UnauthorizedResource(); - }; - - /** - * Creates a plain object from an UnauthorizedResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {google.cloud.dataplex.v1.Action.UnauthorizedResource} message UnauthorizedResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnauthorizedResource.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UnauthorizedResource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @instance - * @returns {Object.} JSON object - */ - UnauthorizedResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UnauthorizedResource - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.UnauthorizedResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UnauthorizedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.UnauthorizedResource"; - }; - - return UnauthorizedResource; - })(); - - Action.FailedSecurityPolicyApply = (function() { - - /** - * Properties of a FailedSecurityPolicyApply. - * @memberof google.cloud.dataplex.v1.Action - * @interface IFailedSecurityPolicyApply - * @property {string|null} [asset] FailedSecurityPolicyApply asset - */ - - /** - * Constructs a new FailedSecurityPolicyApply. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a FailedSecurityPolicyApply. - * @implements IFailedSecurityPolicyApply - * @constructor - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set - */ - function FailedSecurityPolicyApply(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FailedSecurityPolicyApply asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @instance - */ - FailedSecurityPolicyApply.prototype.asset = ""; - - /** - * Creates a new FailedSecurityPolicyApply instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply instance - */ - FailedSecurityPolicyApply.create = function create(properties) { - return new FailedSecurityPolicyApply(properties); - }; - - /** - * Encodes the specified FailedSecurityPolicyApply message. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailedSecurityPolicyApply.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); - return writer; - }; - - /** - * Encodes the specified FailedSecurityPolicyApply message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.IFailedSecurityPolicyApply} message FailedSecurityPolicyApply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FailedSecurityPolicyApply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailedSecurityPolicyApply.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.asset = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FailedSecurityPolicyApply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FailedSecurityPolicyApply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FailedSecurityPolicyApply message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FailedSecurityPolicyApply.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"; - return null; - }; - - /** - * Creates a FailedSecurityPolicyApply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} FailedSecurityPolicyApply - */ - FailedSecurityPolicyApply.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply(); - if (object.asset != null) - message.asset = String(object.asset); - return message; - }; - - /** - * Creates a plain object from a FailedSecurityPolicyApply message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply} message FailedSecurityPolicyApply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FailedSecurityPolicyApply.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.asset = ""; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - return object; - }; - - /** - * Converts this FailedSecurityPolicyApply to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @instance - * @returns {Object.} JSON object - */ - FailedSecurityPolicyApply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FailedSecurityPolicyApply - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FailedSecurityPolicyApply.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"; - }; - - return FailedSecurityPolicyApply; - })(); - - Action.InvalidDataFormat = (function() { - - /** - * Properties of an InvalidDataFormat. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataFormat - * @property {Array.|null} [sampledDataLocations] InvalidDataFormat sampledDataLocations - * @property {string|null} [expectedFormat] InvalidDataFormat expectedFormat - * @property {string|null} [newFormat] InvalidDataFormat newFormat - */ - - /** - * Constructs a new InvalidDataFormat. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataFormat. - * @implements IInvalidDataFormat - * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set - */ - function InvalidDataFormat(properties) { - this.sampledDataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InvalidDataFormat sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.sampledDataLocations = $util.emptyArray; - - /** - * InvalidDataFormat expectedFormat. - * @member {string} expectedFormat - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.expectedFormat = ""; - - /** - * InvalidDataFormat newFormat. - * @member {string} newFormat - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - */ - InvalidDataFormat.prototype.newFormat = ""; - - /** - * Creates a new InvalidDataFormat instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat instance - */ - InvalidDataFormat.create = function create(properties) { - return new InvalidDataFormat(properties); - }; - - /** - * Encodes the specified InvalidDataFormat message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sampledDataLocations[i]); - if (message.expectedFormat != null && Object.hasOwnProperty.call(message, "expectedFormat")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.expectedFormat); - if (message.newFormat != null && Object.hasOwnProperty.call(message, "newFormat")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newFormat); - return writer; - }; - - /** - * Encodes the specified InvalidDataFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataFormat} message InvalidDataFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - } - case 2: { - message.expectedFormat = reader.string(); - break; - } - case 3: { - message.newFormat = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InvalidDataFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InvalidDataFormat message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvalidDataFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) - if (!$util.isString(message.expectedFormat)) - return "expectedFormat: string expected"; - if (message.newFormat != null && message.hasOwnProperty("newFormat")) - if (!$util.isString(message.newFormat)) - return "newFormat: string expected"; - return null; - }; - - /** - * Creates an InvalidDataFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataFormat} InvalidDataFormat - */ - InvalidDataFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataFormat) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataFormat(); - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.InvalidDataFormat.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - if (object.expectedFormat != null) - message.expectedFormat = String(object.expectedFormat); - if (object.newFormat != null) - message.newFormat = String(object.newFormat); - return message; - }; - - /** - * Creates a plain object from an InvalidDataFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataFormat} message InvalidDataFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvalidDataFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.expectedFormat = ""; - object.newFormat = ""; - } - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; - } - if (message.expectedFormat != null && message.hasOwnProperty("expectedFormat")) - object.expectedFormat = message.expectedFormat; - if (message.newFormat != null && message.hasOwnProperty("newFormat")) - object.newFormat = message.newFormat; - return object; - }; - - /** - * Converts this InvalidDataFormat to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @instance - * @returns {Object.} JSON object - */ - InvalidDataFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InvalidDataFormat - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.InvalidDataFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InvalidDataFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataFormat"; - }; - - return InvalidDataFormat; - })(); - - Action.IncompatibleDataSchema = (function() { - - /** - * Properties of an IncompatibleDataSchema. - * @memberof google.cloud.dataplex.v1.Action - * @interface IIncompatibleDataSchema - * @property {string|null} [table] IncompatibleDataSchema table - * @property {string|null} [existingSchema] IncompatibleDataSchema existingSchema - * @property {string|null} [newSchema] IncompatibleDataSchema newSchema - * @property {Array.|null} [sampledDataLocations] IncompatibleDataSchema sampledDataLocations - * @property {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange|null} [schemaChange] IncompatibleDataSchema schemaChange - */ - - /** - * Constructs a new IncompatibleDataSchema. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an IncompatibleDataSchema. - * @implements IIncompatibleDataSchema - * @constructor - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set - */ - function IncompatibleDataSchema(properties) { - this.sampledDataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IncompatibleDataSchema table. - * @member {string} table - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.table = ""; - - /** - * IncompatibleDataSchema existingSchema. - * @member {string} existingSchema - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.existingSchema = ""; - - /** - * IncompatibleDataSchema newSchema. - * @member {string} newSchema - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.newSchema = ""; - - /** - * IncompatibleDataSchema sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.sampledDataLocations = $util.emptyArray; - - /** - * IncompatibleDataSchema schemaChange. - * @member {google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange} schemaChange - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - */ - IncompatibleDataSchema.prototype.schemaChange = 0; - - /** - * Creates a new IncompatibleDataSchema instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema instance - */ - IncompatibleDataSchema.create = function create(properties) { - return new IncompatibleDataSchema(properties); - }; - - /** - * Encodes the specified IncompatibleDataSchema message. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncompatibleDataSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.existingSchema != null && Object.hasOwnProperty.call(message, "existingSchema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.existingSchema); - if (message.newSchema != null && Object.hasOwnProperty.call(message, "newSchema")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSchema); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); - if (message.schemaChange != null && Object.hasOwnProperty.call(message, "schemaChange")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.schemaChange); - return writer; - }; - - /** - * Encodes the specified IncompatibleDataSchema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.IncompatibleDataSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IIncompatibleDataSchema} message IncompatibleDataSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncompatibleDataSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncompatibleDataSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - message.existingSchema = reader.string(); - break; - } - case 3: { - message.newSchema = reader.string(); - break; - } - case 4: { - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - } - case 5: { - message.schemaChange = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IncompatibleDataSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncompatibleDataSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IncompatibleDataSchema message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IncompatibleDataSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) - if (!$util.isString(message.existingSchema)) - return "existingSchema: string expected"; - if (message.newSchema != null && message.hasOwnProperty("newSchema")) - if (!$util.isString(message.newSchema)) - return "newSchema: string expected"; - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) - switch (message.schemaChange) { - default: - return "schemaChange: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an IncompatibleDataSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} IncompatibleDataSchema - */ - IncompatibleDataSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema(); - if (object.table != null) - message.table = String(object.table); - if (object.existingSchema != null) - message.existingSchema = String(object.existingSchema); - if (object.newSchema != null) - message.newSchema = String(object.newSchema); - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - switch (object.schemaChange) { - default: - if (typeof object.schemaChange === "number") { - message.schemaChange = object.schemaChange; - break; - } - break; - case "SCHEMA_CHANGE_UNSPECIFIED": - case 0: - message.schemaChange = 0; - break; - case "INCOMPATIBLE": - case 1: - message.schemaChange = 1; - break; - case "MODIFIED": - case 2: - message.schemaChange = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an IncompatibleDataSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {google.cloud.dataplex.v1.Action.IncompatibleDataSchema} message IncompatibleDataSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IncompatibleDataSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.table = ""; - object.existingSchema = ""; - object.newSchema = ""; - object.schemaChange = options.enums === String ? "SCHEMA_CHANGE_UNSPECIFIED" : 0; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.existingSchema != null && message.hasOwnProperty("existingSchema")) - object.existingSchema = message.existingSchema; - if (message.newSchema != null && message.hasOwnProperty("newSchema")) - object.newSchema = message.newSchema; - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; - } - if (message.schemaChange != null && message.hasOwnProperty("schemaChange")) - object.schemaChange = options.enums === String ? $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] === undefined ? message.schemaChange : $root.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange[message.schemaChange] : message.schemaChange; - return object; - }; - - /** - * Converts this IncompatibleDataSchema to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @instance - * @returns {Object.} JSON object - */ - IncompatibleDataSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IncompatibleDataSchema - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.IncompatibleDataSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IncompatibleDataSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"; - }; - - /** - * SchemaChange enum. - * @name google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange - * @enum {number} - * @property {number} SCHEMA_CHANGE_UNSPECIFIED=0 SCHEMA_CHANGE_UNSPECIFIED value - * @property {number} INCOMPATIBLE=1 INCOMPATIBLE value - * @property {number} MODIFIED=2 MODIFIED value - */ - IncompatibleDataSchema.SchemaChange = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_CHANGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCOMPATIBLE"] = 1; - values[valuesById[2] = "MODIFIED"] = 2; - return values; - })(); - - return IncompatibleDataSchema; - })(); - - Action.InvalidDataPartition = (function() { - - /** - * Properties of an InvalidDataPartition. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataPartition - * @property {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure|null} [expectedStructure] InvalidDataPartition expectedStructure - */ - - /** - * Constructs a new InvalidDataPartition. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataPartition. - * @implements IInvalidDataPartition - * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set - */ - function InvalidDataPartition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InvalidDataPartition expectedStructure. - * @member {google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure} expectedStructure - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @instance - */ - InvalidDataPartition.prototype.expectedStructure = 0; - - /** - * Creates a new InvalidDataPartition instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition instance - */ - InvalidDataPartition.create = function create(properties) { - return new InvalidDataPartition(properties); - }; - - /** - * Encodes the specified InvalidDataPartition message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataPartition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expectedStructure != null && Object.hasOwnProperty.call(message, "expectedStructure")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expectedStructure); - return writer; - }; - - /** - * Encodes the specified InvalidDataPartition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataPartition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataPartition} message InvalidDataPartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataPartition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataPartition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.expectedStructure = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InvalidDataPartition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataPartition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InvalidDataPartition message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvalidDataPartition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) - switch (message.expectedStructure) { - default: - return "expectedStructure: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an InvalidDataPartition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataPartition} InvalidDataPartition - */ - InvalidDataPartition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataPartition) - return object; - var message = new $root.google.cloud.dataplex.v1.Action.InvalidDataPartition(); - switch (object.expectedStructure) { - default: - if (typeof object.expectedStructure === "number") { - message.expectedStructure = object.expectedStructure; - break; - } - break; - case "PARTITION_STRUCTURE_UNSPECIFIED": - case 0: - message.expectedStructure = 0; - break; - case "CONSISTENT_KEYS": - case 1: - message.expectedStructure = 1; - break; - case "HIVE_STYLE_KEYS": - case 2: - message.expectedStructure = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an InvalidDataPartition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataPartition} message InvalidDataPartition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvalidDataPartition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.expectedStructure = options.enums === String ? "PARTITION_STRUCTURE_UNSPECIFIED" : 0; - if (message.expectedStructure != null && message.hasOwnProperty("expectedStructure")) - object.expectedStructure = options.enums === String ? $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] === undefined ? message.expectedStructure : $root.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure[message.expectedStructure] : message.expectedStructure; - return object; - }; - - /** - * Converts this InvalidDataPartition to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @instance - * @returns {Object.} JSON object - */ - InvalidDataPartition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InvalidDataPartition - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.InvalidDataPartition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InvalidDataPartition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataPartition"; - }; - - /** - * PartitionStructure enum. - * @name google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure - * @enum {number} - * @property {number} PARTITION_STRUCTURE_UNSPECIFIED=0 PARTITION_STRUCTURE_UNSPECIFIED value - * @property {number} CONSISTENT_KEYS=1 CONSISTENT_KEYS value - * @property {number} HIVE_STYLE_KEYS=2 HIVE_STYLE_KEYS value - */ - InvalidDataPartition.PartitionStructure = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTITION_STRUCTURE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONSISTENT_KEYS"] = 1; - values[valuesById[2] = "HIVE_STYLE_KEYS"] = 2; - return values; - })(); - - return InvalidDataPartition; - })(); - - Action.MissingData = (function() { - - /** - * Properties of a MissingData. - * @memberof google.cloud.dataplex.v1.Action - * @interface IMissingData - */ - - /** - * Constructs a new MissingData. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents a MissingData. - * @implements IMissingData - * @constructor - * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set - */ - function MissingData(properties) { - if (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 MissingData instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData instance - */ - MissingData.create = function create(properties) { - return new MissingData(properties); - }; - - /** - * Encodes the specified MissingData message. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MissingData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.MissingData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.IMissingData} message MissingData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MissingData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MissingData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.MissingData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MissingData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MissingData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MissingData message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MissingData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MissingData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.MissingData} MissingData - */ - MissingData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.MissingData) - return object; - return new $root.google.cloud.dataplex.v1.Action.MissingData(); - }; - - /** - * Creates a plain object from a MissingData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {google.cloud.dataplex.v1.Action.MissingData} message MissingData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MissingData.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MissingData to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @instance - * @returns {Object.} JSON object - */ - MissingData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MissingData - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.MissingData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MissingData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.MissingData"; - }; - - return MissingData; - })(); - - Action.InvalidDataOrganization = (function() { - - /** - * Properties of an InvalidDataOrganization. - * @memberof google.cloud.dataplex.v1.Action - * @interface IInvalidDataOrganization - */ - - /** - * Constructs a new InvalidDataOrganization. - * @memberof google.cloud.dataplex.v1.Action - * @classdesc Represents an InvalidDataOrganization. - * @implements IInvalidDataOrganization - * @constructor - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set - */ - function InvalidDataOrganization(properties) { - if (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 InvalidDataOrganization instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization instance - */ - InvalidDataOrganization.create = function create(properties) { - return new InvalidDataOrganization(properties); - }; - - /** - * Encodes the specified InvalidDataOrganization message. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataOrganization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified InvalidDataOrganization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Action.InvalidDataOrganization.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {google.cloud.dataplex.v1.Action.IInvalidDataOrganization} message InvalidDataOrganization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvalidDataOrganization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataOrganization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InvalidDataOrganization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvalidDataOrganization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InvalidDataOrganization message. - * @function verify - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvalidDataOrganization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an InvalidDataOrganization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Action.InvalidDataOrganization} InvalidDataOrganization - */ - InvalidDataOrganization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization) - return object; - return new $root.google.cloud.dataplex.v1.Action.InvalidDataOrganization(); - }; - - /** - * Creates a plain object from an InvalidDataOrganization message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {google.cloud.dataplex.v1.Action.InvalidDataOrganization} message InvalidDataOrganization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvalidDataOrganization.toObject = function toObject() { - return {}; - }; - - /** - * Converts this InvalidDataOrganization to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @instance - * @returns {Object.} JSON object - */ - InvalidDataOrganization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InvalidDataOrganization - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Action.InvalidDataOrganization - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InvalidDataOrganization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Action.InvalidDataOrganization"; - }; - - return InvalidDataOrganization; - })(); - - return Action; - })(); - - v1.Asset = (function() { - - /** - * Properties of an Asset. - * @memberof google.cloud.dataplex.v1 - * @interface IAsset - * @property {string|null} [name] Asset name - * @property {string|null} [displayName] Asset displayName - * @property {string|null} [uid] Asset uid - * @property {google.protobuf.ITimestamp|null} [createTime] Asset createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Asset updateTime - * @property {Object.|null} [labels] Asset labels - * @property {string|null} [description] Asset description - * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] Asset state - * @property {google.cloud.dataplex.v1.Asset.IResourceSpec|null} [resourceSpec] Asset resourceSpec - * @property {google.cloud.dataplex.v1.Asset.IResourceStatus|null} [resourceStatus] Asset resourceStatus - * @property {google.cloud.dataplex.v1.Asset.ISecurityStatus|null} [securityStatus] Asset securityStatus - * @property {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null} [discoverySpec] Asset discoverySpec - * @property {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null} [discoveryStatus] Asset discoveryStatus - */ - - /** - * Constructs a new Asset. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Asset. - * @implements IAsset - * @constructor - * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set - */ - function Asset(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]]; - } - - /** - * Asset name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.name = ""; - - /** - * Asset displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.displayName = ""; - - /** - * Asset uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.uid = ""; - - /** - * Asset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.createTime = null; - - /** - * Asset updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.updateTime = null; - - /** - * Asset labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.labels = $util.emptyObject; - - /** - * Asset description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.description = ""; - - /** - * Asset state. - * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.state = 0; - - /** - * Asset resourceSpec. - * @member {google.cloud.dataplex.v1.Asset.IResourceSpec|null|undefined} resourceSpec - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.resourceSpec = null; - - /** - * Asset resourceStatus. - * @member {google.cloud.dataplex.v1.Asset.IResourceStatus|null|undefined} resourceStatus - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.resourceStatus = null; - - /** - * Asset securityStatus. - * @member {google.cloud.dataplex.v1.Asset.ISecurityStatus|null|undefined} securityStatus - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.securityStatus = null; - - /** - * Asset discoverySpec. - * @member {google.cloud.dataplex.v1.Asset.IDiscoverySpec|null|undefined} discoverySpec - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.discoverySpec = null; - - /** - * Asset discoveryStatus. - * @member {google.cloud.dataplex.v1.Asset.IDiscoveryStatus|null|undefined} discoveryStatus - * @memberof google.cloud.dataplex.v1.Asset - * @instance - */ - Asset.prototype.discoveryStatus = null; - - /** - * Creates a new Asset instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {google.cloud.dataplex.v1.IAsset=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset} Asset instance - */ - Asset.create = function create(properties) { - return new Asset(properties); - }; - - /** - * Encodes the specified Asset message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Asset.encode = function encode(message, writer) { - if (!writer) - 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.resourceSpec != null && Object.hasOwnProperty.call(message, "resourceSpec")) - $root.google.cloud.dataplex.v1.Asset.ResourceSpec.encode(message.resourceSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.resourceStatus != null && Object.hasOwnProperty.call(message, "resourceStatus")) - $root.google.cloud.dataplex.v1.Asset.ResourceStatus.encode(message.resourceStatus, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.securityStatus != null && Object.hasOwnProperty.call(message, "securityStatus")) - $root.google.cloud.dataplex.v1.Asset.SecurityStatus.encode(message.securityStatus, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.discoverySpec != null && Object.hasOwnProperty.call(message, "discoverySpec")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.encode(message.discoverySpec, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); - if (message.discoveryStatus != null && Object.hasOwnProperty.call(message, "discoveryStatus")) - $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.encode(message.discoveryStatus, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Asset message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {google.cloud.dataplex.v1.IAsset} message Asset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Asset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Asset message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset} Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Asset.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset(), 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: { - message.uid = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - 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 7: { - message.description = reader.string(); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 100: { - message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.decode(reader, reader.uint32()); - break; - } - case 103: { - message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.decode(reader, reader.uint32()); - break; - } - case 106: { - message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.decode(reader, reader.uint32()); - break; - } - case 107: { - message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Asset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset} Asset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Asset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Asset message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Asset.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) { - var error = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.verify(message.resourceSpec); - if (error) - return "resourceSpec." + error; - } - if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.verify(message.resourceStatus); - if (error) - return "resourceStatus." + error; - } - if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.verify(message.securityStatus); - if (error) - return "securityStatus." + error; - } - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.verify(message.discoverySpec); - if (error) - return "discoverySpec." + error; - } - if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify(message.discoveryStatus); - if (error) - return "discoveryStatus." + error; - } - return null; - }; - - /** - * Creates an Asset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset} Asset - */ - Asset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.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.dataplex.v1.Asset.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "APPLYING": - case 2: - message.state = 2; - break; - case "ERROR": - case 3: - message.state = 3; - break; - } - if (object.resourceSpec != null) { - if (typeof object.resourceSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.resourceSpec: object expected"); - message.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.fromObject(object.resourceSpec); - } - if (object.resourceStatus != null) { - if (typeof object.resourceStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.resourceStatus: object expected"); - message.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.fromObject(object.resourceStatus); - } - if (object.securityStatus != null) { - if (typeof object.securityStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.securityStatus: object expected"); - message.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.fromObject(object.securityStatus); - } - if (object.discoverySpec != null) { - if (typeof object.discoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.discoverySpec: object expected"); - message.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.fromObject(object.discoverySpec); - } - if (object.discoveryStatus != null) { - if (typeof object.discoveryStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.discoveryStatus: object expected"); - message.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.fromObject(object.discoveryStatus); - } - return message; - }; - - /** - * Creates a plain object from an Asset message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {google.cloud.dataplex.v1.Asset} message Asset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Asset.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.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceSpec = null; - object.resourceStatus = null; - object.securityStatus = null; - object.discoverySpec = null; - object.discoveryStatus = 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.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; - if (message.resourceSpec != null && message.hasOwnProperty("resourceSpec")) - object.resourceSpec = $root.google.cloud.dataplex.v1.Asset.ResourceSpec.toObject(message.resourceSpec, options); - if (message.resourceStatus != null && message.hasOwnProperty("resourceStatus")) - object.resourceStatus = $root.google.cloud.dataplex.v1.Asset.ResourceStatus.toObject(message.resourceStatus, options); - if (message.securityStatus != null && message.hasOwnProperty("securityStatus")) - object.securityStatus = $root.google.cloud.dataplex.v1.Asset.SecurityStatus.toObject(message.securityStatus, options); - if (message.discoverySpec != null && message.hasOwnProperty("discoverySpec")) - object.discoverySpec = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.toObject(message.discoverySpec, options); - if (message.discoveryStatus != null && message.hasOwnProperty("discoveryStatus")) - object.discoveryStatus = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.toObject(message.discoveryStatus, options); - return object; - }; - - /** - * Converts this Asset to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset - * @instance - * @returns {Object.} JSON object - */ - Asset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Asset - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Asset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset"; - }; - - Asset.SecurityStatus = (function() { - - /** - * Properties of a SecurityStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface ISecurityStatus - * @property {google.cloud.dataplex.v1.Asset.SecurityStatus.State|null} [state] SecurityStatus state - * @property {string|null} [message] SecurityStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityStatus updateTime - */ - - /** - * Constructs a new SecurityStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a SecurityStatus. - * @implements ISecurityStatus - * @constructor - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set - */ - function SecurityStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityStatus state. - * @member {google.cloud.dataplex.v1.Asset.SecurityStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - */ - SecurityStatus.prototype.state = 0; - - /** - * SecurityStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - */ - SecurityStatus.prototype.message = ""; - - /** - * SecurityStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - */ - SecurityStatus.prototype.updateTime = null; - - /** - * Creates a new SecurityStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus instance - */ - SecurityStatus.create = function create(properties) { - return new SecurityStatus(properties); - }; - - /** - * Encodes the specified SecurityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SecurityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.SecurityStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.ISecurityStatus} message SecurityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityStatus.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.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a SecurityStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.SecurityStatus} SecurityStatus - */ - SecurityStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.SecurityStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.SecurityStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "APPLYING": - case 2: - message.state = 2; - break; - case "ERROR": - case 3: - message.state = 3; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.SecurityStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a SecurityStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.SecurityStatus} message SecurityStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.SecurityStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this SecurityStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @instance - * @returns {Object.} JSON object - */ - SecurityStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.SecurityStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.SecurityStatus"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.SecurityStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} APPLYING=2 APPLYING value - * @property {number} ERROR=3 ERROR value - */ - SecurityStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "APPLYING"] = 2; - values[valuesById[3] = "ERROR"] = 3; - return values; - })(); - - return SecurityStatus; - })(); - - Asset.DiscoverySpec = (function() { - - /** - * Properties of a DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IDiscoverySpec - * @property {boolean|null} [enabled] DiscoverySpec enabled - * @property {Array.|null} [includePatterns] DiscoverySpec includePatterns - * @property {Array.|null} [excludePatterns] DiscoverySpec excludePatterns - * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null} [csvOptions] DiscoverySpec csvOptions - * @property {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null} [jsonOptions] DiscoverySpec jsonOptions - * @property {string|null} [schedule] DiscoverySpec schedule - */ - - /** - * Constructs a new DiscoverySpec. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a DiscoverySpec. - * @implements IDiscoverySpec - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set - */ - function DiscoverySpec(properties) { - this.includePatterns = []; - this.excludePatterns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DiscoverySpec enabled. - * @member {boolean} enabled - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.enabled = false; - - /** - * DiscoverySpec includePatterns. - * @member {Array.} includePatterns - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.includePatterns = $util.emptyArray; - - /** - * DiscoverySpec excludePatterns. - * @member {Array.} excludePatterns - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.excludePatterns = $util.emptyArray; - - /** - * DiscoverySpec csvOptions. - * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions|null|undefined} csvOptions - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.csvOptions = null; - - /** - * DiscoverySpec jsonOptions. - * @member {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions|null|undefined} jsonOptions - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.jsonOptions = null; - - /** - * DiscoverySpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - DiscoverySpec.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoverySpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - */ - Object.defineProperty(DiscoverySpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoverySpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec instance - */ - DiscoverySpec.create = function create(properties) { - return new DiscoverySpec(properties); - }; - - /** - * Encodes the specified DiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.includePatterns != null && message.includePatterns.length) - for (var i = 0; i < message.includePatterns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includePatterns[i]); - if (message.excludePatterns != null && message.excludePatterns.length) - for (var i = 0; i < message.excludePatterns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludePatterns[i]); - if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) - $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.schedule); - return writer; - }; - - /** - * Encodes the specified DiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoverySpec} message DiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - } - case 3: { - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - } - case 4: { - message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.decode(reader, reader.uint32()); - break; - } - case 10: { - message.schedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoverySpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoverySpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoverySpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoverySpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { - if (!Array.isArray(message.includePatterns)) - return "includePatterns: array expected"; - for (var i = 0; i < message.includePatterns.length; ++i) - if (!$util.isString(message.includePatterns[i])) - return "includePatterns: string[] expected"; - } - if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { - if (!Array.isArray(message.excludePatterns)) - return "excludePatterns: array expected"; - for (var i = 0; i < message.excludePatterns.length; ++i) - if (!$util.isString(message.excludePatterns[i])) - return "excludePatterns: string[] expected"; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify(message.csvOptions); - if (error) - return "csvOptions." + error; - } - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify(message.jsonOptions); - if (error) - return "jsonOptions." + error; - } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; - } - return null; - }; - - /** - * Creates a DiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec} DiscoverySpec - */ - DiscoverySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.includePatterns) { - if (!Array.isArray(object.includePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.includePatterns: array expected"); - message.includePatterns = []; - for (var i = 0; i < object.includePatterns.length; ++i) - message.includePatterns[i] = String(object.includePatterns[i]); - } - if (object.excludePatterns) { - if (!Array.isArray(object.excludePatterns)) - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.excludePatterns: array expected"); - message.excludePatterns = []; - for (var i = 0; i < object.excludePatterns.length; ++i) - message.excludePatterns[i] = String(object.excludePatterns[i]); - } - if (object.csvOptions != null) { - if (typeof object.csvOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.csvOptions: object expected"); - message.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.fromObject(object.csvOptions); - } - if (object.jsonOptions != null) { - if (typeof object.jsonOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoverySpec.jsonOptions: object expected"); - message.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.fromObject(object.jsonOptions); - } - if (object.schedule != null) - message.schedule = String(object.schedule); - return message; - }; - - /** - * Creates a plain object from a DiscoverySpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec} message DiscoverySpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoverySpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includePatterns = []; - object.excludePatterns = []; - } - if (options.defaults) { - object.enabled = false; - object.csvOptions = null; - object.jsonOptions = null; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.includePatterns && message.includePatterns.length) { - object.includePatterns = []; - for (var j = 0; j < message.includePatterns.length; ++j) - object.includePatterns[j] = message.includePatterns[j]; - } - if (message.excludePatterns && message.excludePatterns.length) { - object.excludePatterns = []; - for (var j = 0; j < message.excludePatterns.length; ++j) - object.excludePatterns[j] = message.excludePatterns[j]; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) - object.csvOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.toObject(message.csvOptions, options); - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) - object.jsonOptions = $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.toObject(message.jsonOptions, options); - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; - } - return object; - }; - - /** - * Converts this DiscoverySpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @instance - * @returns {Object.} JSON object - */ - DiscoverySpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoverySpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec"; - }; - - DiscoverySpec.CsvOptions = (function() { - - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @interface ICsvOptions - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [encoding] CsvOptions encoding - * @property {boolean|null} [disableTypeInference] CsvOptions disableTypeInference - */ - - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; - - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; - - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; - - /** - * CsvOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - */ - CsvOptions.prototype.disableTypeInference = false; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disableTypeInference); - return writer; - }; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.headerRows = reader.int32(); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - case 3: { - message.encoding = reader.string(); - break; - } - case 4: { - message.disableTypeInference = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions(); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.headerRows = 0; - object.delimiter = ""; - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; - - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CsvOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"; - }; - - return CsvOptions; - })(); - - DiscoverySpec.JsonOptions = (function() { - - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - * @property {boolean|null} [disableTypeInference] JsonOptions disableTypeInference - */ - - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; - - /** - * JsonOptions disableTypeInference. - * @member {boolean} disableTypeInference - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - */ - JsonOptions.prototype.disableTypeInference = false; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.disableTypeInference != null && Object.hasOwnProperty.call(message, "disableTypeInference")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.disableTypeInference); - return writer; - }; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - case 2: { - message.disableTypeInference = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - if (typeof message.disableTypeInference !== "boolean") - return "disableTypeInference: boolean expected"; - return null; - }; - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.disableTypeInference != null) - message.disableTypeInference = Boolean(object.disableTypeInference); - return message; - }; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.disableTypeInference = false; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.disableTypeInference != null && message.hasOwnProperty("disableTypeInference")) - object.disableTypeInference = message.disableTypeInference; - return object; - }; - - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"; - }; - - return JsonOptions; - })(); - - return DiscoverySpec; - })(); - - Asset.ResourceSpec = (function() { - - /** - * Properties of a ResourceSpec. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IResourceSpec - * @property {string|null} [name] ResourceSpec name - * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type - * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null} [readAccessMode] ResourceSpec readAccessMode - */ - - /** - * Constructs a new ResourceSpec. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a ResourceSpec. - * @implements IResourceSpec - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set - */ - function ResourceSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceSpec name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - */ - ResourceSpec.prototype.name = ""; - - /** - * ResourceSpec type. - * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.Type} type - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - */ - ResourceSpec.prototype.type = 0; - - /** - * ResourceSpec readAccessMode. - * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode} readAccessMode - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - */ - ResourceSpec.prototype.readAccessMode = 0; - - /** - * Creates a new ResourceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec instance - */ - ResourceSpec.create = function create(properties) { - return new ResourceSpec(properties); - }; - - /** - * Encodes the specified ResourceSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encode = function encode(message, writer) { - if (!writer) - 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.readAccessMode != null && Object.hasOwnProperty.call(message, "readAccessMode")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.readAccessMode); - return writer; - }; - - /** - * Encodes the specified ResourceSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceSpec} message ResourceSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 5: { - message.readAccessMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) - switch (message.readAccessMode) { - default: - return "readAccessMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ResourceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.ResourceSpec} ResourceSpec - */ - ResourceSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.ResourceSpec(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "STORAGE_BUCKET": - case 1: - message.type = 1; - break; - case "BIGQUERY_DATASET": - case 2: - message.type = 2; - break; - } - switch (object.readAccessMode) { - default: - if (typeof object.readAccessMode === "number") { - message.readAccessMode = object.readAccessMode; - break; - } - break; - case "ACCESS_MODE_UNSPECIFIED": - case 0: - message.readAccessMode = 0; - break; - case "DIRECT": - case 1: - message.readAccessMode = 1; - break; - case "MANAGED": - case 2: - message.readAccessMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ResourceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {google.cloud.dataplex.v1.Asset.ResourceSpec} message ResourceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.readAccessMode = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; - } - 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.dataplex.v1.Asset.ResourceSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; - if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) - object.readAccessMode = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] === undefined ? message.readAccessMode : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] : message.readAccessMode; - return object; - }; - - /** - * Converts this ResourceSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @instance - * @returns {Object.} JSON object - */ - ResourceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceSpec"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Asset.ResourceSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} STORAGE_BUCKET=1 STORAGE_BUCKET value - * @property {number} BIGQUERY_DATASET=2 BIGQUERY_DATASET value - */ - ResourceSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STORAGE_BUCKET"] = 1; - values[valuesById[2] = "BIGQUERY_DATASET"] = 2; - return values; - })(); - - /** - * AccessMode enum. - * @name google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode - * @enum {number} - * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value - * @property {number} DIRECT=1 DIRECT value - * @property {number} MANAGED=2 MANAGED value - */ - ResourceSpec.AccessMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIRECT"] = 1; - values[valuesById[2] = "MANAGED"] = 2; - return values; - })(); - - return ResourceSpec; - })(); - - Asset.ResourceStatus = (function() { - - /** - * Properties of a ResourceStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IResourceStatus - * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state - * @property {string|null} [message] ResourceStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime - * @property {string|null} [managedAccessIdentity] ResourceStatus managedAccessIdentity - */ - - /** - * Constructs a new ResourceStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a ResourceStatus. - * @implements IResourceStatus - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set - */ - function ResourceStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceStatus state. - * @member {google.cloud.dataplex.v1.Asset.ResourceStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.state = 0; - - /** - * ResourceStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.message = ""; - - /** - * ResourceStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.updateTime = null; - - /** - * ResourceStatus managedAccessIdentity. - * @member {string} managedAccessIdentity - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - */ - ResourceStatus.prototype.managedAccessIdentity = ""; - - /** - * Creates a new ResourceStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus instance - */ - ResourceStatus.create = function create(properties) { - return new ResourceStatus(properties); - }; - - /** - * Encodes the specified ResourceStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.managedAccessIdentity != null && Object.hasOwnProperty.call(message, "managedAccessIdentity")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.managedAccessIdentity); - return writer; - }; - - /** - * Encodes the specified ResourceStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.ResourceStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IResourceStatus} message ResourceStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.managedAccessIdentity = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceStatus.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: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) - if (!$util.isString(message.managedAccessIdentity)) - return "managedAccessIdentity: string expected"; - return null; - }; - - /** - * Creates a ResourceStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.ResourceStatus} ResourceStatus - */ - ResourceStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.ResourceStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.ResourceStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "ERROR": - case 2: - message.state = 2; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.managedAccessIdentity != null) - message.managedAccessIdentity = String(object.managedAccessIdentity); - return message; - }; - - /** - * Creates a plain object from a ResourceStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.ResourceStatus} message ResourceStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - object.managedAccessIdentity = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) - object.managedAccessIdentity = message.managedAccessIdentity; - return object; - }; - - /** - * Converts this ResourceStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @instance - * @returns {Object.} JSON object - */ - ResourceStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.ResourceStatus"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.ResourceStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} ERROR=2 ERROR value - */ - ResourceStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "ERROR"] = 2; - return values; - })(); - - return ResourceStatus; - })(); - - Asset.DiscoveryStatus = (function() { - - /** - * Properties of a DiscoveryStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @interface IDiscoveryStatus - * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State|null} [state] DiscoveryStatus state - * @property {string|null} [message] DiscoveryStatus message - * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryStatus updateTime - * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryStatus lastRunTime - * @property {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null} [stats] DiscoveryStatus stats - * @property {google.protobuf.IDuration|null} [lastRunDuration] DiscoveryStatus lastRunDuration - */ - - /** - * Constructs a new DiscoveryStatus. - * @memberof google.cloud.dataplex.v1.Asset - * @classdesc Represents a DiscoveryStatus. - * @implements IDiscoveryStatus - * @constructor - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set - */ - function DiscoveryStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DiscoveryStatus state. - * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.State} state - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.state = 0; - - /** - * DiscoveryStatus message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.message = ""; - - /** - * DiscoveryStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.updateTime = null; - - /** - * DiscoveryStatus lastRunTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.lastRunTime = null; - - /** - * DiscoveryStatus stats. - * @member {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats|null|undefined} stats - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.stats = null; - - /** - * DiscoveryStatus lastRunDuration. - * @member {google.protobuf.IDuration|null|undefined} lastRunDuration - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - */ - DiscoveryStatus.prototype.lastRunDuration = null; - - /** - * Creates a new DiscoveryStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus instance - */ - DiscoveryStatus.create = function create(properties) { - return new DiscoveryStatus(properties); - }; - - /** - * Encodes the specified DiscoveryStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryStatus.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) - $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) - $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.encode(message.stats, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastRunDuration != null && Object.hasOwnProperty.call(message, "lastRunDuration")) - $root.google.protobuf.Duration.encode(message.lastRunDuration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DiscoveryStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.IDiscoveryStatus} message DiscoveryStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.decode(reader, reader.uint32()); - break; - } - case 7: { - message.lastRunDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoveryStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoveryStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoveryStatus.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 5: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); - if (error) - return "lastRunTime." + error; - } - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify(message.stats); - if (error) - return "stats." + error; - } - if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) { - var error = $root.google.protobuf.Duration.verify(message.lastRunDuration); - if (error) - return "lastRunDuration." + error; - } - return null; - }; - - /** - * Creates a DiscoveryStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus} DiscoveryStatus - */ - DiscoveryStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SCHEDULED": - case 1: - message.state = 1; - break; - case "IN_PROGRESS": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "DISABLED": - case 5: - message.state = 5; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastRunTime != null) { - if (typeof object.lastRunTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunTime: object expected"); - message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); - } - if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.stats: object expected"); - message.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.fromObject(object.stats); - } - if (object.lastRunDuration != null) { - if (typeof object.lastRunDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.Asset.DiscoveryStatus.lastRunDuration: object expected"); - message.lastRunDuration = $root.google.protobuf.Duration.fromObject(object.lastRunDuration); - } - return message; - }; - - /** - * Creates a plain object from a DiscoveryStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus} message DiscoveryStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoveryStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.updateTime = null; - object.lastRunTime = null; - object.stats = null; - object.lastRunDuration = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) - object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.toObject(message.stats, options); - if (message.lastRunDuration != null && message.hasOwnProperty("lastRunDuration")) - object.lastRunDuration = $root.google.protobuf.Duration.toObject(message.lastRunDuration, options); - return object; - }; - - /** - * Converts this DiscoveryStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @instance - * @returns {Object.} JSON object - */ - DiscoveryStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoveryStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoveryStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.Asset.DiscoveryStatus.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} IN_PROGRESS=2 IN_PROGRESS value - * @property {number} PAUSED=3 PAUSED value - * @property {number} DISABLED=5 DISABLED value - */ - DiscoveryStatus.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "IN_PROGRESS"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[5] = "DISABLED"] = 5; - return values; - })(); - - DiscoveryStatus.Stats = (function() { - - /** - * Properties of a Stats. - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @interface IStats - * @property {number|Long|null} [dataItems] Stats dataItems - * @property {number|Long|null} [dataSize] Stats dataSize - * @property {number|Long|null} [tables] Stats tables - * @property {number|Long|null} [filesets] Stats filesets - */ - - /** - * Constructs a new Stats. - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus - * @classdesc Represents a Stats. - * @implements IStats - * @constructor - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set - */ - function Stats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Stats dataItems. - * @member {number|Long} dataItems - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.dataItems = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Stats dataSize. - * @member {number|Long} dataSize - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Stats tables. - * @member {number|Long} tables - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.tables = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Stats filesets. - * @member {number|Long} filesets - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - */ - Stats.prototype.filesets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Stats instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats instance - */ - Stats.create = function create(properties) { - return new Stats(properties); - }; - - /** - * Encodes the specified Stats message. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataItems != null && Object.hasOwnProperty.call(message, "dataItems")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.dataItems); - if (message.dataSize != null && Object.hasOwnProperty.call(message, "dataSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.dataSize); - if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tables); - if (message.filesets != null && Object.hasOwnProperty.call(message, "filesets")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.filesets); - return writer; - }; - - /** - * Encodes the specified Stats message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.IStats} message Stats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Stats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataItems = reader.int64(); - break; - } - case 2: { - message.dataSize = reader.int64(); - break; - } - case 3: { - message.tables = reader.int64(); - break; - } - case 4: { - message.filesets = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Stats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Stats message. - * @function verify - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataItems != null && message.hasOwnProperty("dataItems")) - if (!$util.isInteger(message.dataItems) && !(message.dataItems && $util.isInteger(message.dataItems.low) && $util.isInteger(message.dataItems.high))) - return "dataItems: integer|Long expected"; - if (message.dataSize != null && message.hasOwnProperty("dataSize")) - if (!$util.isInteger(message.dataSize) && !(message.dataSize && $util.isInteger(message.dataSize.low) && $util.isInteger(message.dataSize.high))) - return "dataSize: integer|Long expected"; - if (message.tables != null && message.hasOwnProperty("tables")) - if (!$util.isInteger(message.tables) && !(message.tables && $util.isInteger(message.tables.low) && $util.isInteger(message.tables.high))) - return "tables: integer|Long expected"; - if (message.filesets != null && message.hasOwnProperty("filesets")) - if (!$util.isInteger(message.filesets) && !(message.filesets && $util.isInteger(message.filesets.low) && $util.isInteger(message.filesets.high))) - return "filesets: integer|Long expected"; - return null; - }; - - /** - * Creates a Stats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} Stats - */ - Stats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats) - return object; - var message = new $root.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats(); - if (object.dataItems != null) - if ($util.Long) - (message.dataItems = $util.Long.fromValue(object.dataItems)).unsigned = false; - else if (typeof object.dataItems === "string") - message.dataItems = parseInt(object.dataItems, 10); - else if (typeof object.dataItems === "number") - message.dataItems = object.dataItems; - else if (typeof object.dataItems === "object") - message.dataItems = new $util.LongBits(object.dataItems.low >>> 0, object.dataItems.high >>> 0).toNumber(); - if (object.dataSize != null) - if ($util.Long) - (message.dataSize = $util.Long.fromValue(object.dataSize)).unsigned = false; - else if (typeof object.dataSize === "string") - message.dataSize = parseInt(object.dataSize, 10); - else if (typeof object.dataSize === "number") - message.dataSize = object.dataSize; - else if (typeof object.dataSize === "object") - message.dataSize = new $util.LongBits(object.dataSize.low >>> 0, object.dataSize.high >>> 0).toNumber(); - if (object.tables != null) - if ($util.Long) - (message.tables = $util.Long.fromValue(object.tables)).unsigned = false; - else if (typeof object.tables === "string") - message.tables = parseInt(object.tables, 10); - else if (typeof object.tables === "number") - message.tables = object.tables; - else if (typeof object.tables === "object") - message.tables = new $util.LongBits(object.tables.low >>> 0, object.tables.high >>> 0).toNumber(); - if (object.filesets != null) - if ($util.Long) - (message.filesets = $util.Long.fromValue(object.filesets)).unsigned = false; - else if (typeof object.filesets === "string") - message.filesets = parseInt(object.filesets, 10); - else if (typeof object.filesets === "number") - message.filesets = object.filesets; - else if (typeof object.filesets === "object") - message.filesets = new $util.LongBits(object.filesets.low >>> 0, object.filesets.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Stats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats} message Stats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stats.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.dataItems = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataItems = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataSize = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.tables = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tables = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.filesets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.filesets = options.longs === String ? "0" : 0; - } - if (message.dataItems != null && message.hasOwnProperty("dataItems")) - if (typeof message.dataItems === "number") - object.dataItems = options.longs === String ? String(message.dataItems) : message.dataItems; - else - object.dataItems = options.longs === String ? $util.Long.prototype.toString.call(message.dataItems) : options.longs === Number ? new $util.LongBits(message.dataItems.low >>> 0, message.dataItems.high >>> 0).toNumber() : message.dataItems; - if (message.dataSize != null && message.hasOwnProperty("dataSize")) - if (typeof message.dataSize === "number") - object.dataSize = options.longs === String ? String(message.dataSize) : message.dataSize; - else - object.dataSize = options.longs === String ? $util.Long.prototype.toString.call(message.dataSize) : options.longs === Number ? new $util.LongBits(message.dataSize.low >>> 0, message.dataSize.high >>> 0).toNumber() : message.dataSize; - if (message.tables != null && message.hasOwnProperty("tables")) - if (typeof message.tables === "number") - object.tables = options.longs === String ? String(message.tables) : message.tables; - else - object.tables = options.longs === String ? $util.Long.prototype.toString.call(message.tables) : options.longs === Number ? new $util.LongBits(message.tables.low >>> 0, message.tables.high >>> 0).toNumber() : message.tables; - if (message.filesets != null && message.hasOwnProperty("filesets")) - if (typeof message.filesets === "number") - object.filesets = options.longs === String ? String(message.filesets) : message.filesets; - else - object.filesets = options.longs === String ? $util.Long.prototype.toString.call(message.filesets) : options.longs === Number ? new $util.LongBits(message.filesets.low >>> 0, message.filesets.high >>> 0).toNumber() : message.filesets; - return object; - }; - - /** - * Converts this Stats to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @instance - * @returns {Object.} JSON object - */ - Stats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Stats - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Stats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"; - }; - - return Stats; - })(); - - return DiscoveryStatus; - })(); - - return Asset; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} ACTION_REQUIRED=4 ACTION_REQUIRED value - */ - v1.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ACTION_REQUIRED"] = 4; - return values; - })(); - - v1.CatalogService = (function() { - - /** - * Constructs a new CatalogService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CatalogService - * @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 CatalogService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CatalogService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CatalogService; - - /** - * Creates new CatalogService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.CatalogService - * @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 {CatalogService} RPC service. Useful where requests and/or responses are streamed. - */ - CatalogService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CreateEntryTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEntryType. - * @function createEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} request CreateEntryTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.createEntryType = function createEntryType(request, callback) { - return this.rpcCall(createEntryType, $root.google.cloud.dataplex.v1.CreateEntryTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEntryType" }); - - /** - * Calls CreateEntryType. - * @function createEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} request CreateEntryTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef UpdateEntryTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEntryType. - * @function updateEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} request UpdateEntryTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.updateEntryType = function updateEntryType(request, callback) { - return this.rpcCall(updateEntryType, $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEntryType" }); - - /** - * Calls UpdateEntryType. - * @function updateEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} request UpdateEntryTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef DeleteEntryTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteEntryType. - * @function deleteEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} request DeleteEntryTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.deleteEntryType = function deleteEntryType(request, callback) { - return this.rpcCall(deleteEntryType, $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEntryType" }); - - /** - * Calls DeleteEntryType. - * @function deleteEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} request DeleteEntryTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryTypes}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef ListEntryTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntryTypesResponse} [response] ListEntryTypesResponse - */ - - /** - * Calls ListEntryTypes. - * @function listEntryTypes - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} request ListEntryTypesRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.ListEntryTypesCallback} callback Node-style callback called with the error, if any, and ListEntryTypesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.listEntryTypes = function listEntryTypes(request, callback) { - return this.rpcCall(listEntryTypes, $root.google.cloud.dataplex.v1.ListEntryTypesRequest, $root.google.cloud.dataplex.v1.ListEntryTypesResponse, request, callback); - }, "name", { value: "ListEntryTypes" }); - - /** - * Calls ListEntryTypes. - * @function listEntryTypes - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} request ListEntryTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef GetEntryTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.EntryType} [response] EntryType - */ - - /** - * Calls GetEntryType. - * @function getEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} request GetEntryTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.GetEntryTypeCallback} callback Node-style callback called with the error, if any, and EntryType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.getEntryType = function getEntryType(request, callback) { - return this.rpcCall(getEntryType, $root.google.cloud.dataplex.v1.GetEntryTypeRequest, $root.google.cloud.dataplex.v1.EntryType, request, callback); - }, "name", { value: "GetEntryType" }); - - /** - * Calls GetEntryType. - * @function getEntryType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} request GetEntryTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createAspectType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CreateAspectTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateAspectType. - * @function createAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} request CreateAspectTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CreateAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.createAspectType = function createAspectType(request, callback) { - return this.rpcCall(createAspectType, $root.google.cloud.dataplex.v1.CreateAspectTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAspectType" }); - - /** - * Calls CreateAspectType. - * @function createAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} request CreateAspectTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateAspectType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef UpdateAspectTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateAspectType. - * @function updateAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} request UpdateAspectTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.UpdateAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.updateAspectType = function updateAspectType(request, callback) { - return this.rpcCall(updateAspectType, $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAspectType" }); - - /** - * Calls UpdateAspectType. - * @function updateAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} request UpdateAspectTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteAspectType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef DeleteAspectTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteAspectType. - * @function deleteAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} request DeleteAspectTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.DeleteAspectTypeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.deleteAspectType = function deleteAspectType(request, callback) { - return this.rpcCall(deleteAspectType, $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAspectType" }); - - /** - * Calls DeleteAspectType. - * @function deleteAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} request DeleteAspectTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listAspectTypes}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef ListAspectTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListAspectTypesResponse} [response] ListAspectTypesResponse - */ - - /** - * Calls ListAspectTypes. - * @function listAspectTypes - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} request ListAspectTypesRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.ListAspectTypesCallback} callback Node-style callback called with the error, if any, and ListAspectTypesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.listAspectTypes = function listAspectTypes(request, callback) { - return this.rpcCall(listAspectTypes, $root.google.cloud.dataplex.v1.ListAspectTypesRequest, $root.google.cloud.dataplex.v1.ListAspectTypesResponse, request, callback); - }, "name", { value: "ListAspectTypes" }); - - /** - * Calls ListAspectTypes. - * @function listAspectTypes - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} request ListAspectTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getAspectType}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef GetAspectTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.AspectType} [response] AspectType - */ - - /** - * Calls GetAspectType. - * @function getAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} request GetAspectTypeRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.GetAspectTypeCallback} callback Node-style callback called with the error, if any, and AspectType - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.getAspectType = function getAspectType(request, callback) { - return this.rpcCall(getAspectType, $root.google.cloud.dataplex.v1.GetAspectTypeRequest, $root.google.cloud.dataplex.v1.AspectType, request, callback); - }, "name", { value: "GetAspectType" }); - - /** - * Calls GetAspectType. - * @function getAspectType - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} request GetAspectTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntryGroup}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CreateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.createEntryGroup = function createEntryGroup(request, callback) { - return this.rpcCall(createEntryGroup, $root.google.cloud.dataplex.v1.CreateEntryGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEntryGroup" }); - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntryGroup}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef UpdateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.updateEntryGroup = function updateEntryGroup(request, callback) { - return this.rpcCall(updateEntryGroup, $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEntryGroup" }); - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntryGroup}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef DeleteEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { - return this.rpcCall(deleteEntryGroup, $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEntryGroup" }); - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntryGroups}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef ListEntryGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntryGroupsResponse} [response] ListEntryGroupsResponse - */ - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.ListEntryGroupsCallback} callback Node-style callback called with the error, if any, and ListEntryGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.listEntryGroups = function listEntryGroups(request, callback) { - return this.rpcCall(listEntryGroups, $root.google.cloud.dataplex.v1.ListEntryGroupsRequest, $root.google.cloud.dataplex.v1.ListEntryGroupsResponse, request, callback); - }, "name", { value: "ListEntryGroups" }); - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntryGroup}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef GetEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.getEntryGroup = function getEntryGroup(request, callback) { - return this.rpcCall(getEntryGroup, $root.google.cloud.dataplex.v1.GetEntryGroupRequest, $root.google.cloud.dataplex.v1.EntryGroup, request, callback); - }, "name", { value: "GetEntryGroup" }); - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createEntry}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CreateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entry} [response] Entry - */ - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.createEntry = function createEntry(request, callback) { - return this.rpcCall(createEntry, $root.google.cloud.dataplex.v1.CreateEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); - }, "name", { value: "CreateEntry" }); - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|updateEntry}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef UpdateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entry} [response] Entry - */ - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.updateEntry = function updateEntry(request, callback) { - return this.rpcCall(updateEntry, $root.google.cloud.dataplex.v1.UpdateEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); - }, "name", { value: "UpdateEntry" }); - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|deleteEntry}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef DeleteEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entry} [response] Entry - */ - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.deleteEntry = function deleteEntry(request, callback) { - return this.rpcCall(deleteEntry, $root.google.cloud.dataplex.v1.DeleteEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); - }, "name", { value: "DeleteEntry" }); - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listEntries}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef ListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntriesResponse} [response] ListEntriesResponse - */ - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.ListEntriesCallback} callback Node-style callback called with the error, if any, and ListEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.listEntries = function listEntries(request, callback) { - return this.rpcCall(listEntries, $root.google.cloud.dataplex.v1.ListEntriesRequest, $root.google.cloud.dataplex.v1.ListEntriesResponse, request, callback); - }, "name", { value: "ListEntries" }); - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getEntry}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef GetEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entry} [response] Entry - */ - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryRequest} request GetEntryRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.getEntry = function getEntry(request, callback) { - return this.rpcCall(getEntry, $root.google.cloud.dataplex.v1.GetEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); - }, "name", { value: "GetEntry" }); - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntryRequest} request GetEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|lookupEntry}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef LookupEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entry} [response] Entry - */ - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.lookupEntry = function lookupEntry(request, callback) { - return this.rpcCall(lookupEntry, $root.google.cloud.dataplex.v1.LookupEntryRequest, $root.google.cloud.dataplex.v1.Entry, request, callback); - }, "name", { value: "LookupEntry" }); - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|searchEntries}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef SearchEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.SearchEntriesResponse} [response] SearchEntriesResponse - */ - - /** - * Calls SearchEntries. - * @function searchEntries - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} request SearchEntriesRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.SearchEntriesCallback} callback Node-style callback called with the error, if any, and SearchEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.searchEntries = function searchEntries(request, callback) { - return this.rpcCall(searchEntries, $root.google.cloud.dataplex.v1.SearchEntriesRequest, $root.google.cloud.dataplex.v1.SearchEntriesResponse, request, callback); - }, "name", { value: "SearchEntries" }); - - /** - * Calls SearchEntries. - * @function searchEntries - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} request SearchEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CreateMetadataJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateMetadataJob. - * @function createMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.createMetadataJob = function createMetadataJob(request, callback) { - return this.rpcCall(createMetadataJob, $root.google.cloud.dataplex.v1.CreateMetadataJobRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateMetadataJob" }); - - /** - * Calls CreateMetadataJob. - * @function createMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef GetMetadataJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.MetadataJob} [response] MetadataJob - */ - - /** - * Calls GetMetadataJob. - * @function getMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback} callback Node-style callback called with the error, if any, and MetadataJob - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.getMetadataJob = function getMetadataJob(request, callback) { - return this.rpcCall(getMetadataJob, $root.google.cloud.dataplex.v1.GetMetadataJobRequest, $root.google.cloud.dataplex.v1.MetadataJob, request, callback); - }, "name", { value: "GetMetadataJob" }); - - /** - * Calls GetMetadataJob. - * @function getMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef ListMetadataJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} [response] ListMetadataJobsResponse - */ - - /** - * Calls ListMetadataJobs. - * @function listMetadataJobs - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback} callback Node-style callback called with the error, if any, and ListMetadataJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.listMetadataJobs = function listMetadataJobs(request, callback) { - return this.rpcCall(listMetadataJobs, $root.google.cloud.dataplex.v1.ListMetadataJobsRequest, $root.google.cloud.dataplex.v1.ListMetadataJobsResponse, request, callback); - }, "name", { value: "ListMetadataJobs" }); - - /** - * Calls ListMetadataJobs. - * @function listMetadataJobs - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. - * @memberof google.cloud.dataplex.v1.CatalogService - * @typedef CancelMetadataJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelMetadataJob. - * @function cancelMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object - * @param {google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CatalogService.prototype.cancelMetadataJob = function cancelMetadataJob(request, callback) { - return this.rpcCall(cancelMetadataJob, $root.google.cloud.dataplex.v1.CancelMetadataJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelMetadataJob" }); - - /** - * Calls CancelMetadataJob. - * @function cancelMetadataJob - * @memberof google.cloud.dataplex.v1.CatalogService - * @instance - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return CatalogService; - })(); - - v1.AspectType = (function() { - - /** - * Properties of an AspectType. - * @memberof google.cloud.dataplex.v1 - * @interface IAspectType - * @property {string|null} [name] AspectType name - * @property {string|null} [uid] AspectType uid - * @property {google.protobuf.ITimestamp|null} [createTime] AspectType createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AspectType updateTime - * @property {string|null} [description] AspectType description - * @property {string|null} [displayName] AspectType displayName - * @property {Object.|null} [labels] AspectType labels - * @property {string|null} [etag] AspectType etag - * @property {google.cloud.dataplex.v1.AspectType.IAuthorization|null} [authorization] AspectType authorization - * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [metadataTemplate] AspectType metadataTemplate - * @property {google.cloud.dataplex.v1.TransferStatus|null} [transferStatus] AspectType transferStatus - */ - - /** - * Constructs a new AspectType. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an AspectType. - * @implements IAspectType - * @constructor - * @param {google.cloud.dataplex.v1.IAspectType=} [properties] Properties to set - */ - function AspectType(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]]; - } - - /** - * AspectType name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.name = ""; - - /** - * AspectType uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.uid = ""; - - /** - * AspectType createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.createTime = null; - - /** - * AspectType updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.updateTime = null; - - /** - * AspectType description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.description = ""; - - /** - * AspectType displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.displayName = ""; - - /** - * AspectType labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.labels = $util.emptyObject; - - /** - * AspectType etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.etag = ""; - - /** - * AspectType authorization. - * @member {google.cloud.dataplex.v1.AspectType.IAuthorization|null|undefined} authorization - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.authorization = null; - - /** - * AspectType metadataTemplate. - * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} metadataTemplate - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.metadataTemplate = null; - - /** - * AspectType transferStatus. - * @member {google.cloud.dataplex.v1.TransferStatus} transferStatus - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - */ - AspectType.prototype.transferStatus = 0; - - /** - * Creates a new AspectType instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {google.cloud.dataplex.v1.IAspectType=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType} AspectType instance - */ - AspectType.create = function create(properties) { - return new AspectType(properties); - }; - - /** - * Encodes the specified AspectType message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {google.cloud.dataplex.v1.IAspectType} message AspectType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) - $root.google.cloud.dataplex.v1.AspectType.Authorization.encode(message.authorization, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.metadataTemplate != null && Object.hasOwnProperty.call(message, "metadataTemplate")) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.metadataTemplate, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.transferStatus != null && Object.hasOwnProperty.call(message, "transferStatus")) - writer.uint32(/* id 202, wireType 0 =*/1616).int32(message.transferStatus); - return writer; - }; - - /** - * Encodes the specified AspectType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {google.cloud.dataplex.v1.IAspectType} message AspectType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AspectType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType} AspectType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 52: { - message.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.decode(reader, reader.uint32()); - break; - } - case 53: { - message.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); - break; - } - case 202: { - message.transferStatus = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AspectType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType} AspectType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AspectType message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AspectType.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.authorization != null && message.hasOwnProperty("authorization")) { - var error = $root.google.cloud.dataplex.v1.AspectType.Authorization.verify(message.authorization); - if (error) - return "authorization." + error; - } - if (message.metadataTemplate != null && message.hasOwnProperty("metadataTemplate")) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.metadataTemplate); - if (error) - return "metadataTemplate." + error; - } - if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) - switch (message.transferStatus) { - default: - return "transferStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an AspectType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType} AspectType - */ - AspectType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.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.dataplex.v1.AspectType.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.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.etag != null) - message.etag = String(object.etag); - if (object.authorization != null) { - if (typeof object.authorization !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.authorization: object expected"); - message.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.fromObject(object.authorization); - } - if (object.metadataTemplate != null) { - if (typeof object.metadataTemplate !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.metadataTemplate: object expected"); - message.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.metadataTemplate); - } - switch (object.transferStatus) { - default: - if (typeof object.transferStatus === "number") { - message.transferStatus = object.transferStatus; - break; - } - break; - case "TRANSFER_STATUS_UNSPECIFIED": - case 0: - message.transferStatus = 0; - break; - case "TRANSFER_STATUS_MIGRATED": - case 1: - message.transferStatus = 1; - break; - case "TRANSFER_STATUS_TRANSFERRED": - case 2: - message.transferStatus = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AspectType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {google.cloud.dataplex.v1.AspectType} message AspectType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AspectType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.etag = ""; - object.authorization = null; - object.metadataTemplate = null; - object.transferStatus = options.enums === String ? "TRANSFER_STATUS_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.authorization != null && message.hasOwnProperty("authorization")) - object.authorization = $root.google.cloud.dataplex.v1.AspectType.Authorization.toObject(message.authorization, options); - if (message.metadataTemplate != null && message.hasOwnProperty("metadataTemplate")) - object.metadataTemplate = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.metadataTemplate, options); - if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) - object.transferStatus = options.enums === String ? $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] === undefined ? message.transferStatus : $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] : message.transferStatus; - return object; - }; - - /** - * Converts this AspectType to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType - * @instance - * @returns {Object.} JSON object - */ - AspectType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AspectType - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AspectType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType"; - }; - - AspectType.Authorization = (function() { - - /** - * Properties of an Authorization. - * @memberof google.cloud.dataplex.v1.AspectType - * @interface IAuthorization - * @property {string|null} [alternateUsePermission] Authorization alternateUsePermission - */ - - /** - * Constructs a new Authorization. - * @memberof google.cloud.dataplex.v1.AspectType - * @classdesc Represents an Authorization. - * @implements IAuthorization - * @constructor - * @param {google.cloud.dataplex.v1.AspectType.IAuthorization=} [properties] Properties to set - */ - function Authorization(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Authorization alternateUsePermission. - * @member {string} alternateUsePermission - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @instance - */ - Authorization.prototype.alternateUsePermission = ""; - - /** - * Creates a new Authorization instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {google.cloud.dataplex.v1.AspectType.IAuthorization=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization instance - */ - Authorization.create = function create(properties) { - return new Authorization(properties); - }; - - /** - * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {google.cloud.dataplex.v1.AspectType.IAuthorization} message Authorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Authorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.alternateUsePermission != null && Object.hasOwnProperty.call(message, "alternateUsePermission")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.alternateUsePermission); - return writer; - }; - - /** - * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.Authorization.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {google.cloud.dataplex.v1.AspectType.IAuthorization} message Authorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Authorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Authorization message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Authorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.Authorization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.alternateUsePermission = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Authorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Authorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Authorization message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Authorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) - if (!$util.isString(message.alternateUsePermission)) - return "alternateUsePermission: string expected"; - return null; - }; - - /** - * Creates an Authorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType.Authorization} Authorization - */ - Authorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType.Authorization) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType.Authorization(); - if (object.alternateUsePermission != null) - message.alternateUsePermission = String(object.alternateUsePermission); - return message; - }; - - /** - * Creates a plain object from an Authorization message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {google.cloud.dataplex.v1.AspectType.Authorization} message Authorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Authorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.alternateUsePermission = ""; - if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) - object.alternateUsePermission = message.alternateUsePermission; - return object; - }; - - /** - * Converts this Authorization to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @instance - * @returns {Object.} JSON object - */ - Authorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Authorization - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectType.Authorization - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Authorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.Authorization"; - }; - - return Authorization; - })(); - - AspectType.MetadataTemplate = (function() { - - /** - * Properties of a MetadataTemplate. - * @memberof google.cloud.dataplex.v1.AspectType - * @interface IMetadataTemplate - * @property {number|null} [index] MetadataTemplate index - * @property {string|null} [name] MetadataTemplate name - * @property {string|null} [type] MetadataTemplate type - * @property {Array.|null} [recordFields] MetadataTemplate recordFields - * @property {Array.|null} [enumValues] MetadataTemplate enumValues - * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [mapItems] MetadataTemplate mapItems - * @property {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null} [arrayItems] MetadataTemplate arrayItems - * @property {string|null} [typeId] MetadataTemplate typeId - * @property {string|null} [typeRef] MetadataTemplate typeRef - * @property {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null} [constraints] MetadataTemplate constraints - * @property {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null} [annotations] MetadataTemplate annotations - */ - - /** - * Constructs a new MetadataTemplate. - * @memberof google.cloud.dataplex.v1.AspectType - * @classdesc Represents a MetadataTemplate. - * @implements IMetadataTemplate - * @constructor - * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate=} [properties] Properties to set - */ - function MetadataTemplate(properties) { - this.recordFields = []; - this.enumValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MetadataTemplate index. - * @member {number} index - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.index = 0; - - /** - * MetadataTemplate name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.name = ""; - - /** - * MetadataTemplate type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.type = ""; - - /** - * MetadataTemplate recordFields. - * @member {Array.} recordFields - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.recordFields = $util.emptyArray; - - /** - * MetadataTemplate enumValues. - * @member {Array.} enumValues - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.enumValues = $util.emptyArray; - - /** - * MetadataTemplate mapItems. - * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} mapItems - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.mapItems = null; - - /** - * MetadataTemplate arrayItems. - * @member {google.cloud.dataplex.v1.AspectType.IMetadataTemplate|null|undefined} arrayItems - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.arrayItems = null; - - /** - * MetadataTemplate typeId. - * @member {string} typeId - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.typeId = ""; - - /** - * MetadataTemplate typeRef. - * @member {string} typeRef - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.typeRef = ""; - - /** - * MetadataTemplate constraints. - * @member {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints|null|undefined} constraints - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.constraints = null; - - /** - * MetadataTemplate annotations. - * @member {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations|null|undefined} annotations - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - */ - MetadataTemplate.prototype.annotations = null; - - /** - * Creates a new MetadataTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate instance - */ - MetadataTemplate.create = function create(properties) { - return new MetadataTemplate(properties); - }; - - /** - * Encodes the specified MetadataTemplate message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate} message MetadataTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); - if (message.recordFields != null && message.recordFields.length) - for (var i = 0; i < message.recordFields.length; ++i) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.recordFields[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.enumValues != null && message.enumValues.length) - for (var i = 0; i < message.enumValues.length; ++i) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.encode(message.enumValues[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.mapItems != null && Object.hasOwnProperty.call(message, "mapItems")) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.mapItems, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.arrayItems != null && Object.hasOwnProperty.call(message, "arrayItems")) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.encode(message.arrayItems, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.typeId != null && Object.hasOwnProperty.call(message, "typeId")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.typeId); - if (message.typeRef != null && Object.hasOwnProperty.call(message, "typeRef")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.typeRef); - if (message.constraints != null && Object.hasOwnProperty.call(message, "constraints")) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.encode(message.constraints, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.encode(message.annotations, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MetadataTemplate message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {google.cloud.dataplex.v1.AspectType.IMetadataTemplate} message MetadataTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetadataTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataTemplate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.index = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 5: { - message.type = reader.string(); - break; - } - case 6: { - if (!(message.recordFields && message.recordFields.length)) - message.recordFields = []; - message.recordFields.push($root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.enumValues && message.enumValues.length)) - message.enumValues = []; - message.enumValues.push($root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.decode(reader, reader.uint32())); - break; - } - case 10: { - message.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); - break; - } - case 11: { - message.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.decode(reader, reader.uint32()); - break; - } - case 12: { - message.typeId = reader.string(); - break; - } - case 13: { - message.typeRef = reader.string(); - break; - } - case 50: { - message.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.decode(reader, reader.uint32()); - break; - } - case 51: { - message.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetadataTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetadataTemplate message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetadataTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.recordFields != null && message.hasOwnProperty("recordFields")) { - if (!Array.isArray(message.recordFields)) - return "recordFields: array expected"; - for (var i = 0; i < message.recordFields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.recordFields[i]); - if (error) - return "recordFields." + error; - } - } - if (message.enumValues != null && message.hasOwnProperty("enumValues")) { - if (!Array.isArray(message.enumValues)) - return "enumValues: array expected"; - for (var i = 0; i < message.enumValues.length; ++i) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify(message.enumValues[i]); - if (error) - return "enumValues." + error; - } - } - if (message.mapItems != null && message.hasOwnProperty("mapItems")) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.mapItems); - if (error) - return "mapItems." + error; - } - if (message.arrayItems != null && message.hasOwnProperty("arrayItems")) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.verify(message.arrayItems); - if (error) - return "arrayItems." + error; - } - if (message.typeId != null && message.hasOwnProperty("typeId")) - if (!$util.isString(message.typeId)) - return "typeId: string expected"; - if (message.typeRef != null && message.hasOwnProperty("typeRef")) - if (!$util.isString(message.typeRef)) - return "typeRef: string expected"; - if (message.constraints != null && message.hasOwnProperty("constraints")) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify(message.constraints); - if (error) - return "constraints." + error; - } - if (message.annotations != null && message.hasOwnProperty("annotations")) { - var error = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify(message.annotations); - if (error) - return "annotations." + error; - } - return null; - }; - - /** - * Creates a MetadataTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate} MetadataTemplate - */ - MetadataTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate(); - if (object.index != null) - message.index = object.index | 0; - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.recordFields) { - if (!Array.isArray(object.recordFields)) - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.recordFields: array expected"); - message.recordFields = []; - for (var i = 0; i < object.recordFields.length; ++i) { - if (typeof object.recordFields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.recordFields: object expected"); - message.recordFields[i] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.recordFields[i]); - } - } - if (object.enumValues) { - if (!Array.isArray(object.enumValues)) - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.enumValues: array expected"); - message.enumValues = []; - for (var i = 0; i < object.enumValues.length; ++i) { - if (typeof object.enumValues[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.enumValues: object expected"); - message.enumValues[i] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.fromObject(object.enumValues[i]); - } - } - if (object.mapItems != null) { - if (typeof object.mapItems !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.mapItems: object expected"); - message.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.mapItems); - } - if (object.arrayItems != null) { - if (typeof object.arrayItems !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.arrayItems: object expected"); - message.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.fromObject(object.arrayItems); - } - if (object.typeId != null) - message.typeId = String(object.typeId); - if (object.typeRef != null) - message.typeRef = String(object.typeRef); - if (object.constraints != null) { - if (typeof object.constraints !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.constraints: object expected"); - message.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.fromObject(object.constraints); - } - if (object.annotations != null) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.annotations: object expected"); - message.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.fromObject(object.annotations); - } - return message; - }; - - /** - * Creates a plain object from a MetadataTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate} message MetadataTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetadataTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.recordFields = []; - object.enumValues = []; - } - if (options.defaults) { - object.index = 0; - object.name = ""; - object.type = ""; - object.mapItems = null; - object.arrayItems = null; - object.typeId = ""; - object.typeRef = ""; - object.constraints = null; - object.annotations = null; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.recordFields && message.recordFields.length) { - object.recordFields = []; - for (var j = 0; j < message.recordFields.length; ++j) - object.recordFields[j] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.recordFields[j], options); - } - if (message.enumValues && message.enumValues.length) { - object.enumValues = []; - for (var j = 0; j < message.enumValues.length; ++j) - object.enumValues[j] = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.toObject(message.enumValues[j], options); - } - if (message.mapItems != null && message.hasOwnProperty("mapItems")) - object.mapItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.mapItems, options); - if (message.arrayItems != null && message.hasOwnProperty("arrayItems")) - object.arrayItems = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.toObject(message.arrayItems, options); - if (message.typeId != null && message.hasOwnProperty("typeId")) - object.typeId = message.typeId; - if (message.typeRef != null && message.hasOwnProperty("typeRef")) - object.typeRef = message.typeRef; - if (message.constraints != null && message.hasOwnProperty("constraints")) - object.constraints = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.toObject(message.constraints, options); - if (message.annotations != null && message.hasOwnProperty("annotations")) - object.annotations = $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.toObject(message.annotations, options); - return object; - }; - - /** - * Converts this MetadataTemplate to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @instance - * @returns {Object.} JSON object - */ - MetadataTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetadataTemplate - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetadataTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate"; - }; - - MetadataTemplate.EnumValue = (function() { - - /** - * Properties of an EnumValue. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @interface IEnumValue - * @property {number|null} [index] EnumValue index - * @property {string|null} [name] EnumValue name - * @property {string|null} [deprecated] EnumValue deprecated - */ - - /** - * Constructs a new EnumValue. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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 index. - * @member {number} index - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @instance - */ - EnumValue.prototype.index = 0; - - /** - * EnumValue name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @instance - */ - EnumValue.prototype.name = ""; - - /** - * EnumValue deprecated. - * @member {string} deprecated - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @instance - */ - EnumValue.prototype.deprecated = ""; - - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecated); - return writer; - }; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.index = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.deprecated = 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.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (!$util.isString(message.deprecated)) - return "deprecated: 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.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue(); - if (object.index != null) - message.index = object.index | 0; - if (object.name != null) - message.name = String(object.name); - if (object.deprecated != null) - message.deprecated = String(object.deprecated); - return message; - }; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.index = 0; - object.name = ""; - object.deprecated = ""; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - return object; - }; - - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.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.dataplex.v1.AspectType.MetadataTemplate.EnumValue"; - }; - - return EnumValue; - })(); - - MetadataTemplate.Constraints = (function() { - - /** - * Properties of a Constraints. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @interface IConstraints - * @property {boolean|null} [required] Constraints required - */ - - /** - * Constructs a new Constraints. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @classdesc Represents a Constraints. - * @implements IConstraints - * @constructor - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints=} [properties] Properties to set - */ - function Constraints(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Constraints required. - * @member {boolean} required - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @instance - */ - Constraints.prototype.required = false; - - /** - * Creates a new Constraints instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints instance - */ - Constraints.create = function create(properties) { - return new Constraints(properties); - }; - - /** - * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints} message Constraints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Constraints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.required != null && Object.hasOwnProperty.call(message, "required")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.required); - return writer; - }; - - /** - * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IConstraints} message Constraints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Constraints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Constraints message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Constraints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.required = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Constraints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Constraints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Constraints message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Constraints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.required != null && message.hasOwnProperty("required")) - if (typeof message.required !== "boolean") - return "required: boolean expected"; - return null; - }; - - /** - * Creates a Constraints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} Constraints - */ - Constraints.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints(); - if (object.required != null) - message.required = Boolean(object.required); - return message; - }; - - /** - * Creates a plain object from a Constraints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints} message Constraints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Constraints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.required = false; - if (message.required != null && message.hasOwnProperty("required")) - object.required = message.required; - return object; - }; - - /** - * Converts this Constraints to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @instance - * @returns {Object.} JSON object - */ - Constraints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Constraints - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Constraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"; - }; - - return Constraints; - })(); - - MetadataTemplate.Annotations = (function() { - - /** - * Properties of an Annotations. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @interface IAnnotations - * @property {string|null} [deprecated] Annotations deprecated - * @property {string|null} [displayName] Annotations displayName - * @property {string|null} [description] Annotations description - * @property {number|null} [displayOrder] Annotations displayOrder - * @property {string|null} [stringType] Annotations stringType - * @property {Array.|null} [stringValues] Annotations stringValues - */ - - /** - * Constructs a new Annotations. - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate - * @classdesc Represents an Annotations. - * @implements IAnnotations - * @constructor - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations=} [properties] Properties to set - */ - function Annotations(properties) { - this.stringValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotations deprecated. - * @member {string} deprecated - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.deprecated = ""; - - /** - * Annotations displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.displayName = ""; - - /** - * Annotations description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.description = ""; - - /** - * Annotations displayOrder. - * @member {number} displayOrder - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.displayOrder = 0; - - /** - * Annotations stringType. - * @member {string} stringType - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.stringType = ""; - - /** - * Annotations stringValues. - * @member {Array.} stringValues - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - */ - Annotations.prototype.stringValues = $util.emptyArray; - - /** - * Creates a new Annotations instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations instance - */ - Annotations.create = function create(properties) { - return new Annotations(properties); - }; - - /** - * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations} message Annotations message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotations.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deprecated); - 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.displayOrder != null && Object.hasOwnProperty.call(message, "displayOrder")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.displayOrder); - if (message.stringType != null && Object.hasOwnProperty.call(message, "stringType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.stringType); - if (message.stringValues != null && message.stringValues.length) - for (var i = 0; i < message.stringValues.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.stringValues[i]); - return writer; - }; - - /** - * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.IAnnotations} message Annotations message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotations.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotations message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotations.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.displayOrder = reader.int32(); - break; - } - case 6: { - message.stringType = reader.string(); - break; - } - case 7: { - if (!(message.stringValues && message.stringValues.length)) - message.stringValues = []; - message.stringValues.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotations message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotations.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotations message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotations.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (!$util.isString(message.deprecated)) - return "deprecated: 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.displayOrder != null && message.hasOwnProperty("displayOrder")) - if (!$util.isInteger(message.displayOrder)) - return "displayOrder: integer expected"; - if (message.stringType != null && message.hasOwnProperty("stringType")) - if (!$util.isString(message.stringType)) - return "stringType: string expected"; - if (message.stringValues != null && message.hasOwnProperty("stringValues")) { - if (!Array.isArray(message.stringValues)) - return "stringValues: array expected"; - for (var i = 0; i < message.stringValues.length; ++i) - if (!$util.isString(message.stringValues[i])) - return "stringValues: string[] expected"; - } - return null; - }; - - /** - * Creates an Annotations message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} Annotations - */ - Annotations.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations(); - if (object.deprecated != null) - message.deprecated = String(object.deprecated); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.displayOrder != null) - message.displayOrder = object.displayOrder | 0; - if (object.stringType != null) - message.stringType = String(object.stringType); - if (object.stringValues) { - if (!Array.isArray(object.stringValues)) - throw TypeError(".google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations.stringValues: array expected"); - message.stringValues = []; - for (var i = 0; i < object.stringValues.length; ++i) - message.stringValues[i] = String(object.stringValues[i]); - } - return message; - }; - - /** - * Creates a plain object from an Annotations message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations} message Annotations - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotations.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.stringValues = []; - if (options.defaults) { - object.deprecated = ""; - object.displayName = ""; - object.description = ""; - object.displayOrder = 0; - object.stringType = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayOrder != null && message.hasOwnProperty("displayOrder")) - object.displayOrder = message.displayOrder; - if (message.stringType != null && message.hasOwnProperty("stringType")) - object.stringType = message.stringType; - if (message.stringValues && message.stringValues.length) { - object.stringValues = []; - for (var j = 0; j < message.stringValues.length; ++j) - object.stringValues[j] = message.stringValues[j]; - } - return object; - }; - - /** - * Converts this Annotations to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @instance - * @returns {Object.} JSON object - */ - Annotations.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotations - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"; - }; - - return Annotations; - })(); - - return MetadataTemplate; - })(); - - return AspectType; - })(); - - v1.EntryGroup = (function() { - - /** - * Properties of an EntryGroup. - * @memberof google.cloud.dataplex.v1 - * @interface IEntryGroup - * @property {string|null} [name] EntryGroup name - * @property {string|null} [uid] EntryGroup uid - * @property {google.protobuf.ITimestamp|null} [createTime] EntryGroup createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] EntryGroup updateTime - * @property {string|null} [description] EntryGroup description - * @property {string|null} [displayName] EntryGroup displayName - * @property {Object.|null} [labels] EntryGroup labels - * @property {string|null} [etag] EntryGroup etag - * @property {google.cloud.dataplex.v1.TransferStatus|null} [transferStatus] EntryGroup transferStatus - */ - - /** - * Constructs a new EntryGroup. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an EntryGroup. - * @implements IEntryGroup - * @constructor - * @param {google.cloud.dataplex.v1.IEntryGroup=} [properties] Properties to set - */ - function EntryGroup(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]]; - } - - /** - * EntryGroup name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.name = ""; - - /** - * EntryGroup uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.uid = ""; - - /** - * EntryGroup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.createTime = null; - - /** - * EntryGroup updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.updateTime = null; - - /** - * EntryGroup description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.description = ""; - - /** - * EntryGroup displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.displayName = ""; - - /** - * EntryGroup labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.labels = $util.emptyObject; - - /** - * EntryGroup etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.etag = ""; - - /** - * EntryGroup transferStatus. - * @member {google.cloud.dataplex.v1.TransferStatus} transferStatus - * @memberof google.cloud.dataplex.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.transferStatus = 0; - - /** - * Creates a new EntryGroup instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntryGroup - * @static - * @param {google.cloud.dataplex.v1.IEntryGroup=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntryGroup} EntryGroup instance - */ - EntryGroup.create = function create(properties) { - return new EntryGroup(properties); - }; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.dataplex.v1.EntryGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntryGroup - * @static - * @param {google.cloud.dataplex.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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.transferStatus != null && Object.hasOwnProperty.call(message, "transferStatus")) - writer.uint32(/* id 202, wireType 0 =*/1616).int32(message.transferStatus); - return writer; - }; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntryGroup - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.EntryGroup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 202: { - message.transferStatus = reader.int32(); - 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.dataplex.v1.EntryGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) - switch (message.transferStatus) { - default: - return "transferStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntryGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntryGroup} EntryGroup - */ - EntryGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntryGroup) - return object; - var message = new $root.google.cloud.dataplex.v1.EntryGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryGroup.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.dataplex.v1.EntryGroup.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryGroup.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.etag != null) - message.etag = String(object.etag); - switch (object.transferStatus) { - default: - if (typeof object.transferStatus === "number") { - message.transferStatus = object.transferStatus; - break; - } - break; - case "TRANSFER_STATUS_UNSPECIFIED": - case 0: - message.transferStatus = 0; - break; - case "TRANSFER_STATUS_MIGRATED": - case 1: - message.transferStatus = 1; - break; - case "TRANSFER_STATUS_TRANSFERRED": - case 2: - message.transferStatus = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntryGroup - * @static - * @param {google.cloud.dataplex.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.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.etag = ""; - object.transferStatus = options.enums === String ? "TRANSFER_STATUS_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.transferStatus != null && message.hasOwnProperty("transferStatus")) - object.transferStatus = options.enums === String ? $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] === undefined ? message.transferStatus : $root.google.cloud.dataplex.v1.TransferStatus[message.transferStatus] : message.transferStatus; - return object; - }; - - /** - * Converts this EntryGroup to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.EntryGroup"; - }; - - return EntryGroup; - })(); - - v1.EntryType = (function() { - - /** - * Properties of an EntryType. - * @memberof google.cloud.dataplex.v1 - * @interface IEntryType - * @property {string|null} [name] EntryType name - * @property {string|null} [uid] EntryType uid - * @property {google.protobuf.ITimestamp|null} [createTime] EntryType createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] EntryType updateTime - * @property {string|null} [description] EntryType description - * @property {string|null} [displayName] EntryType displayName - * @property {Object.|null} [labels] EntryType labels - * @property {string|null} [etag] EntryType etag - * @property {Array.|null} [typeAliases] EntryType typeAliases - * @property {string|null} [platform] EntryType platform - * @property {string|null} [system] EntryType system - * @property {Array.|null} [requiredAspects] EntryType requiredAspects - * @property {google.cloud.dataplex.v1.EntryType.IAuthorization|null} [authorization] EntryType authorization - */ - - /** - * Constructs a new EntryType. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an EntryType. - * @implements IEntryType - * @constructor - * @param {google.cloud.dataplex.v1.IEntryType=} [properties] Properties to set - */ - function EntryType(properties) { - this.labels = {}; - this.typeAliases = []; - this.requiredAspects = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntryType name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.name = ""; - - /** - * EntryType uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.uid = ""; - - /** - * EntryType createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.createTime = null; - - /** - * EntryType updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.updateTime = null; - - /** - * EntryType description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.description = ""; - - /** - * EntryType displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.displayName = ""; - - /** - * EntryType labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.labels = $util.emptyObject; - - /** - * EntryType etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.etag = ""; - - /** - * EntryType typeAliases. - * @member {Array.} typeAliases - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.typeAliases = $util.emptyArray; - - /** - * EntryType platform. - * @member {string} platform - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.platform = ""; - - /** - * EntryType system. - * @member {string} system - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.system = ""; - - /** - * EntryType requiredAspects. - * @member {Array.} requiredAspects - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.requiredAspects = $util.emptyArray; - - /** - * EntryType authorization. - * @member {google.cloud.dataplex.v1.EntryType.IAuthorization|null|undefined} authorization - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - */ - EntryType.prototype.authorization = null; - - /** - * Creates a new EntryType instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {google.cloud.dataplex.v1.IEntryType=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntryType} EntryType instance - */ - EntryType.create = function create(properties) { - return new EntryType(properties); - }; - - /** - * Encodes the specified EntryType message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {google.cloud.dataplex.v1.IEntryType} message EntryType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.typeAliases != null && message.typeAliases.length) - for (var i = 0; i < message.typeAliases.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.typeAliases[i]); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.platform); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.system); - if (message.requiredAspects != null && message.requiredAspects.length) - for (var i = 0; i < message.requiredAspects.length; ++i) - $root.google.cloud.dataplex.v1.EntryType.AspectInfo.encode(message.requiredAspects[i], writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) - $root.google.cloud.dataplex.v1.EntryType.Authorization.encode(message.authorization, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EntryType message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {google.cloud.dataplex.v1.IEntryType} message EntryType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntryType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.EntryType} EntryType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 9: { - if (!(message.typeAliases && message.typeAliases.length)) - message.typeAliases = []; - message.typeAliases.push(reader.string()); - break; - } - case 10: { - message.platform = reader.string(); - break; - } - case 11: { - message.system = reader.string(); - break; - } - case 50: { - if (!(message.requiredAspects && message.requiredAspects.length)) - message.requiredAspects = []; - message.requiredAspects.push($root.google.cloud.dataplex.v1.EntryType.AspectInfo.decode(reader, reader.uint32())); - break; - } - case 51: { - message.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntryType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.EntryType} EntryType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntryType message. - * @function verify - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntryType.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.typeAliases != null && message.hasOwnProperty("typeAliases")) { - if (!Array.isArray(message.typeAliases)) - return "typeAliases: array expected"; - for (var i = 0; i < message.typeAliases.length; ++i) - if (!$util.isString(message.typeAliases[i])) - return "typeAliases: string[] expected"; - } - if (message.platform != null && message.hasOwnProperty("platform")) - if (!$util.isString(message.platform)) - return "platform: string expected"; - if (message.system != null && message.hasOwnProperty("system")) - if (!$util.isString(message.system)) - return "system: string expected"; - if (message.requiredAspects != null && message.hasOwnProperty("requiredAspects")) { - if (!Array.isArray(message.requiredAspects)) - return "requiredAspects: array expected"; - for (var i = 0; i < message.requiredAspects.length; ++i) { - var error = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.verify(message.requiredAspects[i]); - if (error) - return "requiredAspects." + error; - } - } - if (message.authorization != null && message.hasOwnProperty("authorization")) { - var error = $root.google.cloud.dataplex.v1.EntryType.Authorization.verify(message.authorization); - if (error) - return "authorization." + error; - } - return null; - }; - - /** - * Creates an EntryType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntryType} EntryType - */ - EntryType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntryType) - return object; - var message = new $root.google.cloud.dataplex.v1.EntryType(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryType.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.dataplex.v1.EntryType.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryType.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.etag != null) - message.etag = String(object.etag); - if (object.typeAliases) { - if (!Array.isArray(object.typeAliases)) - throw TypeError(".google.cloud.dataplex.v1.EntryType.typeAliases: array expected"); - message.typeAliases = []; - for (var i = 0; i < object.typeAliases.length; ++i) - message.typeAliases[i] = String(object.typeAliases[i]); - } - if (object.platform != null) - message.platform = String(object.platform); - if (object.system != null) - message.system = String(object.system); - if (object.requiredAspects) { - if (!Array.isArray(object.requiredAspects)) - throw TypeError(".google.cloud.dataplex.v1.EntryType.requiredAspects: array expected"); - message.requiredAspects = []; - for (var i = 0; i < object.requiredAspects.length; ++i) { - if (typeof object.requiredAspects[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryType.requiredAspects: object expected"); - message.requiredAspects[i] = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.fromObject(object.requiredAspects[i]); - } - } - if (object.authorization != null) { - if (typeof object.authorization !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntryType.authorization: object expected"); - message.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.fromObject(object.authorization); - } - return message; - }; - - /** - * Creates a plain object from an EntryType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {google.cloud.dataplex.v1.EntryType} message EntryType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntryType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.typeAliases = []; - object.requiredAspects = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.etag = ""; - object.platform = ""; - object.system = ""; - object.authorization = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.typeAliases && message.typeAliases.length) { - object.typeAliases = []; - for (var j = 0; j < message.typeAliases.length; ++j) - object.typeAliases[j] = message.typeAliases[j]; - } - if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = message.platform; - if (message.system != null && message.hasOwnProperty("system")) - object.system = message.system; - if (message.requiredAspects && message.requiredAspects.length) { - object.requiredAspects = []; - for (var j = 0; j < message.requiredAspects.length; ++j) - object.requiredAspects[j] = $root.google.cloud.dataplex.v1.EntryType.AspectInfo.toObject(message.requiredAspects[j], options); - } - if (message.authorization != null && message.hasOwnProperty("authorization")) - object.authorization = $root.google.cloud.dataplex.v1.EntryType.Authorization.toObject(message.authorization, options); - return object; - }; - - /** - * Converts this EntryType to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.EntryType - * @instance - * @returns {Object.} JSON object - */ - EntryType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntryType - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.EntryType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntryType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType"; - }; - - EntryType.AspectInfo = (function() { - - /** - * Properties of an AspectInfo. - * @memberof google.cloud.dataplex.v1.EntryType - * @interface IAspectInfo - * @property {string|null} [type] AspectInfo type - */ - - /** - * Constructs a new AspectInfo. - * @memberof google.cloud.dataplex.v1.EntryType - * @classdesc Represents an AspectInfo. - * @implements IAspectInfo - * @constructor - * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo=} [properties] Properties to set - */ - function AspectInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AspectInfo type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @instance - */ - AspectInfo.prototype.type = ""; - - /** - * Creates a new AspectInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo instance - */ - AspectInfo.create = function create(properties) { - return new AspectInfo(properties); - }; - - /** - * Encodes the specified AspectInfo message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo} message AspectInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectInfo.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 AspectInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.AspectInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAspectInfo} message AspectInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AspectInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType.AspectInfo(); - 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 an AspectInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AspectInfo message. - * @function verify - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AspectInfo.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 an AspectInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntryType.AspectInfo} AspectInfo - */ - AspectInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntryType.AspectInfo) - return object; - var message = new $root.google.cloud.dataplex.v1.EntryType.AspectInfo(); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from an AspectInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {google.cloud.dataplex.v1.EntryType.AspectInfo} message AspectInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AspectInfo.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 AspectInfo to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @instance - * @returns {Object.} JSON object - */ - AspectInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AspectInfo - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.EntryType.AspectInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AspectInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType.AspectInfo"; - }; - - return AspectInfo; - })(); - - EntryType.Authorization = (function() { - - /** - * Properties of an Authorization. - * @memberof google.cloud.dataplex.v1.EntryType - * @interface IAuthorization - * @property {string|null} [alternateUsePermission] Authorization alternateUsePermission - */ - - /** - * Constructs a new Authorization. - * @memberof google.cloud.dataplex.v1.EntryType - * @classdesc Represents an Authorization. - * @implements IAuthorization - * @constructor - * @param {google.cloud.dataplex.v1.EntryType.IAuthorization=} [properties] Properties to set - */ - function Authorization(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Authorization alternateUsePermission. - * @member {string} alternateUsePermission - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @instance - */ - Authorization.prototype.alternateUsePermission = ""; - - /** - * Creates a new Authorization instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAuthorization=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization instance - */ - Authorization.create = function create(properties) { - return new Authorization(properties); - }; - - /** - * Encodes the specified Authorization message. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAuthorization} message Authorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Authorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.alternateUsePermission != null && Object.hasOwnProperty.call(message, "alternateUsePermission")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.alternateUsePermission); - return writer; - }; - - /** - * Encodes the specified Authorization message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntryType.Authorization.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {google.cloud.dataplex.v1.EntryType.IAuthorization} message Authorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Authorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Authorization message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Authorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntryType.Authorization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.alternateUsePermission = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Authorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Authorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Authorization message. - * @function verify - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Authorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) - if (!$util.isString(message.alternateUsePermission)) - return "alternateUsePermission: string expected"; - return null; - }; - - /** - * Creates an Authorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntryType.Authorization} Authorization - */ - Authorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntryType.Authorization) - return object; - var message = new $root.google.cloud.dataplex.v1.EntryType.Authorization(); - if (object.alternateUsePermission != null) - message.alternateUsePermission = String(object.alternateUsePermission); - return message; - }; - - /** - * Creates a plain object from an Authorization message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {google.cloud.dataplex.v1.EntryType.Authorization} message Authorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Authorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.alternateUsePermission = ""; - if (message.alternateUsePermission != null && message.hasOwnProperty("alternateUsePermission")) - object.alternateUsePermission = message.alternateUsePermission; - return object; - }; - - /** - * Converts this Authorization to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @instance - * @returns {Object.} JSON object - */ - Authorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Authorization - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.EntryType.Authorization - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Authorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.EntryType.Authorization"; - }; - - return Authorization; - })(); - - return EntryType; - })(); - - v1.Aspect = (function() { - - /** - * Properties of an Aspect. - * @memberof google.cloud.dataplex.v1 - * @interface IAspect - * @property {string|null} [aspectType] Aspect aspectType - * @property {string|null} [path] Aspect path - * @property {google.protobuf.ITimestamp|null} [createTime] Aspect createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Aspect updateTime - * @property {google.protobuf.IStruct|null} [data] Aspect data - * @property {google.cloud.dataplex.v1.IAspectSource|null} [aspectSource] Aspect aspectSource - */ - - /** - * Constructs a new Aspect. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Aspect. - * @implements IAspect - * @constructor - * @param {google.cloud.dataplex.v1.IAspect=} [properties] Properties to set - */ - function Aspect(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Aspect aspectType. - * @member {string} aspectType - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.aspectType = ""; - - /** - * Aspect path. - * @member {string} path - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.path = ""; - - /** - * Aspect createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.createTime = null; - - /** - * Aspect updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.updateTime = null; - - /** - * Aspect data. - * @member {google.protobuf.IStruct|null|undefined} data - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.data = null; - - /** - * Aspect aspectSource. - * @member {google.cloud.dataplex.v1.IAspectSource|null|undefined} aspectSource - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - */ - Aspect.prototype.aspectSource = null; - - /** - * Creates a new Aspect instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {google.cloud.dataplex.v1.IAspect=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Aspect} Aspect instance - */ - Aspect.create = function create(properties) { - return new Aspect(properties); - }; - - /** - * Encodes the specified Aspect message. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {google.cloud.dataplex.v1.IAspect} message Aspect message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aspect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.aspectType); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - $root.google.protobuf.Struct.encode(message.data, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.aspectSource != null && Object.hasOwnProperty.call(message, "aspectSource")) - $root.google.cloud.dataplex.v1.AspectSource.encode(message.aspectSource, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Aspect message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Aspect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {google.cloud.dataplex.v1.IAspect} message Aspect message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Aspect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Aspect message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Aspect} Aspect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aspect.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Aspect(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.aspectType = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.data = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 9: { - message.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Aspect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Aspect} Aspect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Aspect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Aspect message. - * @function verify - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Aspect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aspectType != null && message.hasOwnProperty("aspectType")) - if (!$util.isString(message.aspectType)) - return "aspectType: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.data != null && message.hasOwnProperty("data")) { - var error = $root.google.protobuf.Struct.verify(message.data); - if (error) - return "data." + error; - } - if (message.aspectSource != null && message.hasOwnProperty("aspectSource")) { - var error = $root.google.cloud.dataplex.v1.AspectSource.verify(message.aspectSource); - if (error) - return "aspectSource." + error; - } - return null; - }; - - /** - * Creates an Aspect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Aspect} Aspect - */ - Aspect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Aspect) - return object; - var message = new $root.google.cloud.dataplex.v1.Aspect(); - if (object.aspectType != null) - message.aspectType = String(object.aspectType); - if (object.path != null) - message.path = String(object.path); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Aspect.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.dataplex.v1.Aspect.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.dataplex.v1.Aspect.data: object expected"); - message.data = $root.google.protobuf.Struct.fromObject(object.data); - } - if (object.aspectSource != null) { - if (typeof object.aspectSource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Aspect.aspectSource: object expected"); - message.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.fromObject(object.aspectSource); - } - return message; - }; - - /** - * Creates a plain object from an Aspect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {google.cloud.dataplex.v1.Aspect} message Aspect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Aspect.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.aspectType = ""; - object.path = ""; - object.createTime = null; - object.updateTime = null; - object.data = null; - object.aspectSource = null; - } - if (message.aspectType != null && message.hasOwnProperty("aspectType")) - object.aspectType = message.aspectType; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - 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.data != null && message.hasOwnProperty("data")) - object.data = $root.google.protobuf.Struct.toObject(message.data, options); - if (message.aspectSource != null && message.hasOwnProperty("aspectSource")) - object.aspectSource = $root.google.cloud.dataplex.v1.AspectSource.toObject(message.aspectSource, options); - return object; - }; - - /** - * Converts this Aspect to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Aspect - * @instance - * @returns {Object.} JSON object - */ - Aspect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Aspect - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Aspect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Aspect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Aspect"; - }; - - return Aspect; - })(); - - v1.AspectSource = (function() { - - /** - * Properties of an AspectSource. - * @memberof google.cloud.dataplex.v1 - * @interface IAspectSource - * @property {google.protobuf.ITimestamp|null} [createTime] AspectSource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AspectSource updateTime - * @property {string|null} [dataVersion] AspectSource dataVersion - */ - - /** - * Constructs a new AspectSource. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an AspectSource. - * @implements IAspectSource - * @constructor - * @param {google.cloud.dataplex.v1.IAspectSource=} [properties] Properties to set - */ - function AspectSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AspectSource createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.AspectSource - * @instance - */ - AspectSource.prototype.createTime = null; - - /** - * AspectSource updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.AspectSource - * @instance - */ - AspectSource.prototype.updateTime = null; - - /** - * AspectSource dataVersion. - * @member {string} dataVersion - * @memberof google.cloud.dataplex.v1.AspectSource - * @instance - */ - AspectSource.prototype.dataVersion = ""; - - /** - * Creates a new AspectSource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {google.cloud.dataplex.v1.IAspectSource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource instance - */ - AspectSource.create = function create(properties) { - return new AspectSource(properties); - }; - - /** - * Encodes the specified AspectSource message. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {google.cloud.dataplex.v1.IAspectSource} message AspectSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectSource.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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.dataVersion != null && Object.hasOwnProperty.call(message, "dataVersion")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataVersion); - return writer; - }; - - /** - * Encodes the specified AspectSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.AspectSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {google.cloud.dataplex.v1.IAspectSource} message AspectSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AspectSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AspectSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.AspectSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.dataVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AspectSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AspectSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AspectSource message. - * @function verify - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AspectSource.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.dataVersion != null && message.hasOwnProperty("dataVersion")) - if (!$util.isString(message.dataVersion)) - return "dataVersion: string expected"; - return null; - }; - - /** - * Creates an AspectSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.AspectSource} AspectSource - */ - AspectSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.AspectSource) - return object; - var message = new $root.google.cloud.dataplex.v1.AspectSource(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.AspectSource.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.dataplex.v1.AspectSource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.dataVersion != null) - message.dataVersion = String(object.dataVersion); - return message; - }; - - /** - * Creates a plain object from an AspectSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {google.cloud.dataplex.v1.AspectSource} message AspectSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AspectSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.dataVersion = ""; - } - 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.dataVersion != null && message.hasOwnProperty("dataVersion")) - object.dataVersion = message.dataVersion; - return object; - }; - - /** - * Converts this AspectSource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.AspectSource - * @instance - * @returns {Object.} JSON object - */ - AspectSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AspectSource - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.AspectSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AspectSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.AspectSource"; - }; - - return AspectSource; - })(); - - v1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.dataplex.v1 - * @interface IEntry - * @property {string|null} [name] Entry name - * @property {string|null} [entryType] Entry entryType - * @property {google.protobuf.ITimestamp|null} [createTime] Entry createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Entry updateTime - * @property {Object.|null} [aspects] Entry aspects - * @property {string|null} [parentEntry] Entry parentEntry - * @property {string|null} [fullyQualifiedName] Entry fullyQualifiedName - * @property {google.cloud.dataplex.v1.IEntrySource|null} [entrySource] Entry entrySource - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.dataplex.v1.IEntry=} [properties] Properties to set - */ - function Entry(properties) { - this.aspects = {}; - if (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.dataplex.v1.Entry - * @instance - */ - Entry.prototype.name = ""; - - /** - * Entry entryType. - * @member {string} entryType - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.entryType = ""; - - /** - * Entry createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.createTime = null; - - /** - * Entry updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.updateTime = null; - - /** - * Entry aspects. - * @member {Object.} aspects - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.aspects = $util.emptyObject; - - /** - * Entry parentEntry. - * @member {string} parentEntry - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.parentEntry = ""; - - /** - * Entry fullyQualifiedName. - * @member {string} fullyQualifiedName - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.fullyQualifiedName = ""; - - /** - * Entry entrySource. - * @member {google.cloud.dataplex.v1.IEntrySource|null|undefined} entrySource - * @memberof google.cloud.dataplex.v1.Entry - * @instance - */ - Entry.prototype.entrySource = null; - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entry - * @static - * @param {google.cloud.dataplex.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dataplex.v1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entry - * @static - * @param {google.cloud.dataplex.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.entryType != null && Object.hasOwnProperty.call(message, "entryType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.entryType); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.aspects != null && Object.hasOwnProperty.call(message, "aspects")) - for (var keys = Object.keys(message.aspects), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.dataplex.v1.Aspect.encode(message.aspects[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.parentEntry != null && Object.hasOwnProperty.call(message, "parentEntry")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.parentEntry); - if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.fullyQualifiedName); - if (message.entrySource != null && Object.hasOwnProperty.call(message, "entrySource")) - $root.google.cloud.dataplex.v1.EntrySource.encode(message.entrySource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entry - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.Entry(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 4: { - message.entryType = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - if (message.aspects === $util.emptyObject) - message.aspects = {}; - 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.dataplex.v1.Aspect.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.aspects[key] = value; - break; - } - case 10: { - message.parentEntry = reader.string(); - break; - } - case 12: { - message.fullyQualifiedName = reader.string(); - break; - } - case 15: { - message.entrySource = $root.google.cloud.dataplex.v1.EntrySource.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.dataplex.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.entryType != null && message.hasOwnProperty("entryType")) - if (!$util.isString(message.entryType)) - return "entryType: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.aspects != null && message.hasOwnProperty("aspects")) { - if (!$util.isObject(message.aspects)) - return "aspects: object expected"; - var key = Object.keys(message.aspects); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Aspect.verify(message.aspects[key[i]]); - if (error) - return "aspects." + error; - } - } - if (message.parentEntry != null && message.hasOwnProperty("parentEntry")) - if (!$util.isString(message.parentEntry)) - return "parentEntry: string expected"; - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - if (!$util.isString(message.fullyQualifiedName)) - return "fullyQualifiedName: string expected"; - if (message.entrySource != null && message.hasOwnProperty("entrySource")) { - var error = $root.google.cloud.dataplex.v1.EntrySource.verify(message.entrySource); - if (error) - return "entrySource." + error; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entry) - return object; - var message = new $root.google.cloud.dataplex.v1.Entry(); - if (object.name != null) - message.name = String(object.name); - if (object.entryType != null) - message.entryType = String(object.entryType); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entry.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.dataplex.v1.Entry.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.aspects) { - if (typeof object.aspects !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entry.aspects: object expected"); - message.aspects = {}; - for (var keys = Object.keys(object.aspects), i = 0; i < keys.length; ++i) { - if (typeof object.aspects[keys[i]] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entry.aspects: object expected"); - message.aspects[keys[i]] = $root.google.cloud.dataplex.v1.Aspect.fromObject(object.aspects[keys[i]]); - } - } - if (object.parentEntry != null) - message.parentEntry = String(object.parentEntry); - if (object.fullyQualifiedName != null) - message.fullyQualifiedName = String(object.fullyQualifiedName); - if (object.entrySource != null) { - if (typeof object.entrySource !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entry.entrySource: object expected"); - message.entrySource = $root.google.cloud.dataplex.v1.EntrySource.fromObject(object.entrySource); - } - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entry - * @static - * @param {google.cloud.dataplex.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.aspects = {}; - if (options.defaults) { - object.name = ""; - object.entryType = ""; - object.createTime = null; - object.updateTime = null; - object.parentEntry = ""; - object.fullyQualifiedName = ""; - object.entrySource = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.entryType != null && message.hasOwnProperty("entryType")) - object.entryType = message.entryType; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.aspects && (keys2 = Object.keys(message.aspects)).length) { - object.aspects = {}; - for (var j = 0; j < keys2.length; ++j) - object.aspects[keys2[j]] = $root.google.cloud.dataplex.v1.Aspect.toObject(message.aspects[keys2[j]], options); - } - if (message.parentEntry != null && message.hasOwnProperty("parentEntry")) - object.parentEntry = message.parentEntry; - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - object.fullyQualifiedName = message.fullyQualifiedName; - if (message.entrySource != null && message.hasOwnProperty("entrySource")) - object.entrySource = $root.google.cloud.dataplex.v1.EntrySource.toObject(message.entrySource, options); - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.Entry"; - }; - - return Entry; - })(); - - v1.EntrySource = (function() { - - /** - * Properties of an EntrySource. - * @memberof google.cloud.dataplex.v1 - * @interface IEntrySource - * @property {string|null} [resource] EntrySource resource - * @property {string|null} [system] EntrySource system - * @property {string|null} [platform] EntrySource platform - * @property {string|null} [displayName] EntrySource displayName - * @property {string|null} [description] EntrySource description - * @property {Object.|null} [labels] EntrySource labels - * @property {Array.|null} [ancestors] EntrySource ancestors - * @property {google.protobuf.ITimestamp|null} [createTime] EntrySource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] EntrySource updateTime - * @property {string|null} [location] EntrySource location - */ - - /** - * Constructs a new EntrySource. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an EntrySource. - * @implements IEntrySource - * @constructor - * @param {google.cloud.dataplex.v1.IEntrySource=} [properties] Properties to set - */ - function EntrySource(properties) { - this.labels = {}; - this.ancestors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntrySource resource. - * @member {string} resource - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.resource = ""; - - /** - * EntrySource system. - * @member {string} system - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.system = ""; - - /** - * EntrySource platform. - * @member {string} platform - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.platform = ""; - - /** - * EntrySource displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.displayName = ""; - - /** - * EntrySource description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.description = ""; - - /** - * EntrySource labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.labels = $util.emptyObject; - - /** - * EntrySource ancestors. - * @member {Array.} ancestors - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.ancestors = $util.emptyArray; - - /** - * EntrySource createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.createTime = null; - - /** - * EntrySource updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.updateTime = null; - - /** - * EntrySource location. - * @member {string} location - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - */ - EntrySource.prototype.location = ""; - - /** - * Creates a new EntrySource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {google.cloud.dataplex.v1.IEntrySource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource instance - */ - EntrySource.create = function create(properties) { - return new EntrySource(properties); - }; - - /** - * Encodes the specified EntrySource message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {google.cloud.dataplex.v1.IEntrySource} message EntrySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntrySource.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.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.system); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.platform); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.ancestors != null && message.ancestors.length) - for (var i = 0; i < message.ancestors.length; ++i) - $root.google.cloud.dataplex.v1.EntrySource.Ancestor.encode(message.ancestors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.location); - return writer; - }; - - /** - * Encodes the specified EntrySource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {google.cloud.dataplex.v1.IEntrySource} message EntrySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntrySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntrySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntrySource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntrySource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.system = reader.string(); - break; - } - case 3: { - message.platform = reader.string(); - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 9: { - if (!(message.ancestors && message.ancestors.length)) - message.ancestors = []; - message.ancestors.push($root.google.cloud.dataplex.v1.EntrySource.Ancestor.decode(reader, reader.uint32())); - break; - } - case 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntrySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntrySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntrySource message. - * @function verify - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntrySource.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.system != null && message.hasOwnProperty("system")) - if (!$util.isString(message.system)) - return "system: string expected"; - if (message.platform != null && message.hasOwnProperty("platform")) - if (!$util.isString(message.platform)) - return "platform: 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.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.ancestors != null && message.hasOwnProperty("ancestors")) { - if (!Array.isArray(message.ancestors)) - return "ancestors: array expected"; - for (var i = 0; i < message.ancestors.length; ++i) { - var error = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.verify(message.ancestors[i]); - if (error) - return "ancestors." + error; - } - } - 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.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an EntrySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntrySource} EntrySource - */ - EntrySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntrySource) - return object; - var message = new $root.google.cloud.dataplex.v1.EntrySource(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.system != null) - message.system = String(object.system); - if (object.platform != null) - message.platform = String(object.platform); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntrySource.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.ancestors) { - if (!Array.isArray(object.ancestors)) - throw TypeError(".google.cloud.dataplex.v1.EntrySource.ancestors: array expected"); - message.ancestors = []; - for (var i = 0; i < object.ancestors.length; ++i) { - if (typeof object.ancestors[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntrySource.ancestors: object expected"); - message.ancestors[i] = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.fromObject(object.ancestors[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.EntrySource.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.dataplex.v1.EntrySource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an EntrySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {google.cloud.dataplex.v1.EntrySource} message EntrySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntrySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ancestors = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.resource = ""; - object.system = ""; - object.platform = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.location = ""; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.system != null && message.hasOwnProperty("system")) - object.system = message.system; - if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = message.platform; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.ancestors && message.ancestors.length) { - object.ancestors = []; - for (var j = 0; j < message.ancestors.length; ++j) - object.ancestors[j] = $root.google.cloud.dataplex.v1.EntrySource.Ancestor.toObject(message.ancestors[j], options); - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this EntrySource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.EntrySource - * @instance - * @returns {Object.} JSON object - */ - EntrySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntrySource - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.EntrySource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntrySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.EntrySource"; - }; - - EntrySource.Ancestor = (function() { - - /** - * Properties of an Ancestor. - * @memberof google.cloud.dataplex.v1.EntrySource - * @interface IAncestor - * @property {string|null} [name] Ancestor name - * @property {string|null} [type] Ancestor type - */ - - /** - * Constructs a new Ancestor. - * @memberof google.cloud.dataplex.v1.EntrySource - * @classdesc Represents an Ancestor. - * @implements IAncestor - * @constructor - * @param {google.cloud.dataplex.v1.EntrySource.IAncestor=} [properties] Properties to set - */ - function Ancestor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Ancestor name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @instance - */ - Ancestor.prototype.name = ""; - - /** - * Ancestor type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @instance - */ - Ancestor.prototype.type = ""; - - /** - * Creates a new Ancestor instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {google.cloud.dataplex.v1.EntrySource.IAncestor=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor instance - */ - Ancestor.create = function create(properties) { - return new Ancestor(properties); - }; - - /** - * Encodes the specified Ancestor message. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {google.cloud.dataplex.v1.EntrySource.IAncestor} message Ancestor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Ancestor.encode = function encode(message, writer) { - if (!writer) - 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 2 =*/18).string(message.type); - return writer; - }; - - /** - * Encodes the specified Ancestor message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.EntrySource.Ancestor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {google.cloud.dataplex.v1.EntrySource.IAncestor} message Ancestor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Ancestor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Ancestor message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Ancestor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.EntrySource.Ancestor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Ancestor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Ancestor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Ancestor message. - * @function verify - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Ancestor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates an Ancestor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.EntrySource.Ancestor} Ancestor - */ - Ancestor.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.EntrySource.Ancestor) - return object; - var message = new $root.google.cloud.dataplex.v1.EntrySource.Ancestor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from an Ancestor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {google.cloud.dataplex.v1.EntrySource.Ancestor} message Ancestor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Ancestor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this Ancestor to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @instance - * @returns {Object.} JSON object - */ - Ancestor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Ancestor - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.EntrySource.Ancestor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Ancestor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.EntrySource.Ancestor"; - }; - - return Ancestor; - })(); - - return EntrySource; - })(); - - v1.CreateEntryGroupRequest = (function() { - - /** - * Properties of a CreateEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEntryGroupRequest - * @property {string|null} [parent] CreateEntryGroupRequest parent - * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId - * @property {google.cloud.dataplex.v1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup - * @property {boolean|null} [validateOnly] CreateEntryGroupRequest validateOnly - */ - - /** - * Constructs a new CreateEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEntryGroupRequest. - * @implements ICreateEntryGroupRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.parent = ""; - - /** - * CreateEntryGroupRequest entryGroupId. - * @member {string} entryGroupId - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroupId = ""; - - /** - * CreateEntryGroupRequest entryGroup. - * @member {google.cloud.dataplex.v1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroup = null; - - /** - * CreateEntryGroupRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEntryGroupRequest} CreateEntryGroupRequest instance - */ - CreateEntryGroupRequest.create = function create(properties) { - return new CreateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.entryGroupId != null && Object.hasOwnProperty.call(message, "entryGroupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryGroupId); - if (message.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) - $root.google.cloud.dataplex.v1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.entryGroupId = reader.string(); - break; - } - case 3: { - message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - 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.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.v1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEntryGroupRequest} CreateEntryGroupRequest - */ - CreateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryGroupRequest) - return object; - var message = new $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroup); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.entryGroupId = ""; - object.entryGroup = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - object.entryGroupId = message.entryGroupId; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.toObject(message.entryGroup, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.CreateEntryGroupRequest"; - }; - - return CreateEntryGroupRequest; - })(); - - v1.UpdateEntryGroupRequest = (function() { - - /** - * Properties of an UpdateEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEntryGroupRequest - * @property {google.cloud.dataplex.v1.IEntryGroup|null} [entryGroup] UpdateEntryGroupRequest entryGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryGroupRequest updateMask - * @property {boolean|null} [validateOnly] UpdateEntryGroupRequest validateOnly - */ - - /** - * Constructs a new UpdateEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEntryGroupRequest. - * @implements IUpdateEntryGroupRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.entryGroup = null; - - /** - * UpdateEntryGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.updateMask = null; - - /** - * UpdateEntryGroupRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest instance - */ - UpdateEntryGroupRequest.create = function create(properties) { - return new UpdateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - 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.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - */ - UpdateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEntryGroupRequest(); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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; - object.validateOnly = false; - } - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.dataplex.v1.EntryGroup.toObject(message.entryGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryGroupRequest"; - }; - - return UpdateEntryGroupRequest; - })(); - - v1.DeleteEntryGroupRequest = (function() { - - /** - * Properties of a DeleteEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEntryGroupRequest - * @property {string|null} [name] DeleteEntryGroupRequest name - * @property {string|null} [etag] DeleteEntryGroupRequest etag - */ - - /** - * Constructs a new DeleteEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEntryGroupRequest. - * @implements IDeleteEntryGroupRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.name = ""; - - /** - * DeleteEntryGroupRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.etag = ""; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance - */ - DeleteEntryGroupRequest.create = function create(properties) { - return new DeleteEntryGroupRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - 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.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - */ - DeleteEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryGroupRequest"; - }; - - return DeleteEntryGroupRequest; - })(); - - v1.ListEntryGroupsRequest = (function() { - - /** - * Properties of a ListEntryGroupsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntryGroupsRequest - * @property {string|null} [parent] ListEntryGroupsRequest parent - * @property {number|null} [pageSize] ListEntryGroupsRequest pageSize - * @property {string|null} [pageToken] ListEntryGroupsRequest pageToken - * @property {string|null} [filter] ListEntryGroupsRequest filter - * @property {string|null} [orderBy] ListEntryGroupsRequest orderBy - */ - - /** - * Constructs a new ListEntryGroupsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntryGroupsRequest. - * @implements IListEntryGroupsRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.parent = ""; - - /** - * ListEntryGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageSize = 0; - - /** - * ListEntryGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageToken = ""; - - /** - * ListEntryGroupsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.filter = ""; - - /** - * ListEntryGroupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntryGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntryGroupsRequest} ListEntryGroupsRequest instance - */ - ListEntryGroupsRequest.create = function create(properties) { - return new ListEntryGroupsRequest(properties); - }; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.dataplex.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); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = 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.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntryGroupsRequest} ListEntryGroupsRequest - */ - ListEntryGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntryGroupsRequest) - return object; - var message = new $root.google.cloud.dataplex.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); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListEntryGroupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.dataplex.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 = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListEntryGroupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntryGroupsRequest"; - }; - - return ListEntryGroupsRequest; - })(); - - v1.ListEntryGroupsResponse = (function() { - - /** - * Properties of a ListEntryGroupsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntryGroupsResponse - * @property {Array.|null} [entryGroups] ListEntryGroupsResponse entryGroups - * @property {string|null} [nextPageToken] ListEntryGroupsResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListEntryGroupsResponse unreachableLocations - */ - - /** - * Constructs a new ListEntryGroupsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntryGroupsResponse. - * @implements IListEntryGroupsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListEntryGroupsResponse=} [properties] Properties to set - */ - function ListEntryGroupsResponse(properties) { - this.entryGroups = []; - this.unreachableLocations = []; - if (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.dataplex.v1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.entryGroups = $util.emptyArray; - - /** - * ListEntryGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.nextPageToken = ""; - - /** - * ListEntryGroupsResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntryGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntryGroupsResponse} ListEntryGroupsResponse instance - */ - ListEntryGroupsResponse.create = function create(properties) { - return new ListEntryGroupsResponse(properties); - }; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.dataplex.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.dataplex.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); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryGroupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.EntryGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(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.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: 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.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntryGroupsResponse} ListEntryGroupsResponse - */ - ListEntryGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntryGroupsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntryGroupsResponse(); - if (object.entryGroups) { - if (!Array.isArray(object.entryGroups)) - throw TypeError(".google.cloud.dataplex.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.dataplex.v1.ListEntryGroupsResponse.entryGroups: object expected"); - message.entryGroups[i] = $root.google.cloud.dataplex.v1.EntryGroup.fromObject(object.entryGroups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListEntryGroupsResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.dataplex.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 = []; - object.unreachableLocations = []; - } - 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.dataplex.v1.EntryGroup.toObject(message.entryGroups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListEntryGroupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntryGroupsResponse"; - }; - - return ListEntryGroupsResponse; - })(); - - v1.GetEntryGroupRequest = (function() { - - /** - * Properties of a GetEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetEntryGroupRequest - * @property {string|null} [name] GetEntryGroupRequest name - */ - - /** - * Constructs a new GetEntryGroupRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntryGroupRequest. - * @implements IGetEntryGroupRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.name = ""; - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntryGroupRequest} GetEntryGroupRequest instance - */ - GetEntryGroupRequest.create = function create(properties) { - return new GetEntryGroupRequest(properties); - }; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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); - return writer; - }; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.GetEntryGroupRequest(); - 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 GetEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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"; - return null; - }; - - /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntryGroupRequest} GetEntryGroupRequest - */ - GetEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntryGroupRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.dataplex.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 = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.GetEntryGroupRequest"; - }; - - return GetEntryGroupRequest; - })(); - - v1.CreateEntryTypeRequest = (function() { - - /** - * Properties of a CreateEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEntryTypeRequest - * @property {string|null} [parent] CreateEntryTypeRequest parent - * @property {string|null} [entryTypeId] CreateEntryTypeRequest entryTypeId - * @property {google.cloud.dataplex.v1.IEntryType|null} [entryType] CreateEntryTypeRequest entryType - * @property {boolean|null} [validateOnly] CreateEntryTypeRequest validateOnly - */ - - /** - * Constructs a new CreateEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEntryTypeRequest. - * @implements ICreateEntryTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest=} [properties] Properties to set - */ - function CreateEntryTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntryTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @instance - */ - CreateEntryTypeRequest.prototype.parent = ""; - - /** - * CreateEntryTypeRequest entryTypeId. - * @member {string} entryTypeId - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @instance - */ - CreateEntryTypeRequest.prototype.entryTypeId = ""; - - /** - * CreateEntryTypeRequest entryType. - * @member {google.cloud.dataplex.v1.IEntryType|null|undefined} entryType - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @instance - */ - CreateEntryTypeRequest.prototype.entryType = null; - - /** - * CreateEntryTypeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @instance - */ - CreateEntryTypeRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateEntryTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest instance - */ - CreateEntryTypeRequest.create = function create(properties) { - return new CreateEntryTypeRequest(properties); - }; - - /** - * Encodes the specified CreateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} message CreateEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryTypeRequest.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.entryTypeId != null && Object.hasOwnProperty.call(message, "entryTypeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryTypeId); - if (message.entryType != null && Object.hasOwnProperty.call(message, "entryType")) - $root.google.cloud.dataplex.v1.EntryType.encode(message.entryType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntryTypeRequest} message CreateEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntryTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntryTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.entryTypeId = reader.string(); - break; - } - case 3: { - message.entryType = $root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntryTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntryTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntryTypeRequest.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.entryTypeId != null && message.hasOwnProperty("entryTypeId")) - if (!$util.isString(message.entryTypeId)) - return "entryTypeId: string expected"; - if (message.entryType != null && message.hasOwnProperty("entryType")) { - var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryType); - if (error) - return "entryType." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEntryTypeRequest} CreateEntryTypeRequest - */ - CreateEntryTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateEntryTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryTypeId != null) - message.entryTypeId = String(object.entryTypeId); - if (object.entryType != null) { - if (typeof object.entryType !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEntryTypeRequest.entryType: object expected"); - message.entryType = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryType); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateEntryTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.CreateEntryTypeRequest} message CreateEntryTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntryTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entryTypeId = ""; - object.entryType = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryTypeId != null && message.hasOwnProperty("entryTypeId")) - object.entryTypeId = message.entryTypeId; - if (message.entryType != null && message.hasOwnProperty("entryType")) - object.entryType = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryType, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateEntryTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntryTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntryTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEntryTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntryTypeRequest"; - }; - - return CreateEntryTypeRequest; - })(); - - v1.UpdateEntryTypeRequest = (function() { - - /** - * Properties of an UpdateEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEntryTypeRequest - * @property {google.cloud.dataplex.v1.IEntryType|null} [entryType] UpdateEntryTypeRequest entryType - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryTypeRequest updateMask - * @property {boolean|null} [validateOnly] UpdateEntryTypeRequest validateOnly - */ - - /** - * Constructs a new UpdateEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEntryTypeRequest. - * @implements IUpdateEntryTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest=} [properties] Properties to set - */ - function UpdateEntryTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntryTypeRequest entryType. - * @member {google.cloud.dataplex.v1.IEntryType|null|undefined} entryType - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @instance - */ - UpdateEntryTypeRequest.prototype.entryType = null; - - /** - * UpdateEntryTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @instance - */ - UpdateEntryTypeRequest.prototype.updateMask = null; - - /** - * UpdateEntryTypeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @instance - */ - UpdateEntryTypeRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateEntryTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest instance - */ - UpdateEntryTypeRequest.create = function create(properties) { - return new UpdateEntryTypeRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} message UpdateEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryType != null && Object.hasOwnProperty.call(message, "entryType")) - $root.google.cloud.dataplex.v1.EntryType.encode(message.entryType, 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(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntryTypeRequest} message UpdateEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entryType = $root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntryTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntryTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntryTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryType != null && message.hasOwnProperty("entryType")) { - var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryType); - if (error) - return "entryType." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEntryTypeRequest} UpdateEntryTypeRequest - */ - UpdateEntryTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEntryTypeRequest(); - if (object.entryType != null) { - if (typeof object.entryType !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryTypeRequest.entryType: object expected"); - message.entryType = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryType); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateEntryTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateEntryTypeRequest} message UpdateEntryTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntryTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entryType = null; - object.updateMask = null; - object.validateOnly = false; - } - if (message.entryType != null && message.hasOwnProperty("entryType")) - object.entryType = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryType, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateEntryTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntryTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntryTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEntryTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntryTypeRequest"; - }; - - return UpdateEntryTypeRequest; - })(); - - v1.DeleteEntryTypeRequest = (function() { - - /** - * Properties of a DeleteEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEntryTypeRequest - * @property {string|null} [name] DeleteEntryTypeRequest name - * @property {string|null} [etag] DeleteEntryTypeRequest etag - */ - - /** - * Constructs a new DeleteEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEntryTypeRequest. - * @implements IDeleteEntryTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest=} [properties] Properties to set - */ - function DeleteEntryTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntryTypeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @instance - */ - DeleteEntryTypeRequest.prototype.name = ""; - - /** - * DeleteEntryTypeRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @instance - */ - DeleteEntryTypeRequest.prototype.etag = ""; - - /** - * Creates a new DeleteEntryTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest instance - */ - DeleteEntryTypeRequest.create = function create(properties) { - return new DeleteEntryTypeRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} message DeleteEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntryTypeRequest} message DeleteEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEntryTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntryTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntryTypeRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEntryTypeRequest} DeleteEntryTypeRequest - */ - DeleteEntryTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEntryTypeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteEntryTypeRequest} message DeleteEntryTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntryTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteEntryTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntryTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntryTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEntryTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntryTypeRequest"; - }; - - return DeleteEntryTypeRequest; - })(); - - v1.ListEntryTypesRequest = (function() { - - /** - * Properties of a ListEntryTypesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntryTypesRequest - * @property {string|null} [parent] ListEntryTypesRequest parent - * @property {number|null} [pageSize] ListEntryTypesRequest pageSize - * @property {string|null} [pageToken] ListEntryTypesRequest pageToken - * @property {string|null} [filter] ListEntryTypesRequest filter - * @property {string|null} [orderBy] ListEntryTypesRequest orderBy - */ - - /** - * Constructs a new ListEntryTypesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntryTypesRequest. - * @implements IListEntryTypesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest=} [properties] Properties to set - */ - function ListEntryTypesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - */ - ListEntryTypesRequest.prototype.parent = ""; - - /** - * ListEntryTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - */ - ListEntryTypesRequest.prototype.pageSize = 0; - - /** - * ListEntryTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - */ - ListEntryTypesRequest.prototype.pageToken = ""; - - /** - * ListEntryTypesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - */ - ListEntryTypesRequest.prototype.filter = ""; - - /** - * ListEntryTypesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - */ - ListEntryTypesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListEntryTypesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest instance - */ - ListEntryTypesRequest.create = function create(properties) { - return new ListEntryTypesRequest(properties); - }; - - /** - * Encodes the specified ListEntryTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} message ListEntryTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryTypesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListEntryTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesRequest} message ListEntryTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryTypesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryTypesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntryTypesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntryTypesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryTypesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryTypesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryTypesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListEntryTypesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntryTypesRequest} ListEntryTypesRequest - */ - ListEntryTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntryTypesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntryTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListEntryTypesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {google.cloud.dataplex.v1.ListEntryTypesRequest} message ListEntryTypesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryTypesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListEntryTypesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntryTypesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryTypesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntryTypesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntryTypesRequest"; - }; - - return ListEntryTypesRequest; - })(); - - v1.ListEntryTypesResponse = (function() { - - /** - * Properties of a ListEntryTypesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntryTypesResponse - * @property {Array.|null} [entryTypes] ListEntryTypesResponse entryTypes - * @property {string|null} [nextPageToken] ListEntryTypesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListEntryTypesResponse unreachableLocations - */ - - /** - * Constructs a new ListEntryTypesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntryTypesResponse. - * @implements IListEntryTypesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListEntryTypesResponse=} [properties] Properties to set - */ - function ListEntryTypesResponse(properties) { - this.entryTypes = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryTypesResponse entryTypes. - * @member {Array.} entryTypes - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @instance - */ - ListEntryTypesResponse.prototype.entryTypes = $util.emptyArray; - - /** - * ListEntryTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @instance - */ - ListEntryTypesResponse.prototype.nextPageToken = ""; - - /** - * ListEntryTypesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @instance - */ - ListEntryTypesResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListEntryTypesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse instance - */ - ListEntryTypesResponse.create = function create(properties) { - return new ListEntryTypesResponse(properties); - }; - - /** - * Encodes the specified ListEntryTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesResponse} message ListEntryTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryTypesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryTypes != null && message.entryTypes.length) - for (var i = 0; i < message.entryTypes.length; ++i) - $root.google.cloud.dataplex.v1.EntryType.encode(message.entryTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListEntryTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntryTypesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntryTypesResponse} message ListEntryTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryTypesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryTypesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntryTypesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entryTypes && message.entryTypes.length)) - message.entryTypes = []; - message.entryTypes.push($root.google.cloud.dataplex.v1.EntryType.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntryTypesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryTypesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryTypesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryTypesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryTypes != null && message.hasOwnProperty("entryTypes")) { - if (!Array.isArray(message.entryTypes)) - return "entryTypes: array expected"; - for (var i = 0; i < message.entryTypes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.EntryType.verify(message.entryTypes[i]); - if (error) - return "entryTypes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListEntryTypesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntryTypesResponse} ListEntryTypesResponse - */ - ListEntryTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntryTypesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntryTypesResponse(); - if (object.entryTypes) { - if (!Array.isArray(object.entryTypes)) - throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.entryTypes: array expected"); - message.entryTypes = []; - for (var i = 0; i < object.entryTypes.length; ++i) { - if (typeof object.entryTypes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.entryTypes: object expected"); - message.entryTypes[i] = $root.google.cloud.dataplex.v1.EntryType.fromObject(object.entryTypes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListEntryTypesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListEntryTypesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {google.cloud.dataplex.v1.ListEntryTypesResponse} message ListEntryTypesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryTypesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.entryTypes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.entryTypes && message.entryTypes.length) { - object.entryTypes = []; - for (var j = 0; j < message.entryTypes.length; ++j) - object.entryTypes[j] = $root.google.cloud.dataplex.v1.EntryType.toObject(message.entryTypes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListEntryTypesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntryTypesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryTypesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntryTypesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntryTypesResponse"; - }; - - return ListEntryTypesResponse; - })(); - - v1.GetEntryTypeRequest = (function() { - - /** - * Properties of a GetEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetEntryTypeRequest - * @property {string|null} [name] GetEntryTypeRequest name - */ - - /** - * Constructs a new GetEntryTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntryTypeRequest. - * @implements IGetEntryTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest=} [properties] Properties to set - */ - function GetEntryTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntryTypeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @instance - */ - GetEntryTypeRequest.prototype.name = ""; - - /** - * Creates a new GetEntryTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest instance - */ - GetEntryTypeRequest.create = function create(properties) { - return new GetEntryTypeRequest(properties); - }; - - /** - * Encodes the specified GetEntryTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} message GetEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryTypeRequest.encode = function encode(message, writer) { - 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 GetEntryTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntryTypeRequest} message GetEntryTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntryTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntryTypeRequest(); - 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 GetEntryTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntryTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntryTypeRequest.verify = function verify(message) { - if (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 GetEntryTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntryTypeRequest} GetEntryTypeRequest - */ - GetEntryTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntryTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetEntryTypeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEntryTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {google.cloud.dataplex.v1.GetEntryTypeRequest} message GetEntryTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntryTypeRequest.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 GetEntryTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntryTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntryTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEntryTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntryTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntryTypeRequest"; - }; - - return GetEntryTypeRequest; - })(); - - v1.CreateAspectTypeRequest = (function() { - - /** - * Properties of a CreateAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateAspectTypeRequest - * @property {string|null} [parent] CreateAspectTypeRequest parent - * @property {string|null} [aspectTypeId] CreateAspectTypeRequest aspectTypeId - * @property {google.cloud.dataplex.v1.IAspectType|null} [aspectType] CreateAspectTypeRequest aspectType - * @property {boolean|null} [validateOnly] CreateAspectTypeRequest validateOnly - */ - - /** - * Constructs a new CreateAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateAspectTypeRequest. - * @implements ICreateAspectTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest=} [properties] Properties to set - */ - function CreateAspectTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateAspectTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @instance - */ - CreateAspectTypeRequest.prototype.parent = ""; - - /** - * CreateAspectTypeRequest aspectTypeId. - * @member {string} aspectTypeId - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @instance - */ - CreateAspectTypeRequest.prototype.aspectTypeId = ""; - - /** - * CreateAspectTypeRequest aspectType. - * @member {google.cloud.dataplex.v1.IAspectType|null|undefined} aspectType - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @instance - */ - CreateAspectTypeRequest.prototype.aspectType = null; - - /** - * CreateAspectTypeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @instance - */ - CreateAspectTypeRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateAspectTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest instance - */ - CreateAspectTypeRequest.create = function create(properties) { - return new CreateAspectTypeRequest(properties); - }; - - /** - * Encodes the specified CreateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} message CreateAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAspectTypeRequest.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.aspectTypeId != null && Object.hasOwnProperty.call(message, "aspectTypeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.aspectTypeId); - if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) - $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAspectTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAspectTypeRequest} message CreateAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateAspectTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAspectTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAspectTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.aspectTypeId = reader.string(); - break; - } - case 3: { - message.aspectType = $root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateAspectTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateAspectTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateAspectTypeRequest.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.aspectTypeId != null && message.hasOwnProperty("aspectTypeId")) - if (!$util.isString(message.aspectTypeId)) - return "aspectTypeId: string expected"; - if (message.aspectType != null && message.hasOwnProperty("aspectType")) { - var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectType); - if (error) - return "aspectType." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateAspectTypeRequest} CreateAspectTypeRequest - */ - CreateAspectTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateAspectTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateAspectTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.aspectTypeId != null) - message.aspectTypeId = String(object.aspectTypeId); - if (object.aspectType != null) { - if (typeof object.aspectType !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateAspectTypeRequest.aspectType: object expected"); - message.aspectType = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectType); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateAspectTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.CreateAspectTypeRequest} message CreateAspectTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAspectTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.aspectTypeId = ""; - object.aspectType = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.aspectTypeId != null && message.hasOwnProperty("aspectTypeId")) - object.aspectTypeId = message.aspectTypeId; - if (message.aspectType != null && message.hasOwnProperty("aspectType")) - object.aspectType = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectType, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateAspectTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAspectTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAspectTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateAspectTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAspectTypeRequest"; - }; - - return CreateAspectTypeRequest; - })(); - - v1.UpdateAspectTypeRequest = (function() { - - /** - * Properties of an UpdateAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateAspectTypeRequest - * @property {google.cloud.dataplex.v1.IAspectType|null} [aspectType] UpdateAspectTypeRequest aspectType - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAspectTypeRequest updateMask - * @property {boolean|null} [validateOnly] UpdateAspectTypeRequest validateOnly - */ - - /** - * Constructs a new UpdateAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateAspectTypeRequest. - * @implements IUpdateAspectTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest=} [properties] Properties to set - */ - function UpdateAspectTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateAspectTypeRequest aspectType. - * @member {google.cloud.dataplex.v1.IAspectType|null|undefined} aspectType - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @instance - */ - UpdateAspectTypeRequest.prototype.aspectType = null; - - /** - * UpdateAspectTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @instance - */ - UpdateAspectTypeRequest.prototype.updateMask = null; - - /** - * UpdateAspectTypeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @instance - */ - UpdateAspectTypeRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateAspectTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest instance - */ - UpdateAspectTypeRequest.create = function create(properties) { - return new UpdateAspectTypeRequest(properties); - }; - - /** - * Encodes the specified UpdateAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} message UpdateAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAspectTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aspectType != null && Object.hasOwnProperty.call(message, "aspectType")) - $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectType, 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(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAspectTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAspectTypeRequest} message UpdateAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAspectTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.aspectType = $root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateAspectTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateAspectTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAspectTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aspectType != null && message.hasOwnProperty("aspectType")) { - var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectType); - if (error) - return "aspectType." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateAspectTypeRequest} UpdateAspectTypeRequest - */ - UpdateAspectTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateAspectTypeRequest(); - if (object.aspectType != null) { - if (typeof object.aspectType !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAspectTypeRequest.aspectType: object expected"); - message.aspectType = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectType); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAspectTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateAspectTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateAspectTypeRequest} message UpdateAspectTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateAspectTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.aspectType = null; - object.updateMask = null; - object.validateOnly = false; - } - if (message.aspectType != null && message.hasOwnProperty("aspectType")) - object.aspectType = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectType, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateAspectTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateAspectTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateAspectTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateAspectTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAspectTypeRequest"; - }; - - return UpdateAspectTypeRequest; - })(); - - v1.DeleteAspectTypeRequest = (function() { - - /** - * Properties of a DeleteAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteAspectTypeRequest - * @property {string|null} [name] DeleteAspectTypeRequest name - * @property {string|null} [etag] DeleteAspectTypeRequest etag - */ - - /** - * Constructs a new DeleteAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteAspectTypeRequest. - * @implements IDeleteAspectTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest=} [properties] Properties to set - */ - function DeleteAspectTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteAspectTypeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @instance - */ - DeleteAspectTypeRequest.prototype.name = ""; - - /** - * DeleteAspectTypeRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @instance - */ - DeleteAspectTypeRequest.prototype.etag = ""; - - /** - * Creates a new DeleteAspectTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest instance - */ - DeleteAspectTypeRequest.create = function create(properties) { - return new DeleteAspectTypeRequest(properties); - }; - - /** - * Encodes the specified DeleteAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} message DeleteAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAspectTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAspectTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAspectTypeRequest} message DeleteAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAspectTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteAspectTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteAspectTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAspectTypeRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteAspectTypeRequest} DeleteAspectTypeRequest - */ - DeleteAspectTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteAspectTypeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteAspectTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteAspectTypeRequest} message DeleteAspectTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAspectTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteAspectTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAspectTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteAspectTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteAspectTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAspectTypeRequest"; - }; - - return DeleteAspectTypeRequest; - })(); - - v1.ListAspectTypesRequest = (function() { - - /** - * Properties of a ListAspectTypesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListAspectTypesRequest - * @property {string|null} [parent] ListAspectTypesRequest parent - * @property {number|null} [pageSize] ListAspectTypesRequest pageSize - * @property {string|null} [pageToken] ListAspectTypesRequest pageToken - * @property {string|null} [filter] ListAspectTypesRequest filter - * @property {string|null} [orderBy] ListAspectTypesRequest orderBy - */ - - /** - * Constructs a new ListAspectTypesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAspectTypesRequest. - * @implements IListAspectTypesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest=} [properties] Properties to set - */ - function ListAspectTypesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAspectTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - */ - ListAspectTypesRequest.prototype.parent = ""; - - /** - * ListAspectTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - */ - ListAspectTypesRequest.prototype.pageSize = 0; - - /** - * ListAspectTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - */ - ListAspectTypesRequest.prototype.pageToken = ""; - - /** - * ListAspectTypesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - */ - ListAspectTypesRequest.prototype.filter = ""; - - /** - * ListAspectTypesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - */ - ListAspectTypesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListAspectTypesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest instance - */ - ListAspectTypesRequest.create = function create(properties) { - return new ListAspectTypesRequest(properties); - }; - - /** - * Encodes the specified ListAspectTypesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} message ListAspectTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAspectTypesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListAspectTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesRequest} message ListAspectTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAspectTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAspectTypesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAspectTypesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAspectTypesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAspectTypesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAspectTypesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAspectTypesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAspectTypesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListAspectTypesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAspectTypesRequest} ListAspectTypesRequest - */ - ListAspectTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAspectTypesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAspectTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListAspectTypesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {google.cloud.dataplex.v1.ListAspectTypesRequest} message ListAspectTypesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAspectTypesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListAspectTypesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @instance - * @returns {Object.} JSON object - */ - ListAspectTypesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAspectTypesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAspectTypesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAspectTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAspectTypesRequest"; - }; - - return ListAspectTypesRequest; - })(); - - v1.ListAspectTypesResponse = (function() { - - /** - * Properties of a ListAspectTypesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListAspectTypesResponse - * @property {Array.|null} [aspectTypes] ListAspectTypesResponse aspectTypes - * @property {string|null} [nextPageToken] ListAspectTypesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListAspectTypesResponse unreachableLocations - */ - - /** - * Constructs a new ListAspectTypesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAspectTypesResponse. - * @implements IListAspectTypesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListAspectTypesResponse=} [properties] Properties to set - */ - function ListAspectTypesResponse(properties) { - this.aspectTypes = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAspectTypesResponse aspectTypes. - * @member {Array.} aspectTypes - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @instance - */ - ListAspectTypesResponse.prototype.aspectTypes = $util.emptyArray; - - /** - * ListAspectTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @instance - */ - ListAspectTypesResponse.prototype.nextPageToken = ""; - - /** - * ListAspectTypesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @instance - */ - ListAspectTypesResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListAspectTypesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse instance - */ - ListAspectTypesResponse.create = function create(properties) { - return new ListAspectTypesResponse(properties); - }; - - /** - * Encodes the specified ListAspectTypesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesResponse} message ListAspectTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAspectTypesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aspectTypes != null && message.aspectTypes.length) - for (var i = 0; i < message.aspectTypes.length; ++i) - $root.google.cloud.dataplex.v1.AspectType.encode(message.aspectTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListAspectTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAspectTypesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {google.cloud.dataplex.v1.IListAspectTypesResponse} message ListAspectTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAspectTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAspectTypesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAspectTypesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAspectTypesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.aspectTypes && message.aspectTypes.length)) - message.aspectTypes = []; - message.aspectTypes.push($root.google.cloud.dataplex.v1.AspectType.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAspectTypesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAspectTypesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAspectTypesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAspectTypesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { - if (!Array.isArray(message.aspectTypes)) - return "aspectTypes: array expected"; - for (var i = 0; i < message.aspectTypes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.AspectType.verify(message.aspectTypes[i]); - if (error) - return "aspectTypes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListAspectTypesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAspectTypesResponse} ListAspectTypesResponse - */ - ListAspectTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAspectTypesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAspectTypesResponse(); - if (object.aspectTypes) { - if (!Array.isArray(object.aspectTypes)) - throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.aspectTypes: array expected"); - message.aspectTypes = []; - for (var i = 0; i < object.aspectTypes.length; ++i) { - if (typeof object.aspectTypes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.aspectTypes: object expected"); - message.aspectTypes[i] = $root.google.cloud.dataplex.v1.AspectType.fromObject(object.aspectTypes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListAspectTypesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListAspectTypesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {google.cloud.dataplex.v1.ListAspectTypesResponse} message ListAspectTypesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAspectTypesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.aspectTypes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.aspectTypes && message.aspectTypes.length) { - object.aspectTypes = []; - for (var j = 0; j < message.aspectTypes.length; ++j) - object.aspectTypes[j] = $root.google.cloud.dataplex.v1.AspectType.toObject(message.aspectTypes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListAspectTypesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @instance - * @returns {Object.} JSON object - */ - ListAspectTypesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAspectTypesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAspectTypesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAspectTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAspectTypesResponse"; - }; - - return ListAspectTypesResponse; - })(); - - v1.GetAspectTypeRequest = (function() { - - /** - * Properties of a GetAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetAspectTypeRequest - * @property {string|null} [name] GetAspectTypeRequest name - */ - - /** - * Constructs a new GetAspectTypeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetAspectTypeRequest. - * @implements IGetAspectTypeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest=} [properties] Properties to set - */ - function GetAspectTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAspectTypeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @instance - */ - GetAspectTypeRequest.prototype.name = ""; - - /** - * Creates a new GetAspectTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest instance - */ - GetAspectTypeRequest.create = function create(properties) { - return new GetAspectTypeRequest(properties); - }; - - /** - * Encodes the specified GetAspectTypeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} message GetAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAspectTypeRequest.encode = function encode(message, writer) { - 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 GetAspectTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAspectTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAspectTypeRequest} message GetAspectTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAspectTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAspectTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAspectTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAspectTypeRequest(); - 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 GetAspectTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAspectTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAspectTypeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAspectTypeRequest.verify = function verify(message) { - if (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 GetAspectTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetAspectTypeRequest} GetAspectTypeRequest - */ - GetAspectTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetAspectTypeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetAspectTypeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAspectTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {google.cloud.dataplex.v1.GetAspectTypeRequest} message GetAspectTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAspectTypeRequest.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 GetAspectTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @instance - * @returns {Object.} JSON object - */ - GetAspectTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAspectTypeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetAspectTypeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAspectTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAspectTypeRequest"; - }; - - return GetAspectTypeRequest; - })(); - - v1.CreateEntryRequest = (function() { - - /** - * Properties of a CreateEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEntryRequest - * @property {string|null} [parent] CreateEntryRequest parent - * @property {string|null} [entryId] CreateEntryRequest entryId - * @property {google.cloud.dataplex.v1.IEntry|null} [entry] CreateEntryRequest entry - */ - - /** - * Constructs a new CreateEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEntryRequest. - * @implements ICreateEntryRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.parent = ""; - - /** - * CreateEntryRequest entryId. - * @member {string} entryId - * @memberof google.cloud.dataplex.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entryId = ""; - - /** - * CreateEntryRequest entry. - * @member {google.cloud.dataplex.v1.IEntry|null|undefined} entry - * @memberof google.cloud.dataplex.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entry = null; - - /** - * Creates a new CreateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateEntryRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEntryRequest} CreateEntryRequest instance - */ - CreateEntryRequest.create = function create(properties) { - return new CreateEntryRequest(properties); - }; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateEntryRequest - * @static - * @param {google.cloud.dataplex.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.entryId != null && Object.hasOwnProperty.call(message, "entryId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryId); - if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.dataplex.v1.Entry.encode(message.entry, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.entryId = reader.string(); - break; - } - case 3: { - message.entry = $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEntryRequest} CreateEntryRequest - */ - CreateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEntryRequest) - return object; - var message = new $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.dataplex.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.dataplex.v1.CreateEntryRequest - * @static - * @param {google.cloud.dataplex.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.entryId = ""; - object.entry = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryId != null && message.hasOwnProperty("entryId")) - object.entryId = message.entryId; - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); - return object; - }; - - /** - * Converts this CreateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.CreateEntryRequest"; - }; - - return CreateEntryRequest; - })(); - - v1.UpdateEntryRequest = (function() { - - /** - * Properties of an UpdateEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEntryRequest - * @property {google.cloud.dataplex.v1.IEntry|null} [entry] UpdateEntryRequest entry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask - * @property {boolean|null} [allowMissing] UpdateEntryRequest allowMissing - * @property {boolean|null} [deleteMissingAspects] UpdateEntryRequest deleteMissingAspects - * @property {Array.|null} [aspectKeys] UpdateEntryRequest aspectKeys - */ - - /** - * Constructs a new UpdateEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEntryRequest. - * @implements IUpdateEntryRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEntryRequest=} [properties] Properties to set - */ - function UpdateEntryRequest(properties) { - this.aspectKeys = []; - if (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.dataplex.v1.IEntry|null|undefined} entry - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.entry = null; - - /** - * UpdateEntryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.updateMask = null; - - /** - * UpdateEntryRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.allowMissing = false; - - /** - * UpdateEntryRequest deleteMissingAspects. - * @member {boolean} deleteMissingAspects - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.deleteMissingAspects = false; - - /** - * UpdateEntryRequest aspectKeys. - * @member {Array.} aspectKeys - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.aspectKeys = $util.emptyArray; - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEntryRequest} UpdateEntryRequest instance - */ - UpdateEntryRequest.create = function create(properties) { - return new UpdateEntryRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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(); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.deleteMissingAspects != null && Object.hasOwnProperty.call(message, "deleteMissingAspects")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleteMissingAspects); - if (message.aspectKeys != null && message.aspectKeys.length) - for (var i = 0; i < message.aspectKeys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.aspectKeys[i]); - return writer; - }; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.allowMissing = reader.bool(); - break; - } - case 4: { - message.deleteMissingAspects = reader.bool(); - break; - } - case 5: { - if (!(message.aspectKeys && message.aspectKeys.length)) - message.aspectKeys = []; - message.aspectKeys.push(reader.string()); - 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.dataplex.v1.UpdateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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; - } - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.deleteMissingAspects != null && message.hasOwnProperty("deleteMissingAspects")) - if (typeof message.deleteMissingAspects !== "boolean") - return "deleteMissingAspects: boolean expected"; - if (message.aspectKeys != null && message.hasOwnProperty("aspectKeys")) { - if (!Array.isArray(message.aspectKeys)) - return "aspectKeys: array expected"; - for (var i = 0; i < message.aspectKeys.length; ++i) - if (!$util.isString(message.aspectKeys[i])) - return "aspectKeys: string[] expected"; - } - return null; - }; - - /** - * Creates an UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEntryRequest} UpdateEntryRequest - */ - UpdateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntryRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEntryRequest(); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.entry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.deleteMissingAspects != null) - message.deleteMissingAspects = Boolean(object.deleteMissingAspects); - if (object.aspectKeys) { - if (!Array.isArray(object.aspectKeys)) - throw TypeError(".google.cloud.dataplex.v1.UpdateEntryRequest.aspectKeys: array expected"); - message.aspectKeys = []; - for (var i = 0; i < object.aspectKeys.length; ++i) - message.aspectKeys[i] = String(object.aspectKeys[i]); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEntryRequest - * @static - * @param {google.cloud.dataplex.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.arrays || options.defaults) - object.aspectKeys = []; - if (options.defaults) { - object.entry = null; - object.updateMask = null; - object.allowMissing = false; - object.deleteMissingAspects = false; - } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.deleteMissingAspects != null && message.hasOwnProperty("deleteMissingAspects")) - object.deleteMissingAspects = message.deleteMissingAspects; - if (message.aspectKeys && message.aspectKeys.length) { - object.aspectKeys = []; - for (var j = 0; j < message.aspectKeys.length; ++j) - object.aspectKeys[j] = message.aspectKeys[j]; - } - return object; - }; - - /** - * Converts this UpdateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.UpdateEntryRequest"; - }; - - return UpdateEntryRequest; - })(); - - v1.DeleteEntryRequest = (function() { - - /** - * Properties of a DeleteEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEntryRequest - * @property {string|null} [name] DeleteEntryRequest name - */ - - /** - * Constructs a new DeleteEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEntryRequest. - * @implements IDeleteEntryRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest - * @instance - */ - DeleteEntryRequest.prototype.name = ""; - - /** - * Creates a new DeleteEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteEntryRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntryRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEntryRequest} DeleteEntryRequest instance - */ - DeleteEntryRequest.create = function create(properties) { - return new DeleteEntryRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEntryRequest} DeleteEntryRequest - */ - DeleteEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntryRequest) - return object; - var message = new $root.google.cloud.dataplex.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.dataplex.v1.DeleteEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DeleteEntryRequest"; - }; - - return DeleteEntryRequest; - })(); - - v1.ListEntriesRequest = (function() { - - /** - * Properties of a ListEntriesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntriesRequest - * @property {string|null} [parent] ListEntriesRequest parent - * @property {number|null} [pageSize] ListEntriesRequest pageSize - * @property {string|null} [pageToken] ListEntriesRequest pageToken - * @property {string|null} [filter] ListEntriesRequest filter - */ - - /** - * Constructs a new ListEntriesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntriesRequest. - * @implements IListEntriesRequest - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.parent = ""; - - /** - * ListEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageSize = 0; - - /** - * ListEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageToken = ""; - - /** - * ListEntriesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.filter = ""; - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntriesRequest} ListEntriesRequest instance - */ - ListEntriesRequest.create = function create(properties) { - return new ListEntriesRequest(properties); - }; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @static - * @param {google.cloud.dataplex.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.filter = reader.string(); - 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.dataplex.v1.ListEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntriesRequest} ListEntriesRequest - */ - ListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntriesRequest) - return object; - var message = new $root.google.cloud.dataplex.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.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntriesRequest - * @static - * @param {google.cloud.dataplex.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.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 ListEntriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntriesRequest"; - }; - - return ListEntriesRequest; - })(); - - v1.ListEntriesResponse = (function() { - - /** - * Properties of a ListEntriesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntriesResponse - * @property {Array.|null} [entries] ListEntriesResponse entries - * @property {string|null} [nextPageToken] ListEntriesResponse nextPageToken - */ - - /** - * Constructs a new ListEntriesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntriesResponse. - * @implements IListEntriesResponse - * @constructor - * @param {google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntriesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntriesResponse} ListEntriesResponse instance - */ - ListEntriesResponse.create = function create(properties) { - return new ListEntriesResponse(properties); - }; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntriesResponse - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntriesResponse - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntriesResponse} ListEntriesResponse - */ - ListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntriesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.cloud.dataplex.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.dataplex.v1.ListEntriesResponse - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.ListEntriesResponse"; - }; - - return ListEntriesResponse; - })(); - - v1.GetEntryRequest = (function() { - - /** - * Properties of a GetEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetEntryRequest - * @property {string|null} [name] GetEntryRequest name - * @property {google.cloud.dataplex.v1.EntryView|null} [view] GetEntryRequest view - * @property {Array.|null} [aspectTypes] GetEntryRequest aspectTypes - * @property {Array.|null} [paths] GetEntryRequest paths - */ - - /** - * Constructs a new GetEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntryRequest. - * @implements IGetEntryRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetEntryRequest=} [properties] Properties to set - */ - function GetEntryRequest(properties) { - this.aspectTypes = []; - 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]]; - } - - /** - * GetEntryRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.name = ""; - - /** - * GetEntryRequest view. - * @member {google.cloud.dataplex.v1.EntryView} view - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.view = 0; - - /** - * GetEntryRequest aspectTypes. - * @member {Array.} aspectTypes - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.aspectTypes = $util.emptyArray; - - /** - * GetEntryRequest paths. - * @member {Array.} paths - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.paths = $util.emptyArray; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntryRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntryRequest} GetEntryRequest instance - */ - GetEntryRequest.create = function create(properties) { - return new GetEntryRequest(properties); - }; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @static - * @param {google.cloud.dataplex.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.aspectTypes != null && message.aspectTypes.length) - for (var i = 0; i < message.aspectTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.GetEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - case 3: { - if (!(message.aspectTypes && message.aspectTypes.length)) - message.aspectTypes = []; - message.aspectTypes.push(reader.string()); - break; - } - case 4: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(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.dataplex.v1.GetEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { - if (!Array.isArray(message.aspectTypes)) - return "aspectTypes: array expected"; - for (var i = 0; i < message.aspectTypes.length; ++i) - if (!$util.isString(message.aspectTypes[i])) - return "aspectTypes: string[] 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 GetEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntryRequest} GetEntryRequest - */ - GetEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntryRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetEntryRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTRY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - case "CUSTOM": - case 3: - message.view = 3; - break; - case "ALL": - case 4: - message.view = 4; - break; - } - if (object.aspectTypes) { - if (!Array.isArray(object.aspectTypes)) - throw TypeError(".google.cloud.dataplex.v1.GetEntryRequest.aspectTypes: array expected"); - message.aspectTypes = []; - for (var i = 0; i < object.aspectTypes.length; ++i) - message.aspectTypes[i] = String(object.aspectTypes[i]); - } - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.cloud.dataplex.v1.GetEntryRequest.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 GetEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntryRequest - * @static - * @param {google.cloud.dataplex.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.arrays || options.defaults) { - object.aspectTypes = []; - object.paths = []; - } - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "ENTRY_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.EntryView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.EntryView[message.view] : message.view; - if (message.aspectTypes && message.aspectTypes.length) { - object.aspectTypes = []; - for (var j = 0; j < message.aspectTypes.length; ++j) - object.aspectTypes[j] = message.aspectTypes[j]; - } - 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 GetEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.GetEntryRequest"; - }; - - return GetEntryRequest; - })(); - - v1.LookupEntryRequest = (function() { - - /** - * Properties of a LookupEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ILookupEntryRequest - * @property {string|null} [name] LookupEntryRequest name - * @property {google.cloud.dataplex.v1.EntryView|null} [view] LookupEntryRequest view - * @property {Array.|null} [aspectTypes] LookupEntryRequest aspectTypes - * @property {Array.|null} [paths] LookupEntryRequest paths - * @property {string|null} [entry] LookupEntryRequest entry - */ - - /** - * Constructs a new LookupEntryRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a LookupEntryRequest. - * @implements ILookupEntryRequest - * @constructor - * @param {google.cloud.dataplex.v1.ILookupEntryRequest=} [properties] Properties to set - */ - function LookupEntryRequest(properties) { - this.aspectTypes = []; - 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]]; - } - - /** - * LookupEntryRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.name = ""; - - /** - * LookupEntryRequest view. - * @member {google.cloud.dataplex.v1.EntryView} view - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.view = 0; - - /** - * LookupEntryRequest aspectTypes. - * @member {Array.} aspectTypes - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.aspectTypes = $util.emptyArray; - - /** - * LookupEntryRequest paths. - * @member {Array.} paths - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.paths = $util.emptyArray; - - /** - * LookupEntryRequest entry. - * @member {string} entry - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.entry = ""; - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @static - * @param {google.cloud.dataplex.v1.ILookupEntryRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.LookupEntryRequest} LookupEntryRequest instance - */ - LookupEntryRequest.create = function create(properties) { - return new LookupEntryRequest(properties); - }; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.dataplex.v1.LookupEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @static - * @param {google.cloud.dataplex.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.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.aspectTypes != null && message.aspectTypes.length) - for (var i = 0; i < message.aspectTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.paths[i]); - if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.entry); - return writer; - }; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.LookupEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.LookupEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - case 3: { - if (!(message.aspectTypes && message.aspectTypes.length)) - message.aspectTypes = []; - message.aspectTypes.push(reader.string()); - break; - } - case 4: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - case 5: { - message.entry = 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.dataplex.v1.LookupEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { - if (!Array.isArray(message.aspectTypes)) - return "aspectTypes: array expected"; - for (var i = 0; i < message.aspectTypes.length; ++i) - if (!$util.isString(message.aspectTypes[i])) - return "aspectTypes: string[] expected"; - } - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - if (message.entry != null && message.hasOwnProperty("entry")) - if (!$util.isString(message.entry)) - return "entry: 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.dataplex.v1.LookupEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.LookupEntryRequest} LookupEntryRequest - */ - LookupEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.LookupEntryRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.LookupEntryRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTRY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - case "CUSTOM": - case 3: - message.view = 3; - break; - case "ALL": - case 4: - message.view = 4; - break; - } - if (object.aspectTypes) { - if (!Array.isArray(object.aspectTypes)) - throw TypeError(".google.cloud.dataplex.v1.LookupEntryRequest.aspectTypes: array expected"); - message.aspectTypes = []; - for (var i = 0; i < object.aspectTypes.length; ++i) - message.aspectTypes[i] = String(object.aspectTypes[i]); - } - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.cloud.dataplex.v1.LookupEntryRequest.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - if (object.entry != null) - message.entry = String(object.entry); - return message; - }; - - /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.LookupEntryRequest - * @static - * @param {google.cloud.dataplex.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.arrays || options.defaults) { - object.aspectTypes = []; - object.paths = []; - } - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "ENTRY_VIEW_UNSPECIFIED" : 0; - object.entry = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.EntryView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.EntryView[message.view] : message.view; - if (message.aspectTypes && message.aspectTypes.length) { - object.aspectTypes = []; - for (var j = 0; j < message.aspectTypes.length; ++j) - object.aspectTypes[j] = message.aspectTypes[j]; - } - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = message.entry; - return object; - }; - - /** - * Converts this LookupEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.LookupEntryRequest"; - }; - - return LookupEntryRequest; - })(); - - v1.SearchEntriesRequest = (function() { - - /** - * Properties of a SearchEntriesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ISearchEntriesRequest - * @property {string|null} [name] SearchEntriesRequest name - * @property {string|null} [query] SearchEntriesRequest query - * @property {number|null} [pageSize] SearchEntriesRequest pageSize - * @property {string|null} [pageToken] SearchEntriesRequest pageToken - * @property {string|null} [orderBy] SearchEntriesRequest orderBy - * @property {string|null} [scope] SearchEntriesRequest scope - */ - - /** - * Constructs a new SearchEntriesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SearchEntriesRequest. - * @implements ISearchEntriesRequest - * @constructor - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest=} [properties] Properties to set - */ - function SearchEntriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchEntriesRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.name = ""; - - /** - * SearchEntriesRequest query. - * @member {string} query - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.query = ""; - - /** - * SearchEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.pageSize = 0; - - /** - * SearchEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.pageToken = ""; - - /** - * SearchEntriesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.orderBy = ""; - - /** - * SearchEntriesRequest scope. - * @member {string} scope - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - */ - SearchEntriesRequest.prototype.scope = ""; - - /** - * Creates a new SearchEntriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest instance - */ - SearchEntriesRequest.create = function create(properties) { - return new SearchEntriesRequest(properties); - }; - - /** - * Encodes the specified SearchEntriesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} message SearchEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).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")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.scope); - return writer; - }; - - /** - * Encodes the specified SearchEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesRequest} message SearchEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.query = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 7: { - message.scope = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchEntriesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchEntriesRequest.verify = function verify(message) { - if (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.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.scope != null && message.hasOwnProperty("scope")) - if (!$util.isString(message.scope)) - return "scope: string expected"; - return null; - }; - - /** - * Creates a SearchEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SearchEntriesRequest} SearchEntriesRequest - */ - SearchEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.SearchEntriesRequest(); - if (object.name != null) - message.name = String(object.name); - 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.scope != null) - message.scope = String(object.scope); - return message; - }; - - /** - * Creates a plain object from a SearchEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesRequest} message SearchEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.query = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.scope = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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 = message.scope; - return object; - }; - - /** - * Converts this SearchEntriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - SearchEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchEntriesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SearchEntriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesRequest"; - }; - - return SearchEntriesRequest; - })(); - - v1.SearchEntriesResult = (function() { - - /** - * Properties of a SearchEntriesResult. - * @memberof google.cloud.dataplex.v1 - * @interface ISearchEntriesResult - * @property {string|null} [linkedResource] SearchEntriesResult linkedResource - * @property {google.cloud.dataplex.v1.IEntry|null} [dataplexEntry] SearchEntriesResult dataplexEntry - * @property {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null} [snippets] SearchEntriesResult snippets - */ - - /** - * Constructs a new SearchEntriesResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SearchEntriesResult. - * @implements ISearchEntriesResult - * @constructor - * @param {google.cloud.dataplex.v1.ISearchEntriesResult=} [properties] Properties to set - */ - function SearchEntriesResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchEntriesResult linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @instance - */ - SearchEntriesResult.prototype.linkedResource = ""; - - /** - * SearchEntriesResult dataplexEntry. - * @member {google.cloud.dataplex.v1.IEntry|null|undefined} dataplexEntry - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @instance - */ - SearchEntriesResult.prototype.dataplexEntry = null; - - /** - * SearchEntriesResult snippets. - * @member {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets|null|undefined} snippets - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @instance - */ - SearchEntriesResult.prototype.snippets = null; - - /** - * Creates a new SearchEntriesResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult instance - */ - SearchEntriesResult.create = function create(properties) { - return new SearchEntriesResult(properties); - }; - - /** - * Encodes the specified SearchEntriesResult message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResult} message SearchEntriesResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.linkedResource); - if (message.dataplexEntry != null && Object.hasOwnProperty.call(message, "dataplexEntry")) - $root.google.cloud.dataplex.v1.Entry.encode(message.dataplexEntry, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.snippets != null && Object.hasOwnProperty.call(message, "snippets")) - $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.encode(message.snippets, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchEntriesResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResult} message SearchEntriesResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchEntriesResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.linkedResource = reader.string(); - break; - } - case 9: { - message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); - break; - } - case 12: { - message.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchEntriesResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchEntriesResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchEntriesResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) { - var error = $root.google.cloud.dataplex.v1.Entry.verify(message.dataplexEntry); - if (error) - return "dataplexEntry." + error; - } - if (message.snippets != null && message.hasOwnProperty("snippets")) { - var error = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify(message.snippets); - if (error) - return "snippets." + error; - } - return null; - }; - - /** - * Creates a SearchEntriesResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SearchEntriesResult} SearchEntriesResult - */ - SearchEntriesResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResult) - return object; - var message = new $root.google.cloud.dataplex.v1.SearchEntriesResult(); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.dataplexEntry != null) { - if (typeof object.dataplexEntry !== "object") - throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.dataplexEntry: object expected"); - message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.dataplexEntry); - } - if (object.snippets != null) { - if (typeof object.snippets !== "object") - throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.snippets: object expected"); - message.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.fromObject(object.snippets); - } - return message; - }; - - /** - * Creates a plain object from a SearchEntriesResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResult} message SearchEntriesResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchEntriesResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.linkedResource = ""; - object.dataplexEntry = null; - object.snippets = null; - } - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) - object.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.toObject(message.dataplexEntry, options); - if (message.snippets != null && message.hasOwnProperty("snippets")) - object.snippets = $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets.toObject(message.snippets, options); - return object; - }; - - /** - * Converts this SearchEntriesResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @instance - * @returns {Object.} JSON object - */ - SearchEntriesResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchEntriesResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchEntriesResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResult"; - }; - - SearchEntriesResult.Snippets = (function() { - - /** - * Properties of a Snippets. - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @interface ISnippets - * @property {google.cloud.dataplex.v1.IEntry|null} [dataplexEntry] Snippets dataplexEntry - */ - - /** - * Constructs a new Snippets. - * @memberof google.cloud.dataplex.v1.SearchEntriesResult - * @classdesc Represents a Snippets. - * @implements ISnippets - * @constructor - * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets=} [properties] Properties to set - */ - function Snippets(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Snippets dataplexEntry. - * @member {google.cloud.dataplex.v1.IEntry|null|undefined} dataplexEntry - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @instance - */ - Snippets.prototype.dataplexEntry = null; - - /** - * Creates a new Snippets instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets instance - */ - Snippets.create = function create(properties) { - return new Snippets(properties); - }; - - /** - * Encodes the specified Snippets message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets} message Snippets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snippets.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataplexEntry != null && Object.hasOwnProperty.call(message, "dataplexEntry")) - $root.google.cloud.dataplex.v1.Entry.encode(message.dataplexEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Snippets message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResult.Snippets.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResult.ISnippets} message Snippets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snippets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Snippets message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snippets.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Snippets message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snippets.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Snippets message. - * @function verify - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Snippets.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) { - var error = $root.google.cloud.dataplex.v1.Entry.verify(message.dataplexEntry); - if (error) - return "dataplexEntry." + error; - } - return null; - }; - - /** - * Creates a Snippets message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} Snippets - */ - Snippets.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets) - return object; - var message = new $root.google.cloud.dataplex.v1.SearchEntriesResult.Snippets(); - if (object.dataplexEntry != null) { - if (typeof object.dataplexEntry !== "object") - throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResult.Snippets.dataplexEntry: object expected"); - message.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.dataplexEntry); - } - return message; - }; - - /** - * Creates a plain object from a Snippets message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResult.Snippets} message Snippets - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Snippets.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dataplexEntry = null; - if (message.dataplexEntry != null && message.hasOwnProperty("dataplexEntry")) - object.dataplexEntry = $root.google.cloud.dataplex.v1.Entry.toObject(message.dataplexEntry, options); - return object; - }; - - /** - * Converts this Snippets to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @instance - * @returns {Object.} JSON object - */ - Snippets.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Snippets - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SearchEntriesResult.Snippets - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Snippets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"; - }; - - return Snippets; - })(); - - return SearchEntriesResult; - })(); - - v1.SearchEntriesResponse = (function() { - - /** - * Properties of a SearchEntriesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface ISearchEntriesResponse - * @property {Array.|null} [results] SearchEntriesResponse results - * @property {number|null} [totalSize] SearchEntriesResponse totalSize - * @property {string|null} [nextPageToken] SearchEntriesResponse nextPageToken - * @property {Array.|null} [unreachable] SearchEntriesResponse unreachable - */ - - /** - * Constructs a new SearchEntriesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SearchEntriesResponse. - * @implements ISearchEntriesResponse - * @constructor - * @param {google.cloud.dataplex.v1.ISearchEntriesResponse=} [properties] Properties to set - */ - function SearchEntriesResponse(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]]; - } - - /** - * SearchEntriesResponse results. - * @member {Array.} results - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @instance - */ - SearchEntriesResponse.prototype.results = $util.emptyArray; - - /** - * SearchEntriesResponse totalSize. - * @member {number} totalSize - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @instance - */ - SearchEntriesResponse.prototype.totalSize = 0; - - /** - * SearchEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @instance - */ - SearchEntriesResponse.prototype.nextPageToken = ""; - - /** - * SearchEntriesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @instance - */ - SearchEntriesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new SearchEntriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse instance - */ - SearchEntriesResponse.create = function create(properties) { - return new SearchEntriesResponse(properties); - }; - - /** - * Encodes the specified SearchEntriesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResponse} message SearchEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 4, wireType 2 =*/34).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified SearchEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SearchEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {google.cloud.dataplex.v1.ISearchEntriesResponse} message SearchEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SearchEntriesResponse(); - 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.dataplex.v1.SearchEntriesResult.decode(reader, reader.uint32())); - break; - } - case 2: { - message.totalSize = reader.int32(); - break; - } - case 3: { - message.nextPageToken = reader.string(); - break; - } - case 4: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchEntriesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 SearchEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SearchEntriesResponse} SearchEntriesResponse - */ - SearchEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SearchEntriesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.SearchEntriesResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.SearchEntriesResponse.results: object expected"); - message.results[i] = $root.google.cloud.dataplex.v1.SearchEntriesResult.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.dataplex.v1.SearchEntriesResponse.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 SearchEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {google.cloud.dataplex.v1.SearchEntriesResponse} message SearchEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchEntriesResponse.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.dataplex.v1.SearchEntriesResult.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 SearchEntriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - SearchEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchEntriesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SearchEntriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SearchEntriesResponse"; - }; - - return SearchEntriesResponse; - })(); - - v1.ImportItem = (function() { - - /** - * Properties of an ImportItem. - * @memberof google.cloud.dataplex.v1 - * @interface IImportItem - * @property {google.cloud.dataplex.v1.IEntry|null} [entry] ImportItem entry - * @property {google.protobuf.IFieldMask|null} [updateMask] ImportItem updateMask - * @property {Array.|null} [aspectKeys] ImportItem aspectKeys - */ - - /** - * Constructs a new ImportItem. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an ImportItem. - * @implements IImportItem - * @constructor - * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set - */ - function ImportItem(properties) { - this.aspectKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportItem entry. - * @member {google.cloud.dataplex.v1.IEntry|null|undefined} entry - * @memberof google.cloud.dataplex.v1.ImportItem - * @instance - */ - ImportItem.prototype.entry = null; - - /** - * ImportItem updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.ImportItem - * @instance - */ - ImportItem.prototype.updateMask = null; - - /** - * ImportItem aspectKeys. - * @member {Array.} aspectKeys - * @memberof google.cloud.dataplex.v1.ImportItem - * @instance - */ - ImportItem.prototype.aspectKeys = $util.emptyArray; - - /** - * Creates a new ImportItem instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem instance - */ - ImportItem.create = function create(properties) { - return new ImportItem(properties); - }; - - /** - * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportItem.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.dataplex.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(); - if (message.aspectKeys != null && message.aspectKeys.length) - for (var i = 0; i < message.aspectKeys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectKeys[i]); - return writer; - }; - - /** - * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportItem message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportItem.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ImportItem(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.aspectKeys && message.aspectKeys.length)) - message.aspectKeys = []; - message.aspectKeys.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportItem message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportItem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportItem message. - * @function verify - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportItem.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.dataplex.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; - } - if (message.aspectKeys != null && message.hasOwnProperty("aspectKeys")) { - if (!Array.isArray(message.aspectKeys)) - return "aspectKeys: array expected"; - for (var i = 0; i < message.aspectKeys.length; ++i) - if (!$util.isString(message.aspectKeys[i])) - return "aspectKeys: string[] expected"; - } - return null; - }; - - /** - * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem - */ - ImportItem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ImportItem) - return object; - var message = new $root.google.cloud.dataplex.v1.ImportItem(); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.dataplex.v1.ImportItem.entry: object expected"); - message.entry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.entry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.ImportItem.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.aspectKeys) { - if (!Array.isArray(object.aspectKeys)) - throw TypeError(".google.cloud.dataplex.v1.ImportItem.aspectKeys: array expected"); - message.aspectKeys = []; - for (var i = 0; i < object.aspectKeys.length; ++i) - message.aspectKeys[i] = String(object.aspectKeys[i]); - } - return message; - }; - - /** - * Creates a plain object from an ImportItem message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {google.cloud.dataplex.v1.ImportItem} message ImportItem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportItem.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.aspectKeys = []; - if (options.defaults) { - object.entry = null; - object.updateMask = null; - } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.aspectKeys && message.aspectKeys.length) { - object.aspectKeys = []; - for (var j = 0; j < message.aspectKeys.length; ++j) - object.aspectKeys[j] = message.aspectKeys[j]; - } - return object; - }; - - /** - * Converts this ImportItem to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ImportItem - * @instance - * @returns {Object.} JSON object - */ - ImportItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportItem - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ImportItem - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ImportItem"; - }; - - return ImportItem; - })(); - - v1.CreateMetadataJobRequest = (function() { - - /** - * Properties of a CreateMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateMetadataJobRequest - * @property {string|null} [parent] CreateMetadataJobRequest parent - * @property {google.cloud.dataplex.v1.IMetadataJob|null} [metadataJob] CreateMetadataJobRequest metadataJob - * @property {string|null} [metadataJobId] CreateMetadataJobRequest metadataJobId - * @property {boolean|null} [validateOnly] CreateMetadataJobRequest validateOnly - */ - - /** - * Constructs a new CreateMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateMetadataJobRequest. - * @implements ICreateMetadataJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set - */ - function CreateMetadataJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateMetadataJobRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @instance - */ - CreateMetadataJobRequest.prototype.parent = ""; - - /** - * CreateMetadataJobRequest metadataJob. - * @member {google.cloud.dataplex.v1.IMetadataJob|null|undefined} metadataJob - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @instance - */ - CreateMetadataJobRequest.prototype.metadataJob = null; - - /** - * CreateMetadataJobRequest metadataJobId. - * @member {string} metadataJobId - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @instance - */ - CreateMetadataJobRequest.prototype.metadataJobId = ""; - - /** - * CreateMetadataJobRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @instance - */ - CreateMetadataJobRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateMetadataJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest instance - */ - CreateMetadataJobRequest.create = function create(properties) { - return new CreateMetadataJobRequest(properties); - }; - - /** - * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMetadataJobRequest.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.metadataJob != null && Object.hasOwnProperty.call(message, "metadataJob")) - $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metadataJobId != null && Object.hasOwnProperty.call(message, "metadataJobId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataJobId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMetadataJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32()); - break; - } - case 3: { - message.metadataJobId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateMetadataJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateMetadataJobRequest.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.metadataJob != null && message.hasOwnProperty("metadataJob")) { - var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJob); - if (error) - return "metadataJob." + error; - } - if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) - if (!$util.isString(message.metadataJobId)) - return "metadataJobId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest - */ - CreateMetadataJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateMetadataJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.metadataJob != null) { - if (typeof object.metadataJob !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateMetadataJobRequest.metadataJob: object expected"); - message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJob); - } - if (object.metadataJobId != null) - message.metadataJobId = String(object.metadataJobId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.CreateMetadataJobRequest} message CreateMetadataJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateMetadataJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.metadataJob = null; - object.metadataJobId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.metadataJob != null && message.hasOwnProperty("metadataJob")) - object.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJob, options); - if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) - object.metadataJobId = message.metadataJobId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateMetadataJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @instance - * @returns {Object.} JSON object - */ - CreateMetadataJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateMetadataJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateMetadataJobRequest"; - }; - - return CreateMetadataJobRequest; - })(); - - v1.GetMetadataJobRequest = (function() { - - /** - * Properties of a GetMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetMetadataJobRequest - * @property {string|null} [name] GetMetadataJobRequest name - */ - - /** - * Constructs a new GetMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetMetadataJobRequest. - * @implements IGetMetadataJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set - */ - function GetMetadataJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetMetadataJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @instance - */ - GetMetadataJobRequest.prototype.name = ""; - - /** - * Creates a new GetMetadataJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest instance - */ - GetMetadataJobRequest.create = function create(properties) { - return new GetMetadataJobRequest(properties); - }; - - /** - * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataJobRequest.encode = function encode(message, writer) { - 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 GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMetadataJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); - 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 GetMetadataJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMetadataJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMetadataJobRequest.verify = function verify(message) { - if (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 GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest - */ - GetMetadataJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetMetadataJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.GetMetadataJobRequest} message GetMetadataJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMetadataJobRequest.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 GetMetadataJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @instance - * @returns {Object.} JSON object - */ - GetMetadataJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMetadataJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetMetadataJobRequest"; - }; - - return GetMetadataJobRequest; - })(); - - v1.ListMetadataJobsRequest = (function() { - - /** - * Properties of a ListMetadataJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListMetadataJobsRequest - * @property {string|null} [parent] ListMetadataJobsRequest parent - * @property {number|null} [pageSize] ListMetadataJobsRequest pageSize - * @property {string|null} [pageToken] ListMetadataJobsRequest pageToken - * @property {string|null} [filter] ListMetadataJobsRequest filter - * @property {string|null} [orderBy] ListMetadataJobsRequest orderBy - */ - - /** - * Constructs a new ListMetadataJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListMetadataJobsRequest. - * @implements IListMetadataJobsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set - */ - function ListMetadataJobsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListMetadataJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - */ - ListMetadataJobsRequest.prototype.parent = ""; - - /** - * ListMetadataJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - */ - ListMetadataJobsRequest.prototype.pageSize = 0; - - /** - * ListMetadataJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - */ - ListMetadataJobsRequest.prototype.pageToken = ""; - - /** - * ListMetadataJobsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - */ - ListMetadataJobsRequest.prototype.filter = ""; - - /** - * ListMetadataJobsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - */ - ListMetadataJobsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListMetadataJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest instance - */ - ListMetadataJobsRequest.create = function create(properties) { - return new ListMetadataJobsRequest(properties); - }; - - /** - * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMetadataJobsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMetadataJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMetadataJobsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMetadataJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMetadataJobsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMetadataJobsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest - */ - ListMetadataJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {google.cloud.dataplex.v1.ListMetadataJobsRequest} message ListMetadataJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMetadataJobsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListMetadataJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMetadataJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMetadataJobsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMetadataJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsRequest"; - }; - - return ListMetadataJobsRequest; - })(); - - v1.ListMetadataJobsResponse = (function() { - - /** - * Properties of a ListMetadataJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListMetadataJobsResponse - * @property {Array.|null} [metadataJobs] ListMetadataJobsResponse metadataJobs - * @property {string|null} [nextPageToken] ListMetadataJobsResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListMetadataJobsResponse unreachableLocations - */ - - /** - * Constructs a new ListMetadataJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListMetadataJobsResponse. - * @implements IListMetadataJobsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set - */ - function ListMetadataJobsResponse(properties) { - this.metadataJobs = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListMetadataJobsResponse metadataJobs. - * @member {Array.} metadataJobs - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @instance - */ - ListMetadataJobsResponse.prototype.metadataJobs = $util.emptyArray; - - /** - * ListMetadataJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @instance - */ - ListMetadataJobsResponse.prototype.nextPageToken = ""; - - /** - * ListMetadataJobsResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @instance - */ - ListMetadataJobsResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListMetadataJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse instance - */ - ListMetadataJobsResponse.create = function create(properties) { - return new ListMetadataJobsResponse(properties); - }; - - /** - * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMetadataJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadataJobs != null && message.metadataJobs.length) - for (var i = 0; i < message.metadataJobs.length; ++i) - $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMetadataJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMetadataJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.metadataJobs && message.metadataJobs.length)) - message.metadataJobs = []; - message.metadataJobs.push($root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMetadataJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMetadataJobsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMetadataJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadataJobs != null && message.hasOwnProperty("metadataJobs")) { - if (!Array.isArray(message.metadataJobs)) - return "metadataJobs: array expected"; - for (var i = 0; i < message.metadataJobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJobs[i]); - if (error) - return "metadataJobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse - */ - ListMetadataJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); - if (object.metadataJobs) { - if (!Array.isArray(object.metadataJobs)) - throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: array expected"); - message.metadataJobs = []; - for (var i = 0; i < object.metadataJobs.length; ++i) { - if (typeof object.metadataJobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: object expected"); - message.metadataJobs[i] = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} message ListMetadataJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMetadataJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metadataJobs = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.metadataJobs && message.metadataJobs.length) { - object.metadataJobs = []; - for (var j = 0; j < message.metadataJobs.length; ++j) - object.metadataJobs[j] = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListMetadataJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMetadataJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMetadataJobsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMetadataJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsResponse"; - }; - - return ListMetadataJobsResponse; - })(); - - v1.CancelMetadataJobRequest = (function() { - - /** - * Properties of a CancelMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICancelMetadataJobRequest - * @property {string|null} [name] CancelMetadataJobRequest name - */ - - /** - * Constructs a new CancelMetadataJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CancelMetadataJobRequest. - * @implements ICancelMetadataJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set - */ - function CancelMetadataJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelMetadataJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @instance - */ - CancelMetadataJobRequest.prototype.name = ""; - - /** - * Creates a new CancelMetadataJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest instance - */ - CancelMetadataJobRequest.create = function create(properties) { - return new CancelMetadataJobRequest(properties); - }; - - /** - * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelMetadataJobRequest.encode = function encode(message, writer) { - 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 CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelMetadataJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); - 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 CancelMetadataJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelMetadataJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelMetadataJobRequest.verify = function verify(message) { - if (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 CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest - */ - CancelMetadataJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CancelMetadataJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {google.cloud.dataplex.v1.CancelMetadataJobRequest} message CancelMetadataJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelMetadataJobRequest.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 CancelMetadataJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @instance - * @returns {Object.} JSON object - */ - CancelMetadataJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelMetadataJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelMetadataJobRequest"; - }; - - return CancelMetadataJobRequest; - })(); - - v1.MetadataJob = (function() { - - /** - * Properties of a MetadataJob. - * @memberof google.cloud.dataplex.v1 - * @interface IMetadataJob - * @property {string|null} [name] MetadataJob name - * @property {string|null} [uid] MetadataJob uid - * @property {google.protobuf.ITimestamp|null} [createTime] MetadataJob createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataJob updateTime - * @property {Object.|null} [labels] MetadataJob labels - * @property {google.cloud.dataplex.v1.MetadataJob.Type|null} [type] MetadataJob type - * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null} [importSpec] MetadataJob importSpec - * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null} [importResult] MetadataJob importResult - * @property {google.cloud.dataplex.v1.MetadataJob.IStatus|null} [status] MetadataJob status - */ - - /** - * Constructs a new MetadataJob. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a MetadataJob. - * @implements IMetadataJob - * @constructor - * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set - */ - function MetadataJob(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]]; - } - - /** - * MetadataJob name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.name = ""; - - /** - * MetadataJob uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.uid = ""; - - /** - * MetadataJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.createTime = null; - - /** - * MetadataJob updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.updateTime = null; - - /** - * MetadataJob labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.labels = $util.emptyObject; - - /** - * MetadataJob type. - * @member {google.cloud.dataplex.v1.MetadataJob.Type} type - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.type = 0; - - /** - * MetadataJob importSpec. - * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null|undefined} importSpec - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.importSpec = null; - - /** - * MetadataJob importResult. - * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null|undefined} importResult - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.importResult = null; - - /** - * MetadataJob status. - * @member {google.cloud.dataplex.v1.MetadataJob.IStatus|null|undefined} status - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - MetadataJob.prototype.status = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MetadataJob spec. - * @member {"importSpec"|undefined} spec - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - Object.defineProperty(MetadataJob.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["importSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * MetadataJob result. - * @member {"importResult"|undefined} result - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - */ - Object.defineProperty(MetadataJob.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["importResult"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MetadataJob instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob instance - */ - MetadataJob.create = function create(properties) { - return new MetadataJob(properties); - }; - - /** - * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataJob.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.cloud.dataplex.v1.MetadataJob.Status.encode(message.status, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.importSpec != null && Object.hasOwnProperty.call(message, "importSpec")) - $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.encode(message.importSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.importResult != null && Object.hasOwnProperty.call(message, "importResult")) - $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.encode(message.importResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetadataJob.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetadataJob message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataJob.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.type = reader.int32(); - break; - } - case 100: { - message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.decode(reader, reader.uint32()); - break; - } - case 200: { - message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.decode(reader, reader.uint32()); - break; - } - case 7: { - message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetadataJob message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetadataJob.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetadataJob message. - * @function verify - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetadataJob.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.importSpec != null && message.hasOwnProperty("importSpec")) { - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify(message.importSpec); - if (error) - return "importSpec." + error; - } - } - if (message.importResult != null && message.hasOwnProperty("importResult")) { - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify(message.importResult); - if (error) - return "importResult." + error; - } - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.cloud.dataplex.v1.MetadataJob.Status.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob - */ - MetadataJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob) - return object; - var message = new $root.google.cloud.dataplex.v1.MetadataJob(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.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.dataplex.v1.MetadataJob.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "IMPORT": - case 1: - message.type = 1; - break; - } - if (object.importSpec != null) { - if (typeof object.importSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importSpec: object expected"); - message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.fromObject(object.importSpec); - } - if (object.importResult != null) { - if (typeof object.importResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importResult: object expected"); - message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.fromObject(object.importResult); - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.status: object expected"); - message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {google.cloud.dataplex.v1.MetadataJob} message MetadataJob - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetadataJob.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.status = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] : message.type; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.toObject(message.status, options); - if (message.importSpec != null && message.hasOwnProperty("importSpec")) { - object.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.toObject(message.importSpec, options); - if (options.oneofs) - object.spec = "importSpec"; - } - if (message.importResult != null && message.hasOwnProperty("importResult")) { - object.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.toObject(message.importResult, options); - if (options.oneofs) - object.result = "importResult"; - } - return object; - }; - - /** - * Converts this MetadataJob to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.MetadataJob - * @instance - * @returns {Object.} JSON object - */ - MetadataJob.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetadataJob - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.MetadataJob - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetadataJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob"; - }; - - MetadataJob.ImportJobResult = (function() { - - /** - * Properties of an ImportJobResult. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @interface IImportJobResult - * @property {number|Long|null} [deletedEntries] ImportJobResult deletedEntries - * @property {number|Long|null} [updatedEntries] ImportJobResult updatedEntries - * @property {number|Long|null} [createdEntries] ImportJobResult createdEntries - * @property {number|Long|null} [unchangedEntries] ImportJobResult unchangedEntries - * @property {number|Long|null} [recreatedEntries] ImportJobResult recreatedEntries - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportJobResult updateTime - */ - - /** - * Constructs a new ImportJobResult. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @classdesc Represents an ImportJobResult. - * @implements IImportJobResult - * @constructor - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set - */ - function ImportJobResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportJobResult deletedEntries. - * @member {number|Long} deletedEntries - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.deletedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportJobResult updatedEntries. - * @member {number|Long} updatedEntries - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.updatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportJobResult createdEntries. - * @member {number|Long} createdEntries - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.createdEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportJobResult unchangedEntries. - * @member {number|Long} unchangedEntries - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.unchangedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportJobResult recreatedEntries. - * @member {number|Long} recreatedEntries - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.recreatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImportJobResult updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - */ - ImportJobResult.prototype.updateTime = null; - - /** - * Creates a new ImportJobResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult instance - */ - ImportJobResult.create = function create(properties) { - return new ImportJobResult(properties); - }; - - /** - * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deletedEntries != null && Object.hasOwnProperty.call(message, "deletedEntries")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.deletedEntries); - if (message.updatedEntries != null && Object.hasOwnProperty.call(message, "updatedEntries")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.updatedEntries); - if (message.createdEntries != null && Object.hasOwnProperty.call(message, "createdEntries")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.createdEntries); - if (message.unchangedEntries != null && Object.hasOwnProperty.call(message, "unchangedEntries")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unchangedEntries); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.recreatedEntries != null && Object.hasOwnProperty.call(message, "recreatedEntries")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.recreatedEntries); - return writer; - }; - - /** - * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportJobResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deletedEntries = reader.int64(); - break; - } - case 2: { - message.updatedEntries = reader.int64(); - break; - } - case 3: { - message.createdEntries = reader.int64(); - break; - } - case 4: { - message.unchangedEntries = reader.int64(); - break; - } - case 6: { - message.recreatedEntries = reader.int64(); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportJobResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportJobResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) - if (!$util.isInteger(message.deletedEntries) && !(message.deletedEntries && $util.isInteger(message.deletedEntries.low) && $util.isInteger(message.deletedEntries.high))) - return "deletedEntries: integer|Long expected"; - if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) - if (!$util.isInteger(message.updatedEntries) && !(message.updatedEntries && $util.isInteger(message.updatedEntries.low) && $util.isInteger(message.updatedEntries.high))) - return "updatedEntries: integer|Long expected"; - if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) - if (!$util.isInteger(message.createdEntries) && !(message.createdEntries && $util.isInteger(message.createdEntries.low) && $util.isInteger(message.createdEntries.high))) - return "createdEntries: integer|Long expected"; - if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) - if (!$util.isInteger(message.unchangedEntries) && !(message.unchangedEntries && $util.isInteger(message.unchangedEntries.low) && $util.isInteger(message.unchangedEntries.high))) - return "unchangedEntries: integer|Long expected"; - if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) - if (!$util.isInteger(message.recreatedEntries) && !(message.recreatedEntries && $util.isInteger(message.recreatedEntries.low) && $util.isInteger(message.recreatedEntries.high))) - return "recreatedEntries: integer|Long expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult - */ - ImportJobResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult) - return object; - var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); - if (object.deletedEntries != null) - if ($util.Long) - (message.deletedEntries = $util.Long.fromValue(object.deletedEntries)).unsigned = false; - else if (typeof object.deletedEntries === "string") - message.deletedEntries = parseInt(object.deletedEntries, 10); - else if (typeof object.deletedEntries === "number") - message.deletedEntries = object.deletedEntries; - else if (typeof object.deletedEntries === "object") - message.deletedEntries = new $util.LongBits(object.deletedEntries.low >>> 0, object.deletedEntries.high >>> 0).toNumber(); - if (object.updatedEntries != null) - if ($util.Long) - (message.updatedEntries = $util.Long.fromValue(object.updatedEntries)).unsigned = false; - else if (typeof object.updatedEntries === "string") - message.updatedEntries = parseInt(object.updatedEntries, 10); - else if (typeof object.updatedEntries === "number") - message.updatedEntries = object.updatedEntries; - else if (typeof object.updatedEntries === "object") - message.updatedEntries = new $util.LongBits(object.updatedEntries.low >>> 0, object.updatedEntries.high >>> 0).toNumber(); - if (object.createdEntries != null) - if ($util.Long) - (message.createdEntries = $util.Long.fromValue(object.createdEntries)).unsigned = false; - else if (typeof object.createdEntries === "string") - message.createdEntries = parseInt(object.createdEntries, 10); - else if (typeof object.createdEntries === "number") - message.createdEntries = object.createdEntries; - else if (typeof object.createdEntries === "object") - message.createdEntries = new $util.LongBits(object.createdEntries.low >>> 0, object.createdEntries.high >>> 0).toNumber(); - if (object.unchangedEntries != null) - if ($util.Long) - (message.unchangedEntries = $util.Long.fromValue(object.unchangedEntries)).unsigned = false; - else if (typeof object.unchangedEntries === "string") - message.unchangedEntries = parseInt(object.unchangedEntries, 10); - else if (typeof object.unchangedEntries === "number") - message.unchangedEntries = object.unchangedEntries; - else if (typeof object.unchangedEntries === "object") - message.unchangedEntries = new $util.LongBits(object.unchangedEntries.low >>> 0, object.unchangedEntries.high >>> 0).toNumber(); - if (object.recreatedEntries != null) - if ($util.Long) - (message.recreatedEntries = $util.Long.fromValue(object.recreatedEntries)).unsigned = false; - else if (typeof object.recreatedEntries === "string") - message.recreatedEntries = parseInt(object.recreatedEntries, 10); - else if (typeof object.recreatedEntries === "number") - message.recreatedEntries = object.recreatedEntries; - else if (typeof object.recreatedEntries === "object") - message.recreatedEntries = new $util.LongBits(object.recreatedEntries.low >>> 0, object.recreatedEntries.high >>> 0).toNumber(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobResult.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} message ImportJobResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportJobResult.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.deletedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.deletedEntries = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.updatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.updatedEntries = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.createdEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.createdEntries = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unchangedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unchangedEntries = options.longs === String ? "0" : 0; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.recreatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.recreatedEntries = options.longs === String ? "0" : 0; - } - if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) - if (typeof message.deletedEntries === "number") - object.deletedEntries = options.longs === String ? String(message.deletedEntries) : message.deletedEntries; - else - object.deletedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.deletedEntries) : options.longs === Number ? new $util.LongBits(message.deletedEntries.low >>> 0, message.deletedEntries.high >>> 0).toNumber() : message.deletedEntries; - if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) - if (typeof message.updatedEntries === "number") - object.updatedEntries = options.longs === String ? String(message.updatedEntries) : message.updatedEntries; - else - object.updatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.updatedEntries) : options.longs === Number ? new $util.LongBits(message.updatedEntries.low >>> 0, message.updatedEntries.high >>> 0).toNumber() : message.updatedEntries; - if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) - if (typeof message.createdEntries === "number") - object.createdEntries = options.longs === String ? String(message.createdEntries) : message.createdEntries; - else - object.createdEntries = options.longs === String ? $util.Long.prototype.toString.call(message.createdEntries) : options.longs === Number ? new $util.LongBits(message.createdEntries.low >>> 0, message.createdEntries.high >>> 0).toNumber() : message.createdEntries; - if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) - if (typeof message.unchangedEntries === "number") - object.unchangedEntries = options.longs === String ? String(message.unchangedEntries) : message.unchangedEntries; - else - object.unchangedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.unchangedEntries) : options.longs === Number ? new $util.LongBits(message.unchangedEntries.low >>> 0, message.unchangedEntries.high >>> 0).toNumber() : message.unchangedEntries; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) - if (typeof message.recreatedEntries === "number") - object.recreatedEntries = options.longs === String ? String(message.recreatedEntries) : message.recreatedEntries; - else - object.recreatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.recreatedEntries) : options.longs === Number ? new $util.LongBits(message.recreatedEntries.low >>> 0, message.recreatedEntries.high >>> 0).toNumber() : message.recreatedEntries; - return object; - }; - - /** - * Converts this ImportJobResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @instance - * @returns {Object.} JSON object - */ - ImportJobResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportJobResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportJobResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"; - }; - - return ImportJobResult; - })(); - - MetadataJob.ImportJobSpec = (function() { - - /** - * Properties of an ImportJobSpec. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @interface IImportJobSpec - * @property {string|null} [sourceStorageUri] ImportJobSpec sourceStorageUri - * @property {google.protobuf.ITimestamp|null} [sourceCreateTime] ImportJobSpec sourceCreateTime - * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null} [scope] ImportJobSpec scope - * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [entrySyncMode] ImportJobSpec entrySyncMode - * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [aspectSyncMode] ImportJobSpec aspectSyncMode - * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null} [logLevel] ImportJobSpec logLevel - */ - - /** - * Constructs a new ImportJobSpec. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @classdesc Represents an ImportJobSpec. - * @implements IImportJobSpec - * @constructor - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set - */ - function ImportJobSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportJobSpec sourceStorageUri. - * @member {string} sourceStorageUri - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.sourceStorageUri = ""; - - /** - * ImportJobSpec sourceCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} sourceCreateTime - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.sourceCreateTime = null; - - /** - * ImportJobSpec scope. - * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null|undefined} scope - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.scope = null; - - /** - * ImportJobSpec entrySyncMode. - * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} entrySyncMode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.entrySyncMode = 0; - - /** - * ImportJobSpec aspectSyncMode. - * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} aspectSyncMode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.aspectSyncMode = 0; - - /** - * ImportJobSpec logLevel. - * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel} logLevel - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - */ - ImportJobSpec.prototype.logLevel = 0; - - /** - * Creates a new ImportJobSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec instance - */ - ImportJobSpec.create = function create(properties) { - return new ImportJobSpec(properties); - }; - - /** - * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceStorageUri != null && Object.hasOwnProperty.call(message, "sourceStorageUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceStorageUri); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.encode(message.scope, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entrySyncMode != null && Object.hasOwnProperty.call(message, "entrySyncMode")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entrySyncMode); - if (message.aspectSyncMode != null && Object.hasOwnProperty.call(message, "aspectSyncMode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aspectSyncMode); - if (message.sourceCreateTime != null && Object.hasOwnProperty.call(message, "sourceCreateTime")) - $root.google.protobuf.Timestamp.encode(message.sourceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.logLevel); - return writer; - }; - - /** - * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportJobSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceStorageUri = reader.string(); - break; - } - case 5: { - message.sourceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.decode(reader, reader.uint32()); - break; - } - case 3: { - message.entrySyncMode = reader.int32(); - break; - } - case 4: { - message.aspectSyncMode = reader.int32(); - break; - } - case 6: { - message.logLevel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportJobSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportJobSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) - if (!$util.isString(message.sourceStorageUri)) - return "sourceStorageUri: string expected"; - if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.sourceCreateTime); - if (error) - return "sourceCreateTime." + error; - } - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) - switch (message.entrySyncMode) { - default: - return "entrySyncMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) - switch (message.aspectSyncMode) { - default: - return "aspectSyncMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - switch (message.logLevel) { - default: - return "logLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec - */ - ImportJobSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); - if (object.sourceStorageUri != null) - message.sourceStorageUri = String(object.sourceStorageUri); - if (object.sourceCreateTime != null) { - if (typeof object.sourceCreateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.sourceCreateTime: object expected"); - message.sourceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceCreateTime); - } - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.scope: object expected"); - message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.fromObject(object.scope); - } - switch (object.entrySyncMode) { - default: - if (typeof object.entrySyncMode === "number") { - message.entrySyncMode = object.entrySyncMode; - break; - } - break; - case "SYNC_MODE_UNSPECIFIED": - case 0: - message.entrySyncMode = 0; - break; - case "FULL": - case 1: - message.entrySyncMode = 1; - break; - case "INCREMENTAL": - case 2: - message.entrySyncMode = 2; - break; - } - switch (object.aspectSyncMode) { - default: - if (typeof object.aspectSyncMode === "number") { - message.aspectSyncMode = object.aspectSyncMode; - break; - } - break; - case "SYNC_MODE_UNSPECIFIED": - case 0: - message.aspectSyncMode = 0; - break; - case "FULL": - case 1: - message.aspectSyncMode = 1; - break; - case "INCREMENTAL": - case 2: - message.aspectSyncMode = 2; - break; - } - switch (object.logLevel) { - default: - if (typeof object.logLevel === "number") { - message.logLevel = object.logLevel; - break; - } - break; - case "LOG_LEVEL_UNSPECIFIED": - case 0: - message.logLevel = 0; - break; - case "DEBUG": - case 1: - message.logLevel = 1; - break; - case "INFO": - case 2: - message.logLevel = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} message ImportJobSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportJobSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceStorageUri = ""; - object.scope = null; - object.entrySyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; - object.aspectSyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; - object.sourceCreateTime = null; - object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; - } - if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) - object.sourceStorageUri = message.sourceStorageUri; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.toObject(message.scope, options); - if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) - object.entrySyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] === undefined ? message.entrySyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] : message.entrySyncMode; - if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) - object.aspectSyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] === undefined ? message.aspectSyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] : message.aspectSyncMode; - if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) - object.sourceCreateTime = $root.google.protobuf.Timestamp.toObject(message.sourceCreateTime, options); - if (message.logLevel != null && message.hasOwnProperty("logLevel")) - object.logLevel = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] === undefined ? message.logLevel : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] : message.logLevel; - return object; - }; - - /** - * Converts this ImportJobSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @instance - * @returns {Object.} JSON object - */ - ImportJobSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportJobSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportJobSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"; - }; - - /** - * SyncMode enum. - * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode - * @enum {number} - * @property {number} SYNC_MODE_UNSPECIFIED=0 SYNC_MODE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} INCREMENTAL=2 INCREMENTAL value - */ - ImportJobSpec.SyncMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SYNC_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "INCREMENTAL"] = 2; - return values; - })(); - - /** - * LogLevel enum. - * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel - * @enum {number} - * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value - * @property {number} DEBUG=1 DEBUG value - * @property {number} INFO=2 INFO value - */ - ImportJobSpec.LogLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEBUG"] = 1; - values[valuesById[2] = "INFO"] = 2; - return values; - })(); - - ImportJobSpec.ImportJobScope = (function() { - - /** - * Properties of an ImportJobScope. - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @interface IImportJobScope - * @property {Array.|null} [entryGroups] ImportJobScope entryGroups - * @property {Array.|null} [entryTypes] ImportJobScope entryTypes - * @property {Array.|null} [aspectTypes] ImportJobScope aspectTypes - */ - - /** - * Constructs a new ImportJobScope. - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec - * @classdesc Represents an ImportJobScope. - * @implements IImportJobScope - * @constructor - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set - */ - function ImportJobScope(properties) { - this.entryGroups = []; - this.entryTypes = []; - this.aspectTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportJobScope entryGroups. - * @member {Array.} entryGroups - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @instance - */ - ImportJobScope.prototype.entryGroups = $util.emptyArray; - - /** - * ImportJobScope entryTypes. - * @member {Array.} entryTypes - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @instance - */ - ImportJobScope.prototype.entryTypes = $util.emptyArray; - - /** - * ImportJobScope aspectTypes. - * @member {Array.} aspectTypes - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @instance - */ - ImportJobScope.prototype.aspectTypes = $util.emptyArray; - - /** - * Creates a new ImportJobScope instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope instance - */ - ImportJobScope.create = function create(properties) { - return new ImportJobScope(properties); - }; - - /** - * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobScope.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entryGroups[i]); - if (message.entryTypes != null && message.entryTypes.length) - for (var i = 0; i < message.entryTypes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryTypes[i]); - if (message.aspectTypes != null && message.aspectTypes.length) - for (var i = 0; i < message.aspectTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); - return writer; - }; - - /** - * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportJobScope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportJobScope message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobScope.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entryGroups && message.entryGroups.length)) - message.entryGroups = []; - message.entryGroups.push(reader.string()); - break; - } - case 2: { - if (!(message.entryTypes && message.entryTypes.length)) - message.entryTypes = []; - message.entryTypes.push(reader.string()); - break; - } - case 3: { - if (!(message.aspectTypes && message.aspectTypes.length)) - message.aspectTypes = []; - message.aspectTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportJobScope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportJobScope message. - * @function verify - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportJobScope.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) - if (!$util.isString(message.entryGroups[i])) - return "entryGroups: string[] expected"; - } - if (message.entryTypes != null && message.hasOwnProperty("entryTypes")) { - if (!Array.isArray(message.entryTypes)) - return "entryTypes: array expected"; - for (var i = 0; i < message.entryTypes.length; ++i) - if (!$util.isString(message.entryTypes[i])) - return "entryTypes: string[] expected"; - } - if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { - if (!Array.isArray(message.aspectTypes)) - return "aspectTypes: array expected"; - for (var i = 0; i < message.aspectTypes.length; ++i) - if (!$util.isString(message.aspectTypes[i])) - return "aspectTypes: string[] expected"; - } - return null; - }; - - /** - * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope - */ - ImportJobScope.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope) - return object; - var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); - if (object.entryGroups) { - if (!Array.isArray(object.entryGroups)) - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryGroups: array expected"); - message.entryGroups = []; - for (var i = 0; i < object.entryGroups.length; ++i) - message.entryGroups[i] = String(object.entryGroups[i]); - } - if (object.entryTypes) { - if (!Array.isArray(object.entryTypes)) - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryTypes: array expected"); - message.entryTypes = []; - for (var i = 0; i < object.entryTypes.length; ++i) - message.entryTypes[i] = String(object.entryTypes[i]); - } - if (object.aspectTypes) { - if (!Array.isArray(object.aspectTypes)) - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.aspectTypes: array expected"); - message.aspectTypes = []; - for (var i = 0; i < object.aspectTypes.length; ++i) - message.aspectTypes[i] = String(object.aspectTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} message ImportJobScope - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportJobScope.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.entryGroups = []; - object.entryTypes = []; - object.aspectTypes = []; - } - if (message.entryGroups && message.entryGroups.length) { - object.entryGroups = []; - for (var j = 0; j < message.entryGroups.length; ++j) - object.entryGroups[j] = message.entryGroups[j]; - } - if (message.entryTypes && message.entryTypes.length) { - object.entryTypes = []; - for (var j = 0; j < message.entryTypes.length; ++j) - object.entryTypes[j] = message.entryTypes[j]; - } - if (message.aspectTypes && message.aspectTypes.length) { - object.aspectTypes = []; - for (var j = 0; j < message.aspectTypes.length; ++j) - object.aspectTypes[j] = message.aspectTypes[j]; - } - return object; - }; - - /** - * Converts this ImportJobScope to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @instance - * @returns {Object.} JSON object - */ - ImportJobScope.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportJobScope - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportJobScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"; - }; - - return ImportJobScope; - })(); - - return ImportJobSpec; - })(); - - /** - * Type enum. - * @name google.cloud.dataplex.v1.MetadataJob.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} IMPORT=1 IMPORT value - */ - MetadataJob.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMPORT"] = 1; - return values; - })(); - - MetadataJob.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @interface IStatus - * @property {google.cloud.dataplex.v1.MetadataJob.Status.State|null} [state] Status state - * @property {string|null} [message] Status message - * @property {number|null} [completionPercent] Status completionPercent - * @property {google.protobuf.ITimestamp|null} [updateTime] Status updateTime - */ - - /** - * Constructs a new Status. - * @memberof google.cloud.dataplex.v1.MetadataJob - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set - */ - function Status(properties) { - if (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 state. - * @member {google.cloud.dataplex.v1.MetadataJob.Status.State} state - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @instance - */ - Status.prototype.state = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status completionPercent. - * @member {number} completionPercent - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @instance - */ - Status.prototype.completionPercent = 0; - - /** - * Status updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @instance - */ - Status.prototype.updateTime = null; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.completionPercent != null && Object.hasOwnProperty.call(message, "completionPercent")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.completionPercent); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.completionPercent = reader.int32(); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.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.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) - if (!$util.isInteger(message.completionPercent)) - return "completionPercent: integer expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.Status) - return object; - var message = new $root.google.cloud.dataplex.v1.MetadataJob.Status(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "QUEUED": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "CANCELING": - case 3: - message.state = 3; - break; - case "CANCELED": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - case "SUCCEEDED_WITH_ERRORS": - case 7: - message.state = 7; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.completionPercent != null) - message.completionPercent = object.completionPercent | 0; - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.MetadataJob.Status.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.MetadataJob.Status - * @static - * @param {google.cloud.dataplex.v1.MetadataJob.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.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.completionPercent = 0; - object.updateTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) - object.completionPercent = message.completionPercent; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.MetadataJob.Status.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} QUEUED=1 QUEUED value - * @property {number} RUNNING=2 RUNNING value - * @property {number} CANCELING=3 CANCELING value - * @property {number} CANCELED=4 CANCELED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value - * @property {number} SUCCEEDED_WITH_ERRORS=7 SUCCEEDED_WITH_ERRORS value - */ - Status.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "QUEUED"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "CANCELING"] = 3; - values[valuesById[4] = "CANCELED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - values[valuesById[7] = "SUCCEEDED_WITH_ERRORS"] = 7; - return values; - })(); - - return Status; - })(); - - return MetadataJob; - })(); - - /** - * EntryView enum. - * @name google.cloud.dataplex.v1.EntryView - * @enum {number} - * @property {number} ENTRY_VIEW_UNSPECIFIED=0 ENTRY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - * @property {number} CUSTOM=3 CUSTOM value - * @property {number} ALL=4 ALL value - */ - v1.EntryView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTRY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[3] = "CUSTOM"] = 3; - values[valuesById[4] = "ALL"] = 4; - return values; - })(); - - /** - * TransferStatus enum. - * @name google.cloud.dataplex.v1.TransferStatus - * @enum {number} - * @property {number} TRANSFER_STATUS_UNSPECIFIED=0 TRANSFER_STATUS_UNSPECIFIED value - * @property {number} TRANSFER_STATUS_MIGRATED=1 TRANSFER_STATUS_MIGRATED value - * @property {number} TRANSFER_STATUS_TRANSFERRED=2 TRANSFER_STATUS_TRANSFERRED value - */ - v1.TransferStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRANSFER_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "TRANSFER_STATUS_MIGRATED"] = 1; - values[valuesById[2] = "TRANSFER_STATUS_TRANSFERRED"] = 2; - return values; - })(); - - v1.DataplexService = (function() { - - /** - * Constructs a new DataplexService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataplexService - * @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 DataplexService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; - - /** - * Creates new DataplexService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.DataplexService - * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. - */ - DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { - return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateLake" }); - - /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { - return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateLake" }); - - /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { - return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteLake" }); - - /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse - */ - - /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { - return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); - }, "name", { value: "ListLakes" }); - - /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Lake} [response] Lake - */ - - /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { - return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); - }, "name", { value: "GetLake" }); - - /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakeActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ - - /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { - return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListLakeActions" }); - - /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { - return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateZone" }); - - /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { - return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateZone" }); - - /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { - return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteZone" }); - - /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZonesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse - */ - - /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { - return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); - }, "name", { value: "ListZones" }); - - /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Zone} [response] Zone - */ - - /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { - return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); - }, "name", { value: "GetZone" }); - - /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZoneActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ - - /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { - return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListZoneActions" }); - - /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { - return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAsset" }); - - /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { - return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAsset" }); - - /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { - return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAsset" }); - - /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse - */ - - /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); - - /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Asset} [response] Asset - */ - - /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { - return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); - }, "name", { value: "GetAsset" }); - - /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ - - /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { - return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListAssetActions" }); - - /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { - return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTask" }); - - /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { - return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTask" }); - - /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { - return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTask" }); - - /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListTasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse - */ - - /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { - return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); - }, "name", { value: "ListTasks" }); - - /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Task} [response] Task - */ - - /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { - return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); - }, "name", { value: "GetTask" }); - - /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse - */ - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); - - /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef RunTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.RunTaskResponse} [response] RunTaskResponse - */ - - /** - * Calls RunTask. - * @function runTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.RunTaskCallback} callback Node-style callback called with the error, if any, and RunTaskResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.runTask = function runTask(request, callback) { - return this.rpcCall(runTask, $root.google.cloud.dataplex.v1.RunTaskRequest, $root.google.cloud.dataplex.v1.RunTaskResponse, request, callback); - }, "name", { value: "RunTask" }); - - /** - * Calls RunTask. - * @function runTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Job} [response] Job - */ - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); - }, "name", { value: "GetJob" }); - - /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CancelJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { - return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelJob" }); - - /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEnvironment" }); - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Environment} [response] Environment - */ - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListSessionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse - */ - - /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { - return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); - }, "name", { value: "ListSessions" }); - - /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataplexService; - })(); - - v1.CreateLakeRequest = (function() { - - /** - * Properties of a CreateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateLakeRequest - * @property {string|null} [parent] CreateLakeRequest parent - * @property {string|null} [lakeId] CreateLakeRequest lakeId - * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake - * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly - */ - - /** - * Constructs a new CreateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateLakeRequest. - * @implements ICreateLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set - */ - function CreateLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateLakeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.parent = ""; - - /** - * CreateLakeRequest lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.lakeId = ""; - - /** - * CreateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.lake = null; - - /** - * CreateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance - */ - CreateLakeRequest.create = function create(properties) { - return new CreateLakeRequest(properties); - }; - - /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateLakeRequest.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.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.lakeId = reader.string(); - break; - } - case 3: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateLakeRequest.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.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); - if (error) - return "lake." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest - */ - CreateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateLakeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.lakeId = ""; - object.lake = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; - }; - - return CreateLakeRequest; - })(); - - v1.UpdateLakeRequest = (function() { - - /** - * Properties of an UpdateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateLakeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask - * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake - * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly - */ - - /** - * Constructs a new UpdateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateLakeRequest. - * @implements IUpdateLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - */ - function UpdateLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateLakeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.updateMask = null; - - /** - * UpdateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.lake = null; - - /** - * UpdateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance - */ - UpdateLakeRequest.create = function create(properties) { - return new UpdateLakeRequest(properties); - }; - - /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLakeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateLakeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); - if (error) - return "lake." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - */ - UpdateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateLakeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.lake = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; - }; - - return UpdateLakeRequest; - })(); - - v1.DeleteLakeRequest = (function() { - - /** - * Properties of a DeleteLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteLakeRequest - * @property {string|null} [name] DeleteLakeRequest name - */ - - /** - * Constructs a new DeleteLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteLakeRequest. - * @implements IDeleteLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - */ - function DeleteLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @instance - */ - DeleteLakeRequest.prototype.name = ""; - - /** - * Creates a new DeleteLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance - */ - DeleteLakeRequest.create = function create(properties) { - return new DeleteLakeRequest(properties); - }; - - /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLakeRequest.encode = function encode(message, writer) { - 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 DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); - 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 DeleteLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteLakeRequest.verify = function verify(message) { - if (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 DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - */ - DeleteLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLakeRequest.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 DeleteLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; - }; - - return DeleteLakeRequest; - })(); - - v1.ListLakesRequest = (function() { - - /** - * Properties of a ListLakesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakesRequest - * @property {string|null} [parent] ListLakesRequest parent - * @property {number|null} [pageSize] ListLakesRequest pageSize - * @property {string|null} [pageToken] ListLakesRequest pageToken - * @property {string|null} [filter] ListLakesRequest filter - * @property {string|null} [orderBy] ListLakesRequest orderBy - */ - - /** - * Constructs a new ListLakesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesRequest. - * @implements IListLakesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - */ - function ListLakesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLakesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.parent = ""; - - /** - * ListLakesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.pageSize = 0; - - /** - * ListLakesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.pageToken = ""; - - /** - * ListLakesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.filter = ""; - - /** - * ListLakesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListLakesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance - */ - ListLakesRequest.create = function create(properties) { - return new ListLakesRequest(properties); - }; - - /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLakesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLakesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - */ - ListLakesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListLakesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - * @returns {Object.} JSON object - */ - ListLakesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListLakesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; - }; - - return ListLakesRequest; - })(); - - v1.ListLakesResponse = (function() { - - /** - * Properties of a ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakesResponse - * @property {Array.|null} [lakes] ListLakesResponse lakes - * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations - */ - - /** - * Constructs a new ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesResponse. - * @implements IListLakesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - */ - function ListLakesResponse(properties) { - this.lakes = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLakesResponse lakes. - * @member {Array.} lakes - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.lakes = $util.emptyArray; - - /** - * ListLakesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.nextPageToken = ""; - - /** - * ListLakesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListLakesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance - */ - ListLakesResponse.create = function create(properties) { - return new ListLakesResponse(properties); - }; - - /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lakes != null && message.lakes.length) - for (var i = 0; i < message.lakes.length; ++i) - $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLakesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.lakes && message.lakes.length)) - message.lakes = []; - message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLakesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lakes != null && message.hasOwnProperty("lakes")) { - if (!Array.isArray(message.lakes)) - return "lakes: array expected"; - for (var i = 0; i < message.lakes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); - if (error) - return "lakes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - */ - ListLakesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - if (object.lakes) { - if (!Array.isArray(object.lakes)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); - message.lakes = []; - for (var i = 0; i < object.lakes.length; ++i) { - if (typeof object.lakes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); - message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.lakes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.lakes && message.lakes.length) { - object.lakes = []; - for (var j = 0; j < message.lakes.length; ++j) - object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListLakesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - * @returns {Object.} JSON object - */ - ListLakesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListLakesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; - }; - - return ListLakesResponse; - })(); - - v1.ListLakeActionsRequest = (function() { - - /** - * Properties of a ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakeActionsRequest - * @property {string|null} [parent] ListLakeActionsRequest parent - * @property {number|null} [pageSize] ListLakeActionsRequest pageSize - * @property {string|null} [pageToken] ListLakeActionsRequest pageToken - */ - - /** - * Constructs a new ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakeActionsRequest. - * @implements IListLakeActionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - */ - function ListLakeActionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListLakeActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.parent = ""; - - /** - * ListLakeActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageSize = 0; - - /** - * ListLakeActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListLakeActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance - */ - ListLakeActionsRequest.create = function create(properties) { - return new ListLakeActionsRequest(properties); - }; - - /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.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 ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakeActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - 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 ListLakeActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLakeActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakeActionsRequest.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 ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - */ - ListLakeActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - 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 ListLakeActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakeActionsRequest.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 ListLakeActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListLakeActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListLakeActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; - }; - - return ListLakeActionsRequest; - })(); - - v1.ListActionsResponse = (function() { - - /** - * Properties of a ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListActionsResponse - * @property {Array.|null} [actions] ListActionsResponse actions - * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken - */ - - /** - * Constructs a new ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListActionsResponse. - * @implements IListActionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - */ - function ListActionsResponse(properties) { - this.actions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListActionsResponse actions. - * @member {Array.} actions - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - */ - ListActionsResponse.prototype.actions = $util.emptyArray; - - /** - * ListActionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - */ - ListActionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListActionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance - */ - ListActionsResponse.create = function create(properties) { - return new ListActionsResponse(properties); - }; - - /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListActionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListActionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListActionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - */ - ListActionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); - message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListActionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListActionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListActionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListActionsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; - }; - - return ListActionsResponse; - })(); - - v1.GetLakeRequest = (function() { - - /** - * Properties of a GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetLakeRequest - * @property {string|null} [name] GetLakeRequest name - */ - - /** - * Constructs a new GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetLakeRequest. - * @implements IGetLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - */ - function GetLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @instance - */ - GetLakeRequest.prototype.name = ""; - - /** - * Creates a new GetLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance - */ - GetLakeRequest.create = function create(properties) { - return new GetLakeRequest(properties); - }; - - /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLakeRequest.encode = function encode(message, writer) { - 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 GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - 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 GetLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetLakeRequest.verify = function verify(message) { - if (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 GetLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - */ - GetLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetLakeRequest.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 GetLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @instance - * @returns {Object.} JSON object - */ - GetLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; - }; - - return GetLakeRequest; - })(); - - v1.CreateZoneRequest = (function() { - - /** - * Properties of a CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateZoneRequest - * @property {string|null} [parent] CreateZoneRequest parent - * @property {string|null} [zoneId] CreateZoneRequest zoneId - * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone - * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly - */ - - /** - * Constructs a new CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateZoneRequest. - * @implements ICreateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - */ - function CreateZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateZoneRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.parent = ""; - - /** - * CreateZoneRequest zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.zoneId = ""; - - /** - * CreateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.zone = null; - - /** - * CreateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance - */ - CreateZoneRequest.create = function create(properties) { - return new CreateZoneRequest(properties); - }; - - /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateZoneRequest.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.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.zoneId = reader.string(); - break; - } - case 3: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateZoneRequest.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.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - */ - CreateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.zoneId = ""; - object.zone = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - * @returns {Object.} JSON object - */ - CreateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; - }; - - return CreateZoneRequest; - })(); - - v1.UpdateZoneRequest = (function() { - - /** - * Properties of an UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateZoneRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask - * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone - * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly - */ - - /** - * Constructs a new UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateZoneRequest. - * @implements IUpdateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - */ - function UpdateZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateZoneRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.updateMask = null; - - /** - * UpdateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.zone = null; - - /** - * UpdateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance - */ - UpdateZoneRequest.create = function create(properties) { - return new UpdateZoneRequest(properties); - }; - - /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateZoneRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateZoneRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - */ - UpdateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.zone = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; - }; - - return UpdateZoneRequest; - })(); - - v1.DeleteZoneRequest = (function() { - - /** - * Properties of a DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteZoneRequest - * @property {string|null} [name] DeleteZoneRequest name - */ - - /** - * Constructs a new DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteZoneRequest. - * @implements IDeleteZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - */ - function DeleteZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @instance - */ - DeleteZoneRequest.prototype.name = ""; - - /** - * Creates a new DeleteZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance - */ - DeleteZoneRequest.create = function create(properties) { - return new DeleteZoneRequest(properties); - }; - - /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteZoneRequest.encode = function encode(message, writer) { - 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 DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - 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 DeleteZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteZoneRequest.verify = function verify(message) { - if (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 DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - */ - DeleteZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteZoneRequest.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 DeleteZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; - }; - - return DeleteZoneRequest; - })(); - - v1.ListZonesRequest = (function() { - - /** - * Properties of a ListZonesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListZonesRequest - * @property {string|null} [parent] ListZonesRequest parent - * @property {number|null} [pageSize] ListZonesRequest pageSize - * @property {string|null} [pageToken] ListZonesRequest pageToken - * @property {string|null} [filter] ListZonesRequest filter - * @property {string|null} [orderBy] ListZonesRequest orderBy - */ - - /** - * Constructs a new ListZonesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesRequest. - * @implements IListZonesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - */ - function ListZonesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListZonesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.parent = ""; - - /** - * ListZonesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageSize = 0; - - /** - * ListZonesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageToken = ""; - - /** - * ListZonesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.filter = ""; - - /** - * ListZonesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListZonesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance - */ - ListZonesRequest.create = function create(properties) { - return new ListZonesRequest(properties); - }; - - /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListZonesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListZonesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZonesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - */ - ListZonesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListZonesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListZonesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - * @returns {Object.} JSON object - */ - ListZonesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListZonesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; - }; - - return ListZonesRequest; - })(); - - v1.ListZonesResponse = (function() { - - /** - * Properties of a ListZonesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListZonesResponse - * @property {Array.|null} [zones] ListZonesResponse zones - * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken - */ - - /** - * Constructs a new ListZonesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesResponse. - * @implements IListZonesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - */ - function ListZonesResponse(properties) { - this.zones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListZonesResponse zones. - * @member {Array.} zones - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - */ - ListZonesResponse.prototype.zones = $util.emptyArray; - - /** - * ListZonesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - */ - ListZonesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListZonesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance - */ - ListZonesResponse.create = function create(properties) { - return new ListZonesResponse(properties); - }; - - /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListZonesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListZonesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZonesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); - if (error) - return "zones." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - */ - ListZonesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) { - if (typeof object.zones[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); - message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListZonesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.zones = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListZonesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - * @returns {Object.} JSON object - */ - ListZonesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListZonesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; - }; - - return ListZonesResponse; - })(); - - v1.ListZoneActionsRequest = (function() { - - /** - * Properties of a ListZoneActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListZoneActionsRequest - * @property {string|null} [parent] ListZoneActionsRequest parent - * @property {number|null} [pageSize] ListZoneActionsRequest pageSize - * @property {string|null} [pageToken] ListZoneActionsRequest pageToken - */ - - /** - * Constructs a new ListZoneActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZoneActionsRequest. - * @implements IListZoneActionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set - */ - function ListZoneActionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListZoneActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.parent = ""; - - /** - * ListZoneActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.pageSize = 0; - - /** - * ListZoneActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListZoneActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance - */ - ListZoneActionsRequest.create = function create(properties) { - return new ListZoneActionsRequest(properties); - }; - - /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZoneActionsRequest.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 ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZoneActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - 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 ListZoneActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListZoneActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZoneActionsRequest.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 ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - */ - ListZoneActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - 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 ListZoneActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListZoneActionsRequest.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 ListZoneActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListZoneActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListZoneActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; - }; - - return ListZoneActionsRequest; - })(); - - v1.GetZoneRequest = (function() { - - /** - * Properties of a GetZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetZoneRequest - * @property {string|null} [name] GetZoneRequest name - */ - - /** - * Constructs a new GetZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetZoneRequest. - * @implements IGetZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set - */ - function GetZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @instance - */ - GetZoneRequest.prototype.name = ""; - - /** - * Creates a new GetZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance - */ - GetZoneRequest.create = function create(properties) { - return new GetZoneRequest(properties); - }; - - /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetZoneRequest.encode = function encode(message, writer) { - 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 GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); - 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 GetZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetZoneRequest.verify = function verify(message) { - if (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 GetZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest - */ - GetZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetZoneRequest.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 GetZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @instance - * @returns {Object.} JSON object - */ - GetZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; - }; - - return GetZoneRequest; - })(); - - v1.CreateAssetRequest = (function() { - - /** - * Properties of a CreateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateAssetRequest - * @property {string|null} [parent] CreateAssetRequest parent - * @property {string|null} [assetId] CreateAssetRequest assetId - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset - * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly - */ - - /** - * Constructs a new CreateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateAssetRequest. - * @implements ICreateAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set - */ - function CreateAssetRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateAssetRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - */ - CreateAssetRequest.prototype.parent = ""; - - /** - * CreateAssetRequest assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - */ - CreateAssetRequest.prototype.assetId = ""; - - /** - * CreateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - */ - CreateAssetRequest.prototype.asset = null; - - /** - * CreateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - */ - CreateAssetRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance - */ - CreateAssetRequest.create = function create(properties) { - return new CreateAssetRequest(properties); - }; - - /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAssetRequest.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.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.assetId = reader.string(); - break; - } - case 3: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateAssetRequest.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.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest - */ - CreateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAssetRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.assetId = ""; - object.asset = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; - }; - - return CreateAssetRequest; - })(); - - v1.UpdateAssetRequest = (function() { - - /** - * Properties of an UpdateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateAssetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset - * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly - */ - - /** - * Constructs a new UpdateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateAssetRequest. - * @implements IUpdateAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set - */ - function UpdateAssetRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateAssetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.updateMask = null; - - /** - * UpdateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.asset = null; - - /** - * UpdateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance - */ - UpdateAssetRequest.create = function create(properties) { - return new UpdateAssetRequest(properties); - }; - - /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAssetRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAssetRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - */ - UpdateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateAssetRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.asset = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; - }; - - return UpdateAssetRequest; - })(); - - v1.DeleteAssetRequest = (function() { - - /** - * Properties of a DeleteAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteAssetRequest - * @property {string|null} [name] DeleteAssetRequest name - */ - - /** - * Constructs a new DeleteAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteAssetRequest. - * @implements IDeleteAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - */ - function DeleteAssetRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteAssetRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @instance - */ - DeleteAssetRequest.prototype.name = ""; - - /** - * Creates a new DeleteAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance - */ - DeleteAssetRequest.create = function create(properties) { - return new DeleteAssetRequest(properties); - }; - - /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAssetRequest.encode = function encode(message, writer) { - 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 DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); - 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 DeleteAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAssetRequest.verify = function verify(message) { - if (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 DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - */ - DeleteAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAssetRequest.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 DeleteAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; - }; - - return DeleteAssetRequest; - })(); - - v1.ListAssetsRequest = (function() { - - /** - * Properties of a ListAssetsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {number|null} [pageSize] ListAssetsRequest pageSize - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy - */ - - /** - * Constructs a new ListAssetsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - */ - function ListAssetsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.parent = ""; - - /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageSize = 0; - - /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageToken = ""; - - /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.filter = ""; - - /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListAssetsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance - */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); - }; - - /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListAssetsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAssetsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAssetsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; - }; - - return ListAssetsRequest; - })(); - - v1.ListAssetsResponse = (function() { - - /** - * Properties of a ListAssetsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [assets] ListAssetsResponse assets - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken - */ - - /** - * Constructs a new ListAssetsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - */ - function ListAssetsResponse(properties) { - this.assets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAssetsResponse assets. - * @member {Array.} assets - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.assets = $util.emptyArray; - - /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListAssetsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance - */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); - }; - - /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); - if (error) - return "assets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.assets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListAssetsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAssetsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; - }; - - return ListAssetsResponse; - })(); - - v1.ListAssetActionsRequest = (function() { - - /** - * Properties of a ListAssetActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListAssetActionsRequest - * @property {string|null} [parent] ListAssetActionsRequest parent - * @property {number|null} [pageSize] ListAssetActionsRequest pageSize - * @property {string|null} [pageToken] ListAssetActionsRequest pageToken - */ - - /** - * Constructs a new ListAssetActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetActionsRequest. - * @implements IListAssetActionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set - */ - function ListAssetActionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAssetActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - */ - ListAssetActionsRequest.prototype.parent = ""; - - /** - * ListAssetActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - */ - ListAssetActionsRequest.prototype.pageSize = 0; - - /** - * ListAssetActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - */ - ListAssetActionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAssetActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance - */ - ListAssetActionsRequest.create = function create(properties) { - return new ListAssetActionsRequest(properties); - }; - - /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetActionsRequest.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 ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - 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 ListAssetActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetActionsRequest.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 ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - */ - ListAssetActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - 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 ListAssetActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetActionsRequest.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 ListAssetActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAssetActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListAssetActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; - }; - - return ListAssetActionsRequest; - })(); - - v1.GetAssetRequest = (function() { - - /** - * Properties of a GetAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetAssetRequest - * @property {string|null} [name] GetAssetRequest name - */ - - /** - * Constructs a new GetAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetAssetRequest. - * @implements IGetAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set - */ - function GetAssetRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAssetRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @instance - */ - GetAssetRequest.prototype.name = ""; - - /** - * Creates a new GetAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance - */ - GetAssetRequest.create = function create(properties) { - return new GetAssetRequest(properties); - }; - - /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAssetRequest.encode = function encode(message, writer) { - 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 GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); - 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 GetAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAssetRequest.verify = function verify(message) { - if (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 GetAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest - */ - GetAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetAssetRequest.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 GetAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @instance - * @returns {Object.} JSON object - */ - GetAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; - }; - - return GetAssetRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.dataplex.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); - 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.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.CreateTaskRequest = (function() { - - /** - * Properties of a CreateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateTaskRequest - * @property {string|null} [parent] CreateTaskRequest parent - * @property {string|null} [taskId] CreateTaskRequest taskId - * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task - * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly - */ - - /** - * Constructs a new CreateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateTaskRequest. - * @implements ICreateTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - */ - function CreateTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTaskRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.parent = ""; - - /** - * CreateTaskRequest taskId. - * @member {string} taskId - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.taskId = ""; - - /** - * CreateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.task = null; - - /** - * CreateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance - */ - CreateTaskRequest.create = function create(properties) { - return new CreateTaskRequest(properties); - }; - - /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaskRequest.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.taskId = reader.string(); - break; - } - case 3: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTaskRequest.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.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - */ - CreateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.taskId = ""; - object.task = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; - }; - - return CreateTaskRequest; - })(); - - v1.UpdateTaskRequest = (function() { - - /** - * Properties of an UpdateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateTaskRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask - * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task - * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly - */ - - /** - * Constructs a new UpdateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateTaskRequest. - * @implements IUpdateTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set - */ - function UpdateTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTaskRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - */ - UpdateTaskRequest.prototype.updateMask = null; - - /** - * UpdateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - */ - UpdateTaskRequest.prototype.task = null; - - /** - * UpdateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - */ - UpdateTaskRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance - */ - UpdateTaskRequest.create = function create(properties) { - return new UpdateTaskRequest(properties); - }; - - /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - */ - UpdateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.task = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; - }; - - return UpdateTaskRequest; - })(); - - v1.DeleteTaskRequest = (function() { - - /** - * Properties of a DeleteTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteTaskRequest - * @property {string|null} [name] DeleteTaskRequest name - */ - - /** - * Constructs a new DeleteTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteTaskRequest. - * @implements IDeleteTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set - */ - function DeleteTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @instance - */ - DeleteTaskRequest.prototype.name = ""; - - /** - * Creates a new DeleteTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance - */ - DeleteTaskRequest.create = function create(properties) { - return new DeleteTaskRequest(properties); - }; - - /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaskRequest.encode = function encode(message, writer) { - 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 DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); - 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 DeleteTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTaskRequest.verify = function verify(message) { - if (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 DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest - */ - DeleteTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTaskRequest.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 DeleteTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; - }; - - return DeleteTaskRequest; - })(); - - v1.ListTasksRequest = (function() { - - /** - * Properties of a ListTasksRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListTasksRequest - * @property {string|null} [parent] ListTasksRequest parent - * @property {number|null} [pageSize] ListTasksRequest pageSize - * @property {string|null} [pageToken] ListTasksRequest pageToken - * @property {string|null} [filter] ListTasksRequest filter - * @property {string|null} [orderBy] ListTasksRequest orderBy - */ - - /** - * Constructs a new ListTasksRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksRequest. - * @implements IListTasksRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set - */ - function ListTasksRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTasksRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.parent = ""; - - /** - * ListTasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.pageSize = 0; - - /** - * ListTasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.pageToken = ""; - - /** - * ListTasksRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.filter = ""; - - /** - * ListTasksRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.orderBy = ""; - - /** - * Creates a new ListTasksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance - */ - ListTasksRequest.create = function create(properties) { - return new ListTasksRequest(properties); - }; - - /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTasksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTasksRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTasksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - */ - ListTasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTasksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListTasksRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - * @returns {Object.} JSON object - */ - ListTasksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTasksRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; - }; - - return ListTasksRequest; - })(); - - v1.ListTasksResponse = (function() { - - /** - * Properties of a ListTasksResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListTasksResponse - * @property {Array.|null} [tasks] ListTasksResponse tasks - * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations - */ - - /** - * Constructs a new ListTasksResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksResponse. - * @implements IListTasksResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - */ - function ListTasksResponse(properties) { - this.tasks = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTasksResponse tasks. - * @member {Array.} tasks - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.tasks = $util.emptyArray; - - /** - * ListTasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.nextPageToken = ""; - - /** - * ListTasksResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListTasksResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance - */ - ListTasksResponse.create = function create(properties) { - return new ListTasksResponse(properties); - }; - - /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tasks != null && message.tasks.length) - for (var i = 0; i < message.tasks.length; ++i) - $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTasksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tasks && message.tasks.length)) - message.tasks = []; - message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTasksResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTasksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!Array.isArray(message.tasks)) - return "tasks: array expected"; - for (var i = 0; i < message.tasks.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); - if (error) - return "tasks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - */ - ListTasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - if (object.tasks) { - if (!Array.isArray(object.tasks)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); - message.tasks = []; - for (var i = 0; i < object.tasks.length; ++i) { - if (typeof object.tasks[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); - message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTasksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tasks = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.tasks && message.tasks.length) { - object.tasks = []; - for (var j = 0; j < message.tasks.length; ++j) - object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListTasksResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - * @returns {Object.} JSON object - */ - ListTasksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTasksResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; - }; - - return ListTasksResponse; - })(); - - v1.GetTaskRequest = (function() { - - /** - * Properties of a GetTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetTaskRequest - * @property {string|null} [name] GetTaskRequest name - */ - - /** - * Constructs a new GetTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetTaskRequest. - * @implements IGetTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set - */ - function GetTaskRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @instance - */ - GetTaskRequest.prototype.name = ""; - - /** - * Creates a new GetTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance - */ - GetTaskRequest.create = function create(properties) { - return new GetTaskRequest(properties); - }; - - /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaskRequest.encode = function encode(message, writer) { - 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 GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); - 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 GetTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTaskRequest.verify = function verify(message) { - if (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 GetTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest - */ - GetTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTaskRequest.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 GetTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @instance - * @returns {Object.} JSON object - */ - GetTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; - }; - - return GetTaskRequest; - })(); - - v1.GetJobRequest = (function() { - - /** - * Properties of a GetJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetJobRequest - * @property {string|null} [name] GetJobRequest name - */ - - /** - * Constructs a new GetJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetJobRequest. - * @implements IGetJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set - */ - function GetJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @instance - */ - GetJobRequest.prototype.name = ""; - - /** - * Creates a new GetJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance - */ - GetJobRequest.create = function create(properties) { - return new GetJobRequest(properties); - }; - - /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobRequest.encode = function encode(message, writer) { - 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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - 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 GetJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetJobRequest.verify = function verify(message) { - if (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 GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest - */ - GetJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetJobRequest.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 GetJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @instance - * @returns {Object.} JSON object - */ - GetJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; - }; - - return GetJobRequest; - })(); - - v1.RunTaskRequest = (function() { - - /** - * Properties of a RunTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IRunTaskRequest - * @property {string|null} [name] RunTaskRequest name - * @property {Object.|null} [labels] RunTaskRequest labels - * @property {Object.|null} [args] RunTaskRequest args - */ - - /** - * Constructs a new RunTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunTaskRequest. - * @implements IRunTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set - */ - function RunTaskRequest(properties) { - this.labels = {}; - this.args = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @instance - */ - RunTaskRequest.prototype.name = ""; - - /** - * RunTaskRequest labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @instance - */ - RunTaskRequest.prototype.labels = $util.emptyObject; - - /** - * RunTaskRequest args. - * @member {Object.} args - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @instance - */ - RunTaskRequest.prototype.args = $util.emptyObject; - - /** - * Creates a new RunTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest instance - */ - RunTaskRequest.create = function create(properties) { - return new RunTaskRequest(properties); - }; - - /** - * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.args != null && Object.hasOwnProperty.call(message, "args")) - for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - 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 4: { - if (message.args === $util.emptyObject) - message.args = {}; - 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.args[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunTaskRequest.verify = function verify(message) { - if (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.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.args != null && message.hasOwnProperty("args")) { - if (!$util.isObject(message.args)) - return "args: object expected"; - var key = Object.keys(message.args); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.args[key[i]])) - return "args: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest - */ - RunTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.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.args) { - if (typeof object.args !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.args: object expected"); - message.args = {}; - for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) - message.args[keys[i]] = String(object.args[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {google.cloud.dataplex.v1.RunTaskRequest} message RunTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.args = {}; - } - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.args && (keys2 = Object.keys(message.args)).length) { - object.args = {}; - for (var j = 0; j < keys2.length; ++j) - object.args[keys2[j]] = message.args[keys2[j]]; - } - return object; - }; - - /** - * Converts this RunTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @instance - * @returns {Object.} JSON object - */ - RunTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskRequest"; - }; - - return RunTaskRequest; - })(); - - v1.RunTaskResponse = (function() { - - /** - * Properties of a RunTaskResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IRunTaskResponse - * @property {google.cloud.dataplex.v1.IJob|null} [job] RunTaskResponse job - */ - - /** - * Constructs a new RunTaskResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunTaskResponse. - * @implements IRunTaskResponse - * @constructor - * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set - */ - function RunTaskResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunTaskResponse job. - * @member {google.cloud.dataplex.v1.IJob|null|undefined} job - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @instance - */ - RunTaskResponse.prototype.job = null; - - /** - * Creates a new RunTaskResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse instance - */ - RunTaskResponse.create = function create(properties) { - return new RunTaskResponse(properties); - }; - - /** - * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTaskResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.job != null && Object.hasOwnProperty.call(message, "job")) - $root.google.cloud.dataplex.v1.Job.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunTaskResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTaskResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.job = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunTaskResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunTaskResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunTaskResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.job != null && message.hasOwnProperty("job")) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.job); - if (error) - return "job." + error; - } - return null; - }; - - /** - * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse - */ - RunTaskResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunTaskResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); - if (object.job != null) { - if (typeof object.job !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskResponse.job: object expected"); - message.job = $root.google.cloud.dataplex.v1.Job.fromObject(object.job); - } - return message; - }; - - /** - * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {google.cloud.dataplex.v1.RunTaskResponse} message RunTaskResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunTaskResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.job = null; - if (message.job != null && message.hasOwnProperty("job")) - object.job = $root.google.cloud.dataplex.v1.Job.toObject(message.job, options); - return object; - }; - - /** - * Converts this RunTaskResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @instance - * @returns {Object.} JSON object - */ - RunTaskResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunTaskResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskResponse"; - }; - - return RunTaskResponse; - })(); - - v1.ListJobsRequest = (function() { - - /** - * Properties of a ListJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListJobsRequest - * @property {string|null} [parent] ListJobsRequest parent - * @property {number|null} [pageSize] ListJobsRequest pageSize - * @property {string|null} [pageToken] ListJobsRequest pageToken - */ - - /** - * Constructs a new ListJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsRequest. - * @implements IListJobsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set - */ - function ListJobsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.parent = ""; - - /** - * ListJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageSize = 0; - - /** - * ListJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance - */ - ListJobsRequest.create = function create(properties) { - return new ListJobsRequest(properties); - }; - - /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsRequest.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 ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); - 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 ListJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobsRequest.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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest - */ - ListJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); - 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 ListJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobsRequest.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 ListJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListJobsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; - }; - - return ListJobsRequest; - })(); - - v1.ListJobsResponse = (function() { - - /** - * Properties of a ListJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListJobsResponse - * @property {Array.|null} [jobs] ListJobsResponse jobs - * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken - */ - - /** - * Constructs a new ListJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsResponse. - * @implements IListJobsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set - */ - function ListJobsResponse(properties) { - this.jobs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @instance - */ - ListJobsResponse.prototype.jobs = $util.emptyArray; - - /** - * ListJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @instance - */ - ListJobsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance - */ - ListJobsResponse.create = function create(properties) { - return new ListJobsResponse(properties); - }; - - /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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 ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListJobsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse - */ - ListJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @instance - * @returns {Object.} JSON object - */ - ListJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListJobsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; - }; - - return ListJobsResponse; - })(); - - v1.CancelJobRequest = (function() { - - /** - * Properties of a CancelJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICancelJobRequest - * @property {string|null} [name] CancelJobRequest name - */ - - /** - * Constructs a new CancelJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CancelJobRequest. - * @implements ICancelJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set - */ - function CancelJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @instance - */ - CancelJobRequest.prototype.name = ""; - - /** - * Creates a new CancelJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance - */ - CancelJobRequest.create = function create(properties) { - return new CancelJobRequest(properties); - }; - - /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelJobRequest.encode = function encode(message, writer) { - 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 CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); - 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 CancelJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelJobRequest.verify = function verify(message) { - if (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 CancelJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest - */ - CancelJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelJobRequest.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 CancelJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @instance - * @returns {Object.} JSON object - */ - CancelJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CancelJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; - }; - - return CancelJobRequest; - })(); - - v1.CreateEnvironmentRequest = (function() { - - /** - * Properties of a CreateEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly - */ - - /** - * Constructs a new CreateEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set - */ - function CreateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEnvironmentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.parent = ""; - - /** - * CreateEnvironmentRequest environmentId. - * @member {string} environmentId - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.environmentId = ""; - - /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.environment = null; - - /** - * CreateEnvironmentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance - */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.environmentId = reader.string(); - break; - } - case 3: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEnvironmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - if (!$util.isString(message.environmentId)) - return "environmentId: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environmentId != null) - message.environmentId = String(object.environmentId); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.environmentId = ""; - object.environment = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - object.environmentId = message.environmentId; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; - }; - - return CreateEnvironmentRequest; - })(); - - v1.UpdateEnvironmentRequest = (function() { - - /** - * Properties of an UpdateEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEnvironmentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly - */ - - /** - * Constructs a new UpdateEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - */ - function UpdateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.updateMask = null; - - /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.environment = null; - - /** - * UpdateEnvironmentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance - */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEnvironmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.environment = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; - }; - - return UpdateEnvironmentRequest; - })(); - - v1.DeleteEnvironmentRequest = (function() { - - /** - * Properties of a DeleteEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name - */ - - /** - * Constructs a new DeleteEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - */ - function DeleteEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @instance - */ - DeleteEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance - */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); - }; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEnvironmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; - }; - - return DeleteEnvironmentRequest; - })(); - - v1.ListEnvironmentsRequest = (function() { - - /** - * Properties of a ListEnvironmentsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken - * @property {string|null} [filter] ListEnvironmentsRequest filter - * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy - */ - - /** - * Constructs a new ListEnvironmentsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set - */ - function ListEnvironmentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.parent = ""; - - /** - * ListEnvironmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageSize = 0; - - /** - * ListEnvironmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageToken = ""; - - /** - * ListEnvironmentsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.filter = ""; - - /** - * ListEnvironmentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance - */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); - }; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; - }; - - return ListEnvironmentsRequest; - })(); - - v1.ListEnvironmentsResponse = (function() { - - /** - * Properties of a ListEnvironmentsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken - */ - - /** - * Constructs a new ListEnvironmentsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set - */ - function ListEnvironmentsResponse(properties) { - this.environments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - - /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance - */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); - }; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dataplex.v1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.environments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; - }; - - return ListEnvironmentsResponse; - })(); - - v1.GetEnvironmentRequest = (function() { - - /** - * Properties of a GetEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name - */ - - /** - * Constructs a new GetEnvironmentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set - */ - function GetEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @instance - */ - GetEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance - */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); - }; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEnvironmentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEnvironmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest - */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; - }; - - return GetEnvironmentRequest; - })(); - - v1.ListSessionsRequest = (function() { - - /** - * Properties of a ListSessionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsRequest - * @property {string|null} [parent] ListSessionsRequest parent - * @property {number|null} [pageSize] ListSessionsRequest pageSize - * @property {string|null} [pageToken] ListSessionsRequest pageToken - * @property {string|null} [filter] ListSessionsRequest filter - */ - - /** - * Constructs a new ListSessionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsRequest. - * @implements IListSessionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set - */ - function ListSessionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSessionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.parent = ""; - - /** - * ListSessionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.pageSize = 0; - - /** - * ListSessionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.pageToken = ""; - - /** - * ListSessionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.filter = ""; - - /** - * Creates a new ListSessionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance - */ - ListSessionsRequest.create = function create(properties) { - return new ListSessionsRequest(properties); - }; - - /** - * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSessionsRequest.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 ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSessionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSessionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); - 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 ListSessionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSessionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSessionsRequest.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 ListSessionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest - */ - ListSessionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); - 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 ListSessionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSessionsRequest.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 ListSessionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListSessionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSessionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; - }; - - return ListSessionsRequest; - })(); - - v1.ListSessionsResponse = (function() { - - /** - * Properties of a ListSessionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsResponse - * @property {Array.|null} [sessions] ListSessionsResponse sessions - * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken - */ - - /** - * Constructs a new ListSessionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsResponse. - * @implements IListSessionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set - */ - function ListSessionsResponse(properties) { - this.sessions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSessionsResponse sessions. - * @member {Array.} sessions - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @instance - */ - ListSessionsResponse.prototype.sessions = $util.emptyArray; - - /** - * ListSessionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @instance - */ - ListSessionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSessionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance - */ - ListSessionsResponse.create = function create(properties) { - return new ListSessionsResponse(properties); - }; - - /** - * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSessionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sessions != null && message.sessions.length) - for (var i = 0; i < message.sessions.length; ++i) - $root.google.cloud.dataplex.v1.Session.encode(message.sessions[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 ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSessionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSessionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.sessions && message.sessions.length)) - message.sessions = []; - message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSessionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSessionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sessions != null && message.hasOwnProperty("sessions")) { - if (!Array.isArray(message.sessions)) - return "sessions: array expected"; - for (var i = 0; i < message.sessions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); - if (error) - return "sessions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse - */ - ListSessionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); - if (object.sessions) { - if (!Array.isArray(object.sessions)) - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); - message.sessions = []; - for (var i = 0; i < object.sessions.length; ++i) { - if (typeof object.sessions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); - message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSessionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sessions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.sessions && message.sessions.length) { - object.sessions = []; - for (var j = 0; j < message.sessions.length; ++j) - object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSessionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListSessionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSessionsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; - }; - - return ListSessionsResponse; - })(); - - v1.Task = (function() { - - /** - * Properties of a Task. - * @memberof google.cloud.dataplex.v1 - * @interface ITask - * @property {string|null} [name] Task name - * @property {string|null} [uid] Task uid - * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime - * @property {string|null} [description] Task description - * @property {string|null} [displayName] Task displayName - * @property {google.cloud.dataplex.v1.State|null} [state] Task state - * @property {Object.|null} [labels] Task labels - * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus - * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark - * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook - */ - - /** - * Constructs a new Task. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Task. - * @implements ITask - * @constructor - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set - */ - function Task(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]]; - } - - /** - * Task name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.name = ""; - - /** - * Task uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.uid = ""; - - /** - * Task createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.createTime = null; - - /** - * Task updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.updateTime = null; - - /** - * Task description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.description = ""; - - /** - * Task displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.displayName = ""; - - /** - * Task state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.state = 0; - - /** - * Task labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.labels = $util.emptyObject; - - /** - * Task triggerSpec. - * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.triggerSpec = null; - - /** - * Task executionSpec. - * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.executionSpec = null; - - /** - * Task executionStatus. - * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.executionStatus = null; - - /** - * Task spark. - * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.spark = null; - - /** - * Task notebook. - * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Task.prototype.notebook = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Task config. - * @member {"spark"|"notebook"|undefined} config - * @memberof google.cloud.dataplex.v1.Task - * @instance - */ - Object.defineProperty(Task.prototype, "config", { - get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Task instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task} Task instance - */ - Task.create = function create(properties) { - return new Task(properties); - }; - - /** - * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Task.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) - $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) - $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) - $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Task.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Task message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task} Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Task.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 100: { - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); - break; - } - case 201: { - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); - break; - } - case 300: { - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); - break; - } - case 302: { - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Task message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task} Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Task.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Task message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Task.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); - if (error) - return "triggerSpec." + error; - } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); - if (error) - return "executionSpec." + error; - } - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); - if (error) - return "executionStatus." + error; - } - if (message.spark != null && message.hasOwnProperty("spark")) { - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); - if (error) - return "spark." + error; - } - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - if (properties.config === 1) - return "config: multiple values"; - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); - if (error) - return "notebook." + error; - } - } - return null; - }; - - /** - * Creates a Task message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task} Task - */ - Task.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task) - return object; - var message = new $root.google.cloud.dataplex.v1.Task(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.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.dataplex.v1.Task.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.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.triggerSpec != null) { - if (typeof object.triggerSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); - } - if (object.executionStatus != null) { - if (typeof object.executionStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); - } - if (object.spark != null) { - if (typeof object.spark !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); - } - if (object.notebook != null) { - if (typeof object.notebook !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); - } - return message; - }; - - /** - * Creates a plain object from a Task message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {google.cloud.dataplex.v1.Task} message Task - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Task.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.triggerSpec = null; - object.executionSpec = null; - object.executionStatus = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) - object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) - object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); - if (message.spark != null && message.hasOwnProperty("spark")) { - object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); - if (options.oneofs) - object.config = "spark"; - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); - if (options.oneofs) - object.config = "notebook"; - } - return object; - }; - - /** - * Converts this Task to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task - * @instance - * @returns {Object.} JSON object - */ - Task.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Task - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; - }; - - Task.InfrastructureSpec = (function() { - - /** - * Properties of an InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IInfrastructureSpec - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork - */ - - /** - * Constructs a new InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an InfrastructureSpec. - * @implements IInfrastructureSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - */ - function InfrastructureSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InfrastructureSpec batch. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.batch = null; - - /** - * InfrastructureSpec containerImage. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.containerImage = null; - - /** - * InfrastructureSpec vpcNetwork. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.vpcNetwork = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InfrastructureSpec resources. - * @member {"batch"|undefined} resources - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "resources", { - get: $util.oneOfGetter($oneOfFields = ["batch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec runtime. - * @member {"containerImage"|undefined} runtime - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "runtime", { - get: $util.oneOfGetter($oneOfFields = ["containerImage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec network. - * @member {"vpcNetwork"|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "network", { - get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance - */ - InfrastructureSpec.create = function create(properties) { - return new InfrastructureSpec(properties); - }; - - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 52: { - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); - break; - } - case 101: { - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); - break; - } - case 150: { - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InfrastructureSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InfrastructureSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - properties.resources = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); - if (error) - return "batch." + error; - } - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - properties.runtime = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); - if (error) - return "containerImage." + error; - } - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - properties.network = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); - if (error) - return "vpcNetwork." + error; - } - } - return null; - }; - - /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - */ - InfrastructureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - if (object.batch != null) { - if (typeof object.batch !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); - } - if (object.containerImage != null) { - if (typeof object.containerImage !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); - } - if (object.vpcNetwork != null) { - if (typeof object.vpcNetwork !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); - } - return message; - }; - - /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InfrastructureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); - if (options.oneofs) - object.resources = "batch"; - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); - if (options.oneofs) - object.runtime = "containerImage"; - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); - if (options.oneofs) - object.network = "vpcNetwork"; - } - return object; - }; - - /** - * Converts this InfrastructureSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - * @returns {Object.} JSON object - */ - InfrastructureSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InfrastructureSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; - }; - - InfrastructureSpec.BatchComputeResources = (function() { - - /** - * Properties of a BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IBatchComputeResources - * @property {number|null} [executorsCount] BatchComputeResources executorsCount - * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount - */ - - /** - * Constructs a new BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a BatchComputeResources. - * @implements IBatchComputeResources - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - */ - function BatchComputeResources(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchComputeResources executorsCount. - * @member {number} executorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.executorsCount = 0; - - /** - * BatchComputeResources maxExecutorsCount. - * @member {number} maxExecutorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.maxExecutorsCount = 0; - - /** - * Creates a new BatchComputeResources instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance - */ - BatchComputeResources.create = function create(properties) { - return new BatchComputeResources(properties); - }; - - /** - * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); - if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); - return writer; - }; - - /** - * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.executorsCount = reader.int32(); - break; - } - case 2: { - message.maxExecutorsCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchComputeResources message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchComputeResources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - if (!$util.isInteger(message.executorsCount)) - return "executorsCount: integer expected"; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - if (!$util.isInteger(message.maxExecutorsCount)) - return "maxExecutorsCount: integer expected"; - return null; - }; - - /** - * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - */ - BatchComputeResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - if (object.executorsCount != null) - message.executorsCount = object.executorsCount | 0; - if (object.maxExecutorsCount != null) - message.maxExecutorsCount = object.maxExecutorsCount | 0; - return message; - }; - - /** - * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchComputeResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.executorsCount = 0; - object.maxExecutorsCount = 0; - } - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - object.executorsCount = message.executorsCount; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - object.maxExecutorsCount = message.maxExecutorsCount; - return object; - }; - - /** - * Converts this BatchComputeResources to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - * @returns {Object.} JSON object - */ - BatchComputeResources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchComputeResources - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; - }; - - return BatchComputeResources; - })(); - - InfrastructureSpec.ContainerImageRuntime = (function() { - - /** - * Properties of a ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IContainerImageRuntime - * @property {string|null} [image] ContainerImageRuntime image - * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars - * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages - * @property {Object.|null} [properties] ContainerImageRuntime properties - */ - - /** - * Constructs a new ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a ContainerImageRuntime. - * @implements IContainerImageRuntime - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - */ - function ContainerImageRuntime(properties) { - this.javaJars = []; - this.pythonPackages = []; - this.properties = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContainerImageRuntime image. - * @member {string} image - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.image = ""; - - /** - * ContainerImageRuntime javaJars. - * @member {Array.} javaJars - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.javaJars = $util.emptyArray; - - /** - * ContainerImageRuntime pythonPackages. - * @member {Array.} pythonPackages - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; - - /** - * ContainerImageRuntime properties. - * @member {Object.} properties - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.properties = $util.emptyObject; - - /** - * Creates a new ContainerImageRuntime instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance - */ - ContainerImageRuntime.create = function create(properties) { - return new ContainerImageRuntime(properties); - }; - - /** - * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); - if (message.javaJars != null && message.javaJars.length) - for (var i = 0; i < message.javaJars.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); - if (message.pythonPackages != null && message.pythonPackages.length) - for (var i = 0; i < message.pythonPackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); - if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.image = reader.string(); - break; - } - case 2: { - if (!(message.javaJars && message.javaJars.length)) - message.javaJars = []; - message.javaJars.push(reader.string()); - break; - } - case 3: { - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - } - case 4: { - if (message.properties === $util.emptyObject) - message.properties = {}; - 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.properties[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContainerImageRuntime message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContainerImageRuntime.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) - if (!$util.isString(message.image)) - return "image: string expected"; - if (message.javaJars != null && message.hasOwnProperty("javaJars")) { - if (!Array.isArray(message.javaJars)) - return "javaJars: array expected"; - for (var i = 0; i < message.javaJars.length; ++i) - if (!$util.isString(message.javaJars[i])) - return "javaJars: string[] expected"; - } - if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { - if (!Array.isArray(message.pythonPackages)) - return "pythonPackages: array expected"; - for (var i = 0; i < message.pythonPackages.length; ++i) - if (!$util.isString(message.pythonPackages[i])) - return "pythonPackages: string[] expected"; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.properties[key[i]])) - return "properties: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - */ - ContainerImageRuntime.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); - if (object.image != null) - message.image = String(object.image); - if (object.javaJars) { - if (!Array.isArray(object.javaJars)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); - message.javaJars = []; - for (var i = 0; i < object.javaJars.length; ++i) - message.javaJars[i] = String(object.javaJars[i]); - } - if (object.pythonPackages) { - if (!Array.isArray(object.pythonPackages)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); - message.pythonPackages = []; - for (var i = 0; i < object.pythonPackages.length; ++i) - message.pythonPackages[i] = String(object.pythonPackages[i]); - } - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) - message.properties[keys[i]] = String(object.properties[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContainerImageRuntime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.javaJars = []; - object.pythonPackages = []; - } - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - object.image = ""; - if (message.image != null && message.hasOwnProperty("image")) - object.image = message.image; - if (message.javaJars && message.javaJars.length) { - object.javaJars = []; - for (var j = 0; j < message.javaJars.length; ++j) - object.javaJars[j] = message.javaJars[j]; - } - if (message.pythonPackages && message.pythonPackages.length) { - object.pythonPackages = []; - for (var j = 0; j < message.pythonPackages.length; ++j) - object.pythonPackages[j] = message.pythonPackages[j]; - } - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = message.properties[keys2[j]]; - } - return object; - }; - - /** - * Converts this ContainerImageRuntime to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - * @returns {Object.} JSON object - */ - ContainerImageRuntime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContainerImageRuntime - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; - }; - - return ContainerImageRuntime; - })(); - - InfrastructureSpec.VpcNetwork = (function() { - - /** - * Properties of a VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IVpcNetwork - * @property {string|null} [network] VpcNetwork network - * @property {string|null} [subNetwork] VpcNetwork subNetwork - * @property {Array.|null} [networkTags] VpcNetwork networkTags - */ - - /** - * Constructs a new VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a VpcNetwork. - * @implements IVpcNetwork - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set - */ - function VpcNetwork(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpcNetwork network. - * @member {string|null|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.network = null; - - /** - * VpcNetwork subNetwork. - * @member {string|null|undefined} subNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.subNetwork = null; - - /** - * VpcNetwork networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.networkTags = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * VpcNetwork networkName. - * @member {"network"|"subNetwork"|undefined} networkName - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - Object.defineProperty(VpcNetwork.prototype, "networkName", { - get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new VpcNetwork instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance - */ - VpcNetwork.create = function create(properties) { - return new VpcNetwork(properties); - }; - - /** - * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcNetwork.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); - return writer; - }; - - /** - * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcNetwork message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcNetwork.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subNetwork = reader.string(); - break; - } - case 3: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcNetwork.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcNetwork message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcNetwork.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties.networkName = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - if (properties.networkName === 1) - return "networkName: multiple values"; - properties.networkName = 1; - if (!$util.isString(message.subNetwork)) - return "subNetwork: string expected"; - } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - return null; - }; - - /** - * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - */ - VpcNetwork.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); - if (object.network != null) - message.network = String(object.network); - if (object.subNetwork != null) - message.subNetwork = String(object.subNetwork); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - return message; - }; - - /** - * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcNetwork.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object.networkName = "network"; - } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - object.subNetwork = message.subNetwork; - if (options.oneofs) - object.networkName = "subNetwork"; - } - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; - } - return object; - }; - - /** - * Converts this VpcNetwork to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - * @returns {Object.} JSON object - */ - VpcNetwork.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcNetwork - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; - }; - - return VpcNetwork; - })(); - - return InfrastructureSpec; - })(); - - Task.TriggerSpec = (function() { - - /** - * Properties of a TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface ITriggerSpec - * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type - * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime - * @property {boolean|null} [disabled] TriggerSpec disabled - * @property {number|null} [maxRetries] TriggerSpec maxRetries - * @property {string|null} [schedule] TriggerSpec schedule - */ - - /** - * Constructs a new TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a TriggerSpec. - * @implements ITriggerSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set - */ - function TriggerSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggerSpec type. - * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.type = 0; - - /** - * TriggerSpec startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.startTime = null; - - /** - * TriggerSpec disabled. - * @member {boolean} disabled - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.disabled = false; - - /** - * TriggerSpec maxRetries. - * @member {number} maxRetries - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.maxRetries = 0; - - /** - * TriggerSpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TriggerSpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - Object.defineProperty(TriggerSpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TriggerSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance - */ - TriggerSpec.create = function create(properties) { - return new TriggerSpec(properties); - }; - - /** - * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); - return writer; - }; - - /** - * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggerSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.disabled = reader.bool(); - break; - } - case 7: { - message.maxRetries = reader.int32(); - break; - } - case 100: { - message.schedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggerSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggerSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - 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.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - if (!$util.isInteger(message.maxRetries)) - return "maxRetries: integer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; - } - return null; - }; - - /** - * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - */ - TriggerSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ON_DEMAND": - case 1: - message.type = 1; - break; - case "RECURRING": - case 2: - message.type = 2; - break; - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.maxRetries != null) - message.maxRetries = object.maxRetries | 0; - if (object.schedule != null) - message.schedule = String(object.schedule); - return message; - }; - - /** - * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggerSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disabled = false; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.startTime = null; - object.maxRetries = 0; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - object.maxRetries = message.maxRetries; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; - } - return object; - }; - - /** - * Converts this TriggerSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - * @returns {Object.} JSON object - */ - TriggerSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggerSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ON_DEMAND=1 ON_DEMAND value - * @property {number} RECURRING=2 RECURRING value - */ - TriggerSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ON_DEMAND"] = 1; - values[valuesById[2] = "RECURRING"] = 2; - return values; - })(); - - return TriggerSpec; - })(); - - Task.ExecutionSpec = (function() { - - /** - * Properties of an ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionSpec - * @property {Object.|null} [args] ExecutionSpec args - * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount - * @property {string|null} [project] ExecutionSpec project - * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime - * @property {string|null} [kmsKey] ExecutionSpec kmsKey - */ - - /** - * Constructs a new ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionSpec. - * @implements IExecutionSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set - */ - function ExecutionSpec(properties) { - this.args = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecutionSpec args. - * @member {Object.} args - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.args = $util.emptyObject; - - /** - * ExecutionSpec serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.serviceAccount = ""; - - /** - * ExecutionSpec project. - * @member {string} project - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.project = ""; - - /** - * ExecutionSpec maxJobExecutionLifetime. - * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.maxJobExecutionLifetime = null; - - /** - * ExecutionSpec kmsKey. - * @member {string} kmsKey - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.kmsKey = ""; - - /** - * Creates a new ExecutionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance - */ - ExecutionSpec.create = function create(properties) { - return new ExecutionSpec(properties); - }; - - /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.args != null && Object.hasOwnProperty.call(message, "args")) - for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); - if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) - $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); - return writer; - }; - - /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - if (message.args === $util.emptyObject) - message.args = {}; - 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.args[key] = value; - break; - } - case 5: { - message.serviceAccount = reader.string(); - break; - } - case 7: { - message.project = reader.string(); - break; - } - case 8: { - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 9: { - message.kmsKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecutionSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!$util.isObject(message.args)) - return "args: object expected"; - var key = Object.keys(message.args); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.args[key[i]])) - return "args: string{k:string} expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { - var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); - if (error) - return "maxJobExecutionLifetime." + error; - } - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - if (!$util.isString(message.kmsKey)) - return "kmsKey: string expected"; - return null; - }; - - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - */ - ExecutionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); - if (object.args) { - if (typeof object.args !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); - message.args = {}; - for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) - message.args[keys[i]] = String(object.args[keys[i]]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.project != null) - message.project = String(object.project); - if (object.maxJobExecutionLifetime != null) { - if (typeof object.maxJobExecutionLifetime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); - } - if (object.kmsKey != null) - message.kmsKey = String(object.kmsKey); - return message; - }; - - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.args = {}; - if (options.defaults) { - object.serviceAccount = ""; - object.project = ""; - object.maxJobExecutionLifetime = null; - object.kmsKey = ""; - } - var keys2; - if (message.args && (keys2 = Object.keys(message.args)).length) { - object.args = {}; - for (var j = 0; j < keys2.length; ++j) - object.args[keys2[j]] = message.args[keys2[j]]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) - object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - object.kmsKey = message.kmsKey; - return object; - }; - - /** - * Converts this ExecutionSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - * @returns {Object.} JSON object - */ - ExecutionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; - }; - - return ExecutionSpec; - })(); - - Task.SparkTaskConfig = (function() { - - /** - * Properties of a SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface ISparkTaskConfig - * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri - * @property {string|null} [mainClass] SparkTaskConfig mainClass - * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile - * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile - * @property {string|null} [sqlScript] SparkTaskConfig sqlScript - * @property {Array.|null} [fileUris] SparkTaskConfig fileUris - * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec - */ - - /** - * Constructs a new SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a SparkTaskConfig. - * @implements ISparkTaskConfig - * @constructor - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set - */ - function SparkTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SparkTaskConfig mainJarFileUri. - * @member {string|null|undefined} mainJarFileUri - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainJarFileUri = null; - - /** - * SparkTaskConfig mainClass. - * @member {string|null|undefined} mainClass - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainClass = null; - - /** - * SparkTaskConfig pythonScriptFile. - * @member {string|null|undefined} pythonScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.pythonScriptFile = null; - - /** - * SparkTaskConfig sqlScriptFile. - * @member {string|null|undefined} sqlScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScriptFile = null; - - /** - * SparkTaskConfig sqlScript. - * @member {string|null|undefined} sqlScript - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScript = null; - - /** - * SparkTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.fileUris = $util.emptyArray; - - /** - * SparkTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.archiveUris = $util.emptyArray; - - /** - * SparkTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.infrastructureSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SparkTaskConfig driver. - * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - Object.defineProperty(SparkTaskConfig.prototype, "driver", { - get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SparkTaskConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance - */ - SparkTaskConfig.create = function create(properties) { - return new SparkTaskConfig(properties); - }; - - /** - * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkTaskConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); - if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); - if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); - if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); - if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); - return writer; - }; - - /** - * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkTaskConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.mainJarFileUri = reader.string(); - break; - } - case 101: { - message.mainClass = reader.string(); - break; - } - case 102: { - message.pythonScriptFile = reader.string(); - break; - } - case 104: { - message.sqlScriptFile = reader.string(); - break; - } - case 105: { - message.sqlScript = reader.string(); - break; - } - case 3: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 4: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - } - case 6: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SparkTaskConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkTaskConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - properties.driver = 1; - if (!$util.isString(message.mainJarFileUri)) - return "mainJarFileUri: string expected"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.mainClass)) - return "mainClass: string expected"; - } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.pythonScriptFile)) - return "pythonScriptFile: string expected"; - } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScriptFile)) - return "sqlScriptFile: string expected"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScript)) - return "sqlScript: string expected"; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - return null; - }; - - /** - * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - */ - SparkTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); - if (object.mainJarFileUri != null) - message.mainJarFileUri = String(object.mainJarFileUri); - if (object.mainClass != null) - message.mainClass = String(object.mainClass); - if (object.pythonScriptFile != null) - message.pythonScriptFile = String(object.pythonScriptFile); - if (object.sqlScriptFile != null) - message.sqlScriptFile = String(object.sqlScriptFile); - if (object.sqlScript != null) - message.sqlScript = String(object.sqlScript); - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - return message; - }; - - /** - * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SparkTaskConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) - object.infrastructureSpec = null; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - object.mainJarFileUri = message.mainJarFileUri; - if (options.oneofs) - object.driver = "mainJarFileUri"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - object.mainClass = message.mainClass; - if (options.oneofs) - object.driver = "mainClass"; - } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - object.pythonScriptFile = message.pythonScriptFile; - if (options.oneofs) - object.driver = "pythonScriptFile"; - } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - object.sqlScriptFile = message.sqlScriptFile; - if (options.oneofs) - object.driver = "sqlScriptFile"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - object.sqlScript = message.sqlScript; - if (options.oneofs) - object.driver = "sqlScript"; - } - return object; - }; - - /** - * Converts this SparkTaskConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - * @returns {Object.} JSON object - */ - SparkTaskConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SparkTaskConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; - }; - - return SparkTaskConfig; - })(); - - Task.NotebookTaskConfig = (function() { - - /** - * Properties of a NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface INotebookTaskConfig - * @property {string|null} [notebook] NotebookTaskConfig notebook - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec - * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris - * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris - */ - - /** - * Constructs a new NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a NotebookTaskConfig. - * @implements INotebookTaskConfig - * @constructor - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set - */ - function NotebookTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NotebookTaskConfig notebook. - * @member {string} notebook - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.notebook = ""; - - /** - * NotebookTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.infrastructureSpec = null; - - /** - * NotebookTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.fileUris = $util.emptyArray; - - /** - * NotebookTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; - - /** - * Creates a new NotebookTaskConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance - */ - NotebookTaskConfig.create = function create(properties) { - return new NotebookTaskConfig(properties); - }; - - /** - * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotebookTaskConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); - return writer; - }; - - /** - * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotebookTaskConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.notebook = reader.string(); - break; - } - case 3: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 6: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotebookTaskConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotebookTaskConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.notebook != null && message.hasOwnProperty("notebook")) - if (!$util.isString(message.notebook)) - return "notebook: string expected"; - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } - return null; - }; - - /** - * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - */ - NotebookTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); - if (object.notebook != null) - message.notebook = String(object.notebook); - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } - return message; - }; - - /** - * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotebookTaskConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) { - object.infrastructureSpec = null; - object.notebook = ""; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.notebook != null && message.hasOwnProperty("notebook")) - object.notebook = message.notebook; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } - return object; - }; - - /** - * Converts this NotebookTaskConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - * @returns {Object.} JSON object - */ - NotebookTaskConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NotebookTaskConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; - }; - - return NotebookTaskConfig; - })(); - - Task.ExecutionStatus = (function() { - - /** - * Properties of an ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionStatus - * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime - * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob - */ - - /** - * Constructs a new ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionStatus. - * @implements IExecutionStatus - * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set - */ - function ExecutionStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecutionStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.updateTime = null; - - /** - * ExecutionStatus latestJob. - * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.latestJob = null; - - /** - * Creates a new ExecutionStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance - */ - ExecutionStatus.create = function create(properties) { - return new ExecutionStatus(properties); - }; - - /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.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 3, wireType 2 =*/26).fork()).ldelim(); - if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) - $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecutionStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionStatus.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.latestJob != null && message.hasOwnProperty("latestJob")) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); - if (error) - return "latestJob." + error; - } - return null; - }; - - /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - */ - ExecutionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.latestJob != null) { - if (typeof object.latestJob !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); - message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); - } - return message; - }; - - /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateTime = null; - object.latestJob = null; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.latestJob != null && message.hasOwnProperty("latestJob")) - object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); - return object; - }; - - /** - * Converts this ExecutionStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - * @returns {Object.} JSON object - */ - ExecutionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; - }; - - return ExecutionStatus; - })(); - - return Task; - })(); - - v1.Job = (function() { - - /** - * Properties of a Job. - * @memberof google.cloud.dataplex.v1 - * @interface IJob - * @property {string|null} [name] Job name - * @property {string|null} [uid] Job uid - * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime - * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state - * @property {number|null} [retryCount] Job retryCount - * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service - * @property {string|null} [serviceJob] Job serviceJob - * @property {string|null} [message] Job message - * @property {Object.|null} [labels] Job labels - * @property {google.cloud.dataplex.v1.Job.Trigger|null} [trigger] Job trigger - * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Job executionSpec - */ - - /** - * Constructs a new Job. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Job. - * @implements IJob - * @constructor - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set - */ - function Job(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]]; - } - - /** - * Job name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.name = ""; - - /** - * Job uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.uid = ""; - - /** - * Job startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.startTime = null; - - /** - * Job endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.endTime = null; - - /** - * Job state. - * @member {google.cloud.dataplex.v1.Job.State} state - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.state = 0; - - /** - * Job retryCount. - * @member {number} retryCount - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.retryCount = 0; - - /** - * Job service. - * @member {google.cloud.dataplex.v1.Job.Service} service - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.service = 0; - - /** - * Job serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.serviceJob = ""; - - /** - * Job message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.message = ""; - - /** - * Job labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.labels = $util.emptyObject; - - /** - * Job trigger. - * @member {google.cloud.dataplex.v1.Job.Trigger} trigger - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.trigger = 0; - - /** - * Job executionSpec. - * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.executionSpec = null; - - /** - * Creates a new Job instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Job} Job instance - */ - Job.create = function create(properties) { - return new Job(properties); - }; - - /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Job.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.trigger); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Job.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Job message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Job} Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Job.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retryCount = reader.uint32(); - break; - } - case 7: { - message.service = reader.int32(); - break; - } - case 8: { - message.serviceJob = reader.string(); - break; - } - case 9: { - message.message = reader.string(); - break; - } - case 10: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 11: { - message.trigger = reader.int32(); - break; - } - case 100: { - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Job message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Job} Job - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Job.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Job message. - * @function verify - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Job.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - if (!$util.isInteger(message.retryCount)) - return "retryCount: integer expected"; - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; - } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); - if (error) - return "executionSpec." + error; - } - return null; - }; - - /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Job} Job - */ - Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Job) - return object; - var message = new $root.google.cloud.dataplex.v1.Job(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "CANCELLING": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "ABORTED": - case 6: - message.state = 6; - break; - } - if (object.retryCount != null) - message.retryCount = object.retryCount >>> 0; - 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 "DATAPROC": - case 1: - message.service = 1; - break; - } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); - if (object.message != null) - message.message = String(object.message); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.trigger) { - default: - if (typeof object.trigger === "number") { - message.trigger = object.trigger; - break; - } - break; - case "TRIGGER_UNSPECIFIED": - case 0: - message.trigger = 0; - break; - case "TASK_CONFIG": - case 1: - message.trigger = 1; - break; - case "RUN_REQUEST": - case 2: - message.trigger = 2; - break; - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); - } - return message; - }; - - /** - * Creates a plain object from a Job message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {google.cloud.dataplex.v1.Job} message Job - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Job.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retryCount = 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; - object.message = ""; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.executionSpec = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - object.retryCount = message.retryCount; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - 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.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] : message.trigger; - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); - return object; - }; - - /** - * Converts this Job to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Job - * @instance - * @returns {Object.} JSON object - */ - Job.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Job - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Job - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; - }; - - /** - * Service enum. - * @name google.cloud.dataplex.v1.Job.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value - */ - Job.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.Job.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} CANCELLING=2 CANCELLING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} ABORTED=6 ABORTED value - */ - Job.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "CANCELLING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - return values; - })(); - - /** - * Trigger enum. - * @name google.cloud.dataplex.v1.Job.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} TASK_CONFIG=1 TASK_CONFIG value - * @property {number} RUN_REQUEST=2 RUN_REQUEST value - */ - Job.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TASK_CONFIG"] = 1; - values[valuesById[2] = "RUN_REQUEST"] = 2; - return values; - })(); - - return Job; - })(); - - v1.ContentService = (function() { - - /** - * Constructs a new ContentService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ContentService - * @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 ContentService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; - - /** - * Creates new ContentService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.ContentService - * @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 {ContentService} RPC service. Useful where requests and/or responses are streamed. - */ - ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef CreateContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content - */ - - /** - * Calls CreateContent. - * @function createContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.CreateContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.prototype.createContent = function createContent(request, callback) { - return this.rpcCall(createContent, $root.google.cloud.dataplex.v1.CreateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "CreateContent" }); - - /** - * Calls CreateContent. - * @function createContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef UpdateContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content - */ - - /** - * Calls UpdateContent. - * @function updateContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.UpdateContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.prototype.updateContent = function updateContent(request, callback) { - return this.rpcCall(updateContent, $root.google.cloud.dataplex.v1.UpdateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "UpdateContent" }); - - /** - * Calls UpdateContent. - * @function updateContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef DeleteContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteContent. - * @function deleteContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.DeleteContentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.prototype.deleteContent = function deleteContent(request, callback) { - return this.rpcCall(deleteContent, $root.google.cloud.dataplex.v1.DeleteContentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteContent" }); - - /** - * Calls DeleteContent. - * @function deleteContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef GetContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content - */ - - /** - * Calls GetContent. - * @function getContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { - return this.rpcCall(getContent, $root.google.cloud.dataplex.v1.GetContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "GetContent" }); - - /** - * Calls GetContent. - * @function getContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. - * @memberof google.cloud.dataplex.v1.ContentService - * @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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. - * @memberof google.cloud.dataplex.v1.ContentService - * @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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. - * @memberof google.cloud.dataplex.v1.ContentService - * @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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.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.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef ListContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListContentResponse} [response] ListContentResponse - */ - - /** - * Calls ListContent. - * @function listContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { - return this.rpcCall(listContent, $root.google.cloud.dataplex.v1.ListContentRequest, $root.google.cloud.dataplex.v1.ListContentResponse, request, callback); - }, "name", { value: "ListContent" }); - - /** - * Calls ListContent. - * @function listContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ContentService; - })(); - - v1.CreateContentRequest = (function() { - - /** - * Properties of a CreateContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateContentRequest - * @property {string|null} [parent] CreateContentRequest parent - * @property {google.cloud.dataplex.v1.IContent|null} [content] CreateContentRequest content - * @property {boolean|null} [validateOnly] CreateContentRequest validateOnly - */ - - /** - * Constructs a new CreateContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateContentRequest. - * @implements ICreateContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set - */ - function CreateContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateContentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @instance - */ - CreateContentRequest.prototype.parent = ""; - - /** - * CreateContentRequest content. - * @member {google.cloud.dataplex.v1.IContent|null|undefined} content - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @instance - */ - CreateContentRequest.prototype.content = null; - - /** - * CreateContentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @instance - */ - CreateContentRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest instance - */ - CreateContentRequest.create = function create(properties) { - return new CreateContentRequest(properties); - }; - - /** - * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateContentRequest.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.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateContentRequest.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.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); - if (error) - return "content." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest - */ - CreateContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateContentRequest.content: object expected"); - message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {google.cloud.dataplex.v1.CreateContentRequest} message CreateContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateContentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.content = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateContentRequest"; - }; - - return CreateContentRequest; - })(); - - v1.UpdateContentRequest = (function() { - - /** - * Properties of an UpdateContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateContentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContentRequest updateMask - * @property {google.cloud.dataplex.v1.IContent|null} [content] UpdateContentRequest content - * @property {boolean|null} [validateOnly] UpdateContentRequest validateOnly - */ - - /** - * Constructs a new UpdateContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateContentRequest. - * @implements IUpdateContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set - */ - function UpdateContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateContentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @instance - */ - UpdateContentRequest.prototype.updateMask = null; - - /** - * UpdateContentRequest content. - * @member {google.cloud.dataplex.v1.IContent|null|undefined} content - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @instance - */ - UpdateContentRequest.prototype.content = null; - - /** - * UpdateContentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @instance - */ - UpdateContentRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest instance - */ - UpdateContentRequest.create = function create(properties) { - return new UpdateContentRequest(properties); - }; - - /** - * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateContentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateContentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); - if (error) - return "content." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest - */ - UpdateContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.content: object expected"); - message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateContentRequest} message UpdateContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateContentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.content = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateContentRequest"; - }; - - return UpdateContentRequest; - })(); - - v1.DeleteContentRequest = (function() { - - /** - * Properties of a DeleteContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteContentRequest - * @property {string|null} [name] DeleteContentRequest name - */ - - /** - * Constructs a new DeleteContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteContentRequest. - * @implements IDeleteContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set - */ - function DeleteContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteContentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @instance - */ - DeleteContentRequest.prototype.name = ""; - - /** - * Creates a new DeleteContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest instance - */ - DeleteContentRequest.create = function create(properties) { - return new DeleteContentRequest(properties); - }; - - /** - * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContentRequest.encode = function encode(message, writer) { - 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 DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); - 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 DeleteContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteContentRequest.verify = function verify(message) { - if (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 DeleteContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - */ - DeleteContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteContentRequest} message DeleteContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteContentRequest.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 DeleteContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteContentRequest"; - }; - - return DeleteContentRequest; - })(); - - v1.ListContentRequest = (function() { - - /** - * Properties of a ListContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListContentRequest - * @property {string|null} [parent] ListContentRequest parent - * @property {number|null} [pageSize] ListContentRequest pageSize - * @property {string|null} [pageToken] ListContentRequest pageToken - * @property {string|null} [filter] ListContentRequest filter - */ - - /** - * Constructs a new ListContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListContentRequest. - * @implements IListContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set - */ - function ListContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListContentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.parent = ""; - - /** - * ListContentRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.pageSize = 0; - - /** - * ListContentRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.pageToken = ""; - - /** - * ListContentRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.filter = ""; - - /** - * Creates a new ListContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest instance - */ - ListContentRequest.create = function create(properties) { - return new ListContentRequest(properties); - }; - - /** - * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentRequest.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 ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentRequest(); - 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 ListContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContentRequest.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 ListContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - */ - ListContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListContentRequest(); - 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 ListContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.ListContentRequest} message ListContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContentRequest.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 ListContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - * @returns {Object.} JSON object - */ - ListContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentRequest"; - }; - - return ListContentRequest; - })(); - - v1.ListContentResponse = (function() { - - /** - * Properties of a ListContentResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListContentResponse - * @property {Array.|null} [content] ListContentResponse content - * @property {string|null} [nextPageToken] ListContentResponse nextPageToken - */ - - /** - * Constructs a new ListContentResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListContentResponse. - * @implements IListContentResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set - */ - function ListContentResponse(properties) { - this.content = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListContentResponse content. - * @member {Array.} content - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - */ - ListContentResponse.prototype.content = $util.emptyArray; - - /** - * ListContentResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - */ - ListContentResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListContentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse instance - */ - ListContentResponse.create = function create(properties) { - return new ListContentResponse(properties); - }; - - /** - * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && message.content.length) - for (var i = 0; i < message.content.length; ++i) - $root.google.cloud.dataplex.v1.Content.encode(message.content[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 ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListContentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.content && message.content.length)) - message.content = []; - message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListContentResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) { - if (!Array.isArray(message.content)) - return "content: array expected"; - for (var i = 0; i < message.content.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content[i]); - if (error) - return "content." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - */ - ListContentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListContentResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListContentResponse(); - if (object.content) { - if (!Array.isArray(object.content)) - throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: array expected"); - message.content = []; - for (var i = 0; i < object.content.length; ++i) { - if (typeof object.content[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: object expected"); - message.content[i] = $root.google.cloud.dataplex.v1.Content.fromObject(object.content[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.ListContentResponse} message ListContentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.content = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.content && message.content.length) { - object.content = []; - for (var j = 0; j < message.content.length; ++j) - object.content[j] = $root.google.cloud.dataplex.v1.Content.toObject(message.content[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListContentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - * @returns {Object.} JSON object - */ - ListContentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListContentResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentResponse"; - }; - - return ListContentResponse; - })(); - - v1.GetContentRequest = (function() { - - /** - * Properties of a GetContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetContentRequest - * @property {string|null} [name] GetContentRequest name - * @property {google.cloud.dataplex.v1.GetContentRequest.ContentView|null} [view] GetContentRequest view - */ - - /** - * Constructs a new GetContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetContentRequest. - * @implements IGetContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set - */ - function GetContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetContentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @instance - */ - GetContentRequest.prototype.name = ""; - - /** - * GetContentRequest view. - * @member {google.cloud.dataplex.v1.GetContentRequest.ContentView} view - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @instance - */ - GetContentRequest.prototype.view = 0; - - /** - * Creates a new GetContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest instance - */ - GetContentRequest.create = function create(properties) { - return new GetContentRequest(properties); - }; - - /** - * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetContentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetContentRequest.verify = function verify(message) { - if (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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest - */ - GetContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetContentRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "CONTENT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {google.cloud.dataplex.v1.GetContentRequest} message GetContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetContentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "CONTENT_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @instance - * @returns {Object.} JSON object - */ - GetContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetContentRequest"; - }; - - /** - * ContentView enum. - * @name google.cloud.dataplex.v1.GetContentRequest.ContentView - * @enum {number} - * @property {number} CONTENT_VIEW_UNSPECIFIED=0 CONTENT_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - GetContentRequest.ContentView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTENT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - return GetContentRequest; - })(); - - v1.DataDiscoverySpec = (function() { - - /** - * Properties of a DataDiscoverySpec. - * @memberof google.cloud.dataplex.v1 - * @interface IDataDiscoverySpec - * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null} [bigqueryPublishingConfig] DataDiscoverySpec bigqueryPublishingConfig - * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null} [storageConfig] DataDiscoverySpec storageConfig - */ - - /** - * Constructs a new DataDiscoverySpec. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataDiscoverySpec. - * @implements IDataDiscoverySpec - * @constructor - * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set - */ - function DataDiscoverySpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataDiscoverySpec bigqueryPublishingConfig. - * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null|undefined} bigqueryPublishingConfig - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @instance - */ - DataDiscoverySpec.prototype.bigqueryPublishingConfig = null; - - /** - * DataDiscoverySpec storageConfig. - * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null|undefined} storageConfig - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @instance - */ - DataDiscoverySpec.prototype.storageConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataDiscoverySpec resourceConfig. - * @member {"storageConfig"|undefined} resourceConfig - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @instance - */ - Object.defineProperty(DataDiscoverySpec.prototype, "resourceConfig", { - get: $util.oneOfGetter($oneOfFields = ["storageConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataDiscoverySpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec instance - */ - DataDiscoverySpec.create = function create(properties) { - return new DataDiscoverySpec(properties); - }; - - /** - * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataDiscoverySpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryPublishingConfig != null && Object.hasOwnProperty.call(message, "bigqueryPublishingConfig")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.encode(message.bigqueryPublishingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataDiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataDiscoverySpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataDiscoverySpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.decode(reader, reader.uint32()); - break; - } - case 100: { - message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataDiscoverySpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataDiscoverySpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataDiscoverySpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify(message.bigqueryPublishingConfig); - if (error) - return "bigqueryPublishingConfig." + error; - } - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { - properties.resourceConfig = 1; - { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify(message.storageConfig); - if (error) - return "storageConfig." + error; - } - } - return null; - }; - - /** - * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec - */ - DataDiscoverySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); - if (object.bigqueryPublishingConfig != null) { - if (typeof object.bigqueryPublishingConfig !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.bigqueryPublishingConfig: object expected"); - message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.fromObject(object.bigqueryPublishingConfig); - } - if (object.storageConfig != null) { - if (typeof object.storageConfig !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.storageConfig: object expected"); - message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.fromObject(object.storageConfig); - } - return message; - }; - - /** - * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec} message DataDiscoverySpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataDiscoverySpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryPublishingConfig = null; - if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) - object.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.toObject(message.bigqueryPublishingConfig, options); - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { - object.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.toObject(message.storageConfig, options); - if (options.oneofs) - object.resourceConfig = "storageConfig"; - } - return object; - }; - - /** - * Converts this DataDiscoverySpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @instance - * @returns {Object.} JSON object - */ - DataDiscoverySpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataDiscoverySpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataDiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec"; - }; - - DataDiscoverySpec.BigQueryPublishingConfig = (function() { - - /** - * Properties of a BigQueryPublishingConfig. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @interface IBigQueryPublishingConfig - * @property {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null} [tableType] BigQueryPublishingConfig tableType - * @property {string|null} [connection] BigQueryPublishingConfig connection - */ - - /** - * Constructs a new BigQueryPublishingConfig. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @classdesc Represents a BigQueryPublishingConfig. - * @implements IBigQueryPublishingConfig - * @constructor - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set - */ - function BigQueryPublishingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryPublishingConfig tableType. - * @member {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType} tableType - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @instance - */ - BigQueryPublishingConfig.prototype.tableType = 0; - - /** - * BigQueryPublishingConfig connection. - * @member {string} connection - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @instance - */ - BigQueryPublishingConfig.prototype.connection = ""; - - /** - * Creates a new BigQueryPublishingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig instance - */ - BigQueryPublishingConfig.create = function create(properties) { - return new BigQueryPublishingConfig(properties); - }; - - /** - * Encodes the specified BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryPublishingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tableType != null && Object.hasOwnProperty.call(message, "tableType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tableType); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.connection); - return writer; - }; - - /** - * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryPublishingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryPublishingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.tableType = reader.int32(); - break; - } - case 3: { - message.connection = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryPublishingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryPublishingConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryPublishingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tableType != null && message.hasOwnProperty("tableType")) - switch (message.tableType) { - default: - return "tableType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.connection != null && message.hasOwnProperty("connection")) - if (!$util.isString(message.connection)) - return "connection: string expected"; - return null; - }; - - /** - * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig - */ - BigQueryPublishingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); - switch (object.tableType) { - default: - if (typeof object.tableType === "number") { - message.tableType = object.tableType; - break; - } - break; - case "TABLE_TYPE_UNSPECIFIED": - case 0: - message.tableType = 0; - break; - case "EXTERNAL": - case 1: - message.tableType = 1; - break; - case "BIGLAKE": - case 2: - message.tableType = 2; - break; - } - if (object.connection != null) - message.connection = String(object.connection); - return message; - }; - - /** - * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} message BigQueryPublishingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryPublishingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tableType = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; - object.connection = ""; - } - if (message.tableType != null && message.hasOwnProperty("tableType")) - object.tableType = options.enums === String ? $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] === undefined ? message.tableType : $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] : message.tableType; - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = message.connection; - return object; - }; - - /** - * Converts this BigQueryPublishingConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @instance - * @returns {Object.} JSON object - */ - BigQueryPublishingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryPublishingConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryPublishingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"; - }; - - /** - * TableType enum. - * @name google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType - * @enum {number} - * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value - * @property {number} EXTERNAL=1 EXTERNAL value - * @property {number} BIGLAKE=2 BIGLAKE value - */ - BigQueryPublishingConfig.TableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXTERNAL"] = 1; - values[valuesById[2] = "BIGLAKE"] = 2; - return values; - })(); - - return BigQueryPublishingConfig; - })(); - - DataDiscoverySpec.StorageConfig = (function() { - - /** - * Properties of a StorageConfig. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @interface IStorageConfig - * @property {Array.|null} [includePatterns] StorageConfig includePatterns - * @property {Array.|null} [excludePatterns] StorageConfig excludePatterns - * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null} [csvOptions] StorageConfig csvOptions - * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null} [jsonOptions] StorageConfig jsonOptions - */ - - /** - * Constructs a new StorageConfig. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec - * @classdesc Represents a StorageConfig. - * @implements IStorageConfig - * @constructor - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set - */ - function StorageConfig(properties) { - this.includePatterns = []; - this.excludePatterns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageConfig includePatterns. - * @member {Array.} includePatterns - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @instance - */ - StorageConfig.prototype.includePatterns = $util.emptyArray; - - /** - * StorageConfig excludePatterns. - * @member {Array.} excludePatterns - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @instance - */ - StorageConfig.prototype.excludePatterns = $util.emptyArray; - - /** - * StorageConfig csvOptions. - * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null|undefined} csvOptions - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @instance - */ - StorageConfig.prototype.csvOptions = null; - - /** - * StorageConfig jsonOptions. - * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null|undefined} jsonOptions - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @instance - */ - StorageConfig.prototype.jsonOptions = null; - - /** - * Creates a new StorageConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig instance - */ - StorageConfig.create = function create(properties) { - return new StorageConfig(properties); - }; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includePatterns != null && message.includePatterns.length) - for (var i = 0; i < message.includePatterns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.includePatterns[i]); - if (message.excludePatterns != null && message.excludePatterns.length) - for (var i = 0; i < message.excludePatterns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludePatterns[i]); - if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.includePatterns && message.includePatterns.length)) - message.includePatterns = []; - message.includePatterns.push(reader.string()); - break; - } - case 2: { - if (!(message.excludePatterns && message.excludePatterns.length)) - message.excludePatterns = []; - message.excludePatterns.push(reader.string()); - break; - } - case 3: { - message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { - if (!Array.isArray(message.includePatterns)) - return "includePatterns: array expected"; - for (var i = 0; i < message.includePatterns.length; ++i) - if (!$util.isString(message.includePatterns[i])) - return "includePatterns: string[] expected"; - } - if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { - if (!Array.isArray(message.excludePatterns)) - return "excludePatterns: array expected"; - for (var i = 0; i < message.excludePatterns.length; ++i) - if (!$util.isString(message.excludePatterns[i])) - return "excludePatterns: string[] expected"; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify(message.csvOptions); - if (error) - return "csvOptions." + error; - } - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify(message.jsonOptions); - if (error) - return "jsonOptions." + error; - } - return null; - }; - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig - */ - StorageConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); - if (object.includePatterns) { - if (!Array.isArray(object.includePatterns)) - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.includePatterns: array expected"); - message.includePatterns = []; - for (var i = 0; i < object.includePatterns.length; ++i) - message.includePatterns[i] = String(object.includePatterns[i]); - } - if (object.excludePatterns) { - if (!Array.isArray(object.excludePatterns)) - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.excludePatterns: array expected"); - message.excludePatterns = []; - for (var i = 0; i < object.excludePatterns.length; ++i) - message.excludePatterns[i] = String(object.excludePatterns[i]); - } - if (object.csvOptions != null) { - if (typeof object.csvOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.csvOptions: object expected"); - message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.fromObject(object.csvOptions); - } - if (object.jsonOptions != null) { - if (typeof object.jsonOptions !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.jsonOptions: object expected"); - message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.fromObject(object.jsonOptions); - } - return message; - }; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} message StorageConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includePatterns = []; - object.excludePatterns = []; - } - if (options.defaults) { - object.csvOptions = null; - object.jsonOptions = null; - } - if (message.includePatterns && message.includePatterns.length) { - object.includePatterns = []; - for (var j = 0; j < message.includePatterns.length; ++j) - object.includePatterns[j] = message.includePatterns[j]; - } - if (message.excludePatterns && message.excludePatterns.length) { - object.excludePatterns = []; - for (var j = 0; j < message.excludePatterns.length; ++j) - object.excludePatterns[j] = message.excludePatterns[j]; - } - if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) - object.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.toObject(message.csvOptions, options); - if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) - object.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.toObject(message.jsonOptions, options); - return object; - }; - - /** - * Converts this StorageConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @instance - * @returns {Object.} JSON object - */ - StorageConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"; - }; - - StorageConfig.CsvOptions = (function() { - - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @interface ICsvOptions - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [encoding] CsvOptions encoding - * @property {boolean|null} [typeInferenceDisabled] CsvOptions typeInferenceDisabled - * @property {string|null} [quote] CsvOptions quote - */ - - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; - - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; - - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; - - /** - * CsvOptions typeInferenceDisabled. - * @member {boolean} typeInferenceDisabled - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - */ - CsvOptions.prototype.typeInferenceDisabled = false; - - /** - * CsvOptions quote. - * @member {string} quote - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - */ - CsvOptions.prototype.quote = ""; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); - if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.typeInferenceDisabled); - if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.quote); - return writer; - }; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.headerRows = reader.int32(); - break; - } - case 2: { - message.delimiter = reader.string(); - break; - } - case 3: { - message.encoding = reader.string(); - break; - } - case 4: { - message.typeInferenceDisabled = reader.bool(); - break; - } - case 5: { - message.quote = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) - if (typeof message.typeInferenceDisabled !== "boolean") - return "typeInferenceDisabled: boolean expected"; - if (message.quote != null && message.hasOwnProperty("quote")) - if (!$util.isString(message.quote)) - return "quote: string expected"; - return null; - }; - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.typeInferenceDisabled != null) - message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); - if (object.quote != null) - message.quote = String(object.quote); - return message; - }; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.headerRows = 0; - object.delimiter = ""; - object.encoding = ""; - object.typeInferenceDisabled = false; - object.quote = ""; - } - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) - object.typeInferenceDisabled = message.typeInferenceDisabled; - if (message.quote != null && message.hasOwnProperty("quote")) - object.quote = message.quote; - return object; - }; - - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CsvOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"; - }; - - return CsvOptions; - })(); - - StorageConfig.JsonOptions = (function() { - - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - * @property {boolean|null} [typeInferenceDisabled] JsonOptions typeInferenceDisabled - */ - - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; - - /** - * JsonOptions typeInferenceDisabled. - * @member {boolean} typeInferenceDisabled - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @instance - */ - JsonOptions.prototype.typeInferenceDisabled = false; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.typeInferenceDisabled); - return writer; - }; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - case 2: { - message.typeInferenceDisabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) - if (typeof message.typeInferenceDisabled !== "boolean") - return "typeInferenceDisabled: boolean expected"; - return null; - }; - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.typeInferenceDisabled != null) - message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); - return message; - }; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.typeInferenceDisabled = false; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) - object.typeInferenceDisabled = message.typeInferenceDisabled; - return object; - }; - - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"; - }; - - return JsonOptions; - })(); - - return StorageConfig; - })(); - - return DataDiscoverySpec; - })(); - - v1.DataDiscoveryResult = (function() { - - /** - * Properties of a DataDiscoveryResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataDiscoveryResult - * @property {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null} [bigqueryPublishing] DataDiscoveryResult bigqueryPublishing - */ - - /** - * Constructs a new DataDiscoveryResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataDiscoveryResult. - * @implements IDataDiscoveryResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set - */ - function DataDiscoveryResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataDiscoveryResult bigqueryPublishing. - * @member {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null|undefined} bigqueryPublishing - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @instance - */ - DataDiscoveryResult.prototype.bigqueryPublishing = null; - - /** - * Creates a new DataDiscoveryResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult instance - */ - DataDiscoveryResult.create = function create(properties) { - return new DataDiscoveryResult(properties); - }; - - /** - * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataDiscoveryResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryPublishing != null && Object.hasOwnProperty.call(message, "bigqueryPublishing")) - $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.encode(message.bigqueryPublishing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataDiscoveryResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataDiscoveryResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataDiscoveryResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataDiscoveryResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataDiscoveryResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataDiscoveryResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) { - var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify(message.bigqueryPublishing); - if (error) - return "bigqueryPublishing." + error; - } - return null; - }; - - /** - * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult - */ - DataDiscoveryResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); - if (object.bigqueryPublishing != null) { - if (typeof object.bigqueryPublishing !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataDiscoveryResult.bigqueryPublishing: object expected"); - message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.fromObject(object.bigqueryPublishing); - } - return message; - }; - - /** - * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {google.cloud.dataplex.v1.DataDiscoveryResult} message DataDiscoveryResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataDiscoveryResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryPublishing = null; - if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) - object.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.toObject(message.bigqueryPublishing, options); - return object; - }; - - /** - * Converts this DataDiscoveryResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @instance - * @returns {Object.} JSON object - */ - DataDiscoveryResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataDiscoveryResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataDiscoveryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult"; - }; - - DataDiscoveryResult.BigQueryPublishing = (function() { - - /** - * Properties of a BigQueryPublishing. - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @interface IBigQueryPublishing - * @property {string|null} [dataset] BigQueryPublishing dataset - */ - - /** - * Constructs a new BigQueryPublishing. - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult - * @classdesc Represents a BigQueryPublishing. - * @implements IBigQueryPublishing - * @constructor - * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set - */ - function BigQueryPublishing(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryPublishing dataset. - * @member {string} dataset - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @instance - */ - BigQueryPublishing.prototype.dataset = ""; - - /** - * Creates a new BigQueryPublishing instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing instance - */ - BigQueryPublishing.create = function create(properties) { - return new BigQueryPublishing(properties); - }; - - /** - * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryPublishing.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); - return writer; - }; - - /** - * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryPublishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryPublishing message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryPublishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataset = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryPublishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryPublishing message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryPublishing.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"; - return null; - }; - - /** - * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing - */ - BigQueryPublishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing) - return object; - var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); - if (object.dataset != null) - message.dataset = String(object.dataset); - return message; - }; - - /** - * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} message BigQueryPublishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryPublishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dataset = ""; - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - return object; - }; - - /** - * Converts this BigQueryPublishing to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @instance - * @returns {Object.} JSON object - */ - BigQueryPublishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryPublishing - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryPublishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"; - }; - - return BigQueryPublishing; - })(); - - return DataDiscoveryResult; - })(); - - v1.DataProfileSpec = (function() { - - /** - * Properties of a DataProfileSpec. - * @memberof google.cloud.dataplex.v1 - * @interface IDataProfileSpec - * @property {number|null} [samplingPercent] DataProfileSpec samplingPercent - * @property {string|null} [rowFilter] DataProfileSpec rowFilter - * @property {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null} [postScanActions] DataProfileSpec postScanActions - * @property {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null} [includeFields] DataProfileSpec includeFields - * @property {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null} [excludeFields] DataProfileSpec excludeFields - */ - - /** - * Constructs a new DataProfileSpec. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataProfileSpec. - * @implements IDataProfileSpec - * @constructor - * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set - */ - function DataProfileSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataProfileSpec samplingPercent. - * @member {number} samplingPercent - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - */ - DataProfileSpec.prototype.samplingPercent = 0; - - /** - * DataProfileSpec rowFilter. - * @member {string} rowFilter - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - */ - DataProfileSpec.prototype.rowFilter = ""; - - /** - * DataProfileSpec postScanActions. - * @member {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions|null|undefined} postScanActions - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - */ - DataProfileSpec.prototype.postScanActions = null; - - /** - * DataProfileSpec includeFields. - * @member {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null|undefined} includeFields - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - */ - DataProfileSpec.prototype.includeFields = null; - - /** - * DataProfileSpec excludeFields. - * @member {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields|null|undefined} excludeFields - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - */ - DataProfileSpec.prototype.excludeFields = null; - - /** - * Creates a new DataProfileSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec instance - */ - DataProfileSpec.create = function create(properties) { - return new DataProfileSpec(properties); - }; - - /** - * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.samplingPercent); - if (message.rowFilter != null && Object.hasOwnProperty.call(message, "rowFilter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.rowFilter); - if (message.postScanActions != null && Object.hasOwnProperty.call(message, "postScanActions")) - $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.encode(message.postScanActions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.includeFields != null && Object.hasOwnProperty.call(message, "includeFields")) - $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.encode(message.includeFields, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.excludeFields != null && Object.hasOwnProperty.call(message, "excludeFields")) - $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.encode(message.excludeFields, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataProfileSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.samplingPercent = reader.float(); - break; - } - case 3: { - message.rowFilter = reader.string(); - break; - } - case 4: { - message.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.decode(reader, reader.uint32()); - break; - } - case 6: { - message.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataProfileSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataProfileSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - if (typeof message.samplingPercent !== "number") - return "samplingPercent: number expected"; - if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) - if (!$util.isString(message.rowFilter)) - return "rowFilter: string expected"; - if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify(message.postScanActions); - if (error) - return "postScanActions." + error; - } - if (message.includeFields != null && message.hasOwnProperty("includeFields")) { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify(message.includeFields); - if (error) - return "includeFields." + error; - } - if (message.excludeFields != null && message.hasOwnProperty("excludeFields")) { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify(message.excludeFields); - if (error) - return "excludeFields." + error; - } - return null; - }; - - /** - * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec - */ - DataProfileSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileSpec(); - if (object.samplingPercent != null) - message.samplingPercent = Number(object.samplingPercent); - if (object.rowFilter != null) - message.rowFilter = String(object.rowFilter); - if (object.postScanActions != null) { - if (typeof object.postScanActions !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.postScanActions: object expected"); - message.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.fromObject(object.postScanActions); - } - if (object.includeFields != null) { - if (typeof object.includeFields !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.includeFields: object expected"); - message.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fromObject(object.includeFields); - } - if (object.excludeFields != null) { - if (typeof object.excludeFields !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.excludeFields: object expected"); - message.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fromObject(object.excludeFields); - } - return message; - }; - - /** - * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec} message DataProfileSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataProfileSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.samplingPercent = 0; - object.rowFilter = ""; - object.postScanActions = null; - object.includeFields = null; - object.excludeFields = null; - } - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; - if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) - object.rowFilter = message.rowFilter; - if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) - object.postScanActions = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.toObject(message.postScanActions, options); - if (message.includeFields != null && message.hasOwnProperty("includeFields")) - object.includeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.toObject(message.includeFields, options); - if (message.excludeFields != null && message.hasOwnProperty("excludeFields")) - object.excludeFields = $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.toObject(message.excludeFields, options); - return object; - }; - - /** - * Converts this DataProfileSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @instance - * @returns {Object.} JSON object - */ - DataProfileSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataProfileSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataProfileSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec"; - }; - - DataProfileSpec.PostScanActions = (function() { - - /** - * Properties of a PostScanActions. - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @interface IPostScanActions - * @property {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null} [bigqueryExport] PostScanActions bigqueryExport - */ - - /** - * Constructs a new PostScanActions. - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @classdesc Represents a PostScanActions. - * @implements IPostScanActions - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions=} [properties] Properties to set - */ - function PostScanActions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostScanActions bigqueryExport. - * @member {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport|null|undefined} bigqueryExport - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @instance - */ - PostScanActions.prototype.bigqueryExport = null; - - /** - * Creates a new PostScanActions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions instance - */ - PostScanActions.create = function create(properties) { - return new PostScanActions(properties); - }; - - /** - * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions} message PostScanActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryExport != null && Object.hasOwnProperty.call(message, "bigqueryExport")) - $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.encode(message.bigqueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.IPostScanActions} message PostScanActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostScanActions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostScanActions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostScanActions message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostScanActions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify(message.bigqueryExport); - if (error) - return "bigqueryExport." + error; - } - return null; - }; - - /** - * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} PostScanActions - */ - PostScanActions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(); - if (object.bigqueryExport != null) { - if (typeof object.bigqueryExport !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.bigqueryExport: object expected"); - message.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.fromObject(object.bigqueryExport); - } - return message; - }; - - /** - * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} message PostScanActions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostScanActions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryExport = null; - if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) - object.bigqueryExport = $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.toObject(message.bigqueryExport, options); - return object; - }; - - /** - * Converts this PostScanActions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @instance - * @returns {Object.} JSON object - */ - PostScanActions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostScanActions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostScanActions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"; - }; - - PostScanActions.BigQueryExport = (function() { - - /** - * Properties of a BigQueryExport. - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @interface IBigQueryExport - * @property {string|null} [resultsTable] BigQueryExport resultsTable - */ - - /** - * Constructs a new BigQueryExport. - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - * @classdesc Represents a BigQueryExport. - * @implements IBigQueryExport - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport=} [properties] Properties to set - */ - function BigQueryExport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryExport resultsTable. - * @member {string} resultsTable - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @instance - */ - BigQueryExport.prototype.resultsTable = ""; - - /** - * Creates a new BigQueryExport instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport instance - */ - BigQueryExport.create = function create(properties) { - return new BigQueryExport(properties); - }; - - /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resultsTable != null && Object.hasOwnProperty.call(message, "resultsTable")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resultsTable); - return writer; - }; - - /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resultsTable = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryExport message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryExport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) - if (!$util.isString(message.resultsTable)) - return "resultsTable: string expected"; - return null; - }; - - /** - * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} BigQueryExport - */ - BigQueryExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(); - if (object.resultsTable != null) - message.resultsTable = String(object.resultsTable); - return message; - }; - - /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} message BigQueryExport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryExport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.resultsTable = ""; - if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) - object.resultsTable = message.resultsTable; - return object; - }; - - /** - * Converts this BigQueryExport to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @instance - * @returns {Object.} JSON object - */ - BigQueryExport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryExport - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"; - }; - - return BigQueryExport; - })(); - - return PostScanActions; - })(); - - DataProfileSpec.SelectedFields = (function() { - - /** - * Properties of a SelectedFields. - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @interface ISelectedFields - * @property {Array.|null} [fieldNames] SelectedFields fieldNames - */ - - /** - * Constructs a new SelectedFields. - * @memberof google.cloud.dataplex.v1.DataProfileSpec - * @classdesc Represents a SelectedFields. - * @implements ISelectedFields - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields=} [properties] Properties to set - */ - function SelectedFields(properties) { - this.fieldNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SelectedFields fieldNames. - * @member {Array.} fieldNames - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @instance - */ - SelectedFields.prototype.fieldNames = $util.emptyArray; - - /** - * Creates a new SelectedFields instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields instance - */ - SelectedFields.create = function create(properties) { - return new SelectedFields(properties); - }; - - /** - * Encodes the specified SelectedFields message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields} message SelectedFields message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectedFields.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldNames != null && message.fieldNames.length) - for (var i = 0; i < message.fieldNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldNames[i]); - return writer; - }; - - /** - * Encodes the specified SelectedFields message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.ISelectedFields} message SelectedFields message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectedFields.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SelectedFields message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectedFields.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fieldNames && message.fieldNames.length)) - message.fieldNames = []; - message.fieldNames.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SelectedFields message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectedFields.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SelectedFields message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SelectedFields.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldNames != null && message.hasOwnProperty("fieldNames")) { - if (!Array.isArray(message.fieldNames)) - return "fieldNames: array expected"; - for (var i = 0; i < message.fieldNames.length; ++i) - if (!$util.isString(message.fieldNames[i])) - return "fieldNames: string[] expected"; - } - return null; - }; - - /** - * Creates a SelectedFields message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} SelectedFields - */ - SelectedFields.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(); - if (object.fieldNames) { - if (!Array.isArray(object.fieldNames)) - throw TypeError(".google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.fieldNames: array expected"); - message.fieldNames = []; - for (var i = 0; i < object.fieldNames.length; ++i) - message.fieldNames[i] = String(object.fieldNames[i]); - } - return message; - }; - - /** - * Creates a plain object from a SelectedFields message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} message SelectedFields - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SelectedFields.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fieldNames = []; - if (message.fieldNames && message.fieldNames.length) { - object.fieldNames = []; - for (var j = 0; j < message.fieldNames.length; ++j) - object.fieldNames[j] = message.fieldNames[j]; - } - return object; - }; - - /** - * Converts this SelectedFields to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @instance - * @returns {Object.} JSON object - */ - SelectedFields.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SelectedFields - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SelectedFields.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"; - }; - - return SelectedFields; - })(); - - return DataProfileSpec; - })(); - - v1.DataProfileResult = (function() { - - /** - * Properties of a DataProfileResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataProfileResult - * @property {number|Long|null} [rowCount] DataProfileResult rowCount - * @property {google.cloud.dataplex.v1.DataProfileResult.IProfile|null} [profile] DataProfileResult profile - * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataProfileResult scannedData - * @property {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null} [postScanActionsResult] DataProfileResult postScanActionsResult - */ - - /** - * Constructs a new DataProfileResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataProfileResult. - * @implements IDataProfileResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set - */ - function DataProfileResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataProfileResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @instance - */ - DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataProfileResult profile. - * @member {google.cloud.dataplex.v1.DataProfileResult.IProfile|null|undefined} profile - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @instance - */ - DataProfileResult.prototype.profile = null; - - /** - * DataProfileResult scannedData. - * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @instance - */ - DataProfileResult.prototype.scannedData = null; - - /** - * DataProfileResult postScanActionsResult. - * @member {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult|null|undefined} postScanActionsResult - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @instance - */ - DataProfileResult.prototype.postScanActionsResult = null; - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult instance - */ - DataProfileResult.create = function create(properties) { - return new DataProfileResult(properties); - }; - - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCount); - if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) - $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) - $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.rowCount = reader.int64(); - break; - } - case 4: { - message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.decode(reader, reader.uint32()); - break; - } - case 5: { - message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); - break; - } - case 6: { - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataProfileResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataProfileResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - if (message.profile != null && message.hasOwnProperty("profile")) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.verify(message.profile); - if (error) - return "profile." + error; - } - if (message.scannedData != null && message.hasOwnProperty("scannedData")) { - var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); - if (error) - return "scannedData." + error; - } - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify(message.postScanActionsResult); - if (error) - return "postScanActionsResult." + error; - } - return null; - }; - - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult - */ - DataProfileResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult(); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - if (object.profile != null) { - if (typeof object.profile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.profile: object expected"); - message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.fromObject(object.profile); - } - if (object.scannedData != null) { - if (typeof object.scannedData !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.scannedData: object expected"); - message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); - } - if (object.postScanActionsResult != null) { - if (typeof object.postScanActionsResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.postScanActionsResult: object expected"); - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.fromObject(object.postScanActionsResult); - } - return message; - }; - - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult} message DataProfileResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataProfileResult.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.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - object.profile = null; - object.scannedData = null; - object.postScanActionsResult = null; - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - if (message.profile != null && message.hasOwnProperty("profile")) - object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.toObject(message.profile, options); - if (message.scannedData != null && message.hasOwnProperty("scannedData")) - object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) - object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.toObject(message.postScanActionsResult, options); - return object; - }; - - /** - * Converts this DataProfileResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @instance - * @returns {Object.} JSON object - */ - DataProfileResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataProfileResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult"; - }; - - DataProfileResult.Profile = (function() { - - /** - * Properties of a Profile. - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @interface IProfile - * @property {Array.|null} [fields] Profile fields - */ - - /** - * Constructs a new Profile. - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @classdesc Represents a Profile. - * @implements IProfile - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set - */ - function Profile(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]]; - } - - /** - * Profile fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @instance - */ - Profile.prototype.fields = $util.emptyArray; - - /** - * Creates a new Profile instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile instance - */ - Profile.create = function create(properties) { - return new Profile(properties); - }; - - /** - * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Profile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Profile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Profile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Profile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Profile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Profile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Profile message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Profile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Profile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile - */ - Profile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.fromObject(object.fields[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Profile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile} message Profile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Profile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.toObject(message.fields[j], options); - } - return object; - }; - - /** - * Converts this Profile to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @instance - * @returns {Object.} JSON object - */ - Profile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Profile - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Profile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile"; - }; - - Profile.Field = (function() { - - /** - * Properties of a Field. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @interface IField - * @property {string|null} [name] Field name - * @property {string|null} [type] Field type - * @property {string|null} [mode] Field mode - * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null} [profile] Field profile - */ - - /** - * Constructs a new Field. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile - * @classdesc Represents a Field. - * @implements IField - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set - */ - function Field(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Field name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @instance - */ - Field.prototype.name = ""; - - /** - * Field type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @instance - */ - Field.prototype.type = ""; - - /** - * Field mode. - * @member {string} mode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @instance - */ - Field.prototype.mode = ""; - - /** - * Field profile. - * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null|undefined} profile - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @instance - */ - Field.prototype.profile = null; - - /** - * Creates a new Field instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field instance - */ - Field.create = function create(properties) { - return new Field(properties); - }; - - /** - * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encode = function encode(message, writer) { - if (!writer) - 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 2 =*/18).string(message.type); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); - if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Field message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.mode = reader.string(); - break; - } - case 4: { - message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Field message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Field.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - if (!$util.isString(message.mode)) - return "mode: string expected"; - if (message.profile != null && message.hasOwnProperty("profile")) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify(message.profile); - if (error) - return "profile." + error; - } - return null; - }; - - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field - */ - Field.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.mode != null) - message.mode = String(object.mode); - if (object.profile != null) { - if (typeof object.profile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.profile: object expected"); - message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.fromObject(object.profile); - } - return message; - }; - - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} message Field - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Field.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = ""; - object.mode = ""; - object.profile = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = message.mode; - if (message.profile != null && message.hasOwnProperty("profile")) - object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.toObject(message.profile, options); - return object; - }; - - /** - * Converts this Field to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @instance - * @returns {Object.} JSON object - */ - Field.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Field - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"; - }; - - Field.ProfileInfo = (function() { - - /** - * Properties of a ProfileInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @interface IProfileInfo - * @property {number|null} [nullRatio] ProfileInfo nullRatio - * @property {number|null} [distinctRatio] ProfileInfo distinctRatio - * @property {Array.|null} [topNValues] ProfileInfo topNValues - * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null} [stringProfile] ProfileInfo stringProfile - * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null} [integerProfile] ProfileInfo integerProfile - * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null} [doubleProfile] ProfileInfo doubleProfile - */ - - /** - * Constructs a new ProfileInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field - * @classdesc Represents a ProfileInfo. - * @implements IProfileInfo - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set - */ - function ProfileInfo(properties) { - this.topNValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProfileInfo nullRatio. - * @member {number} nullRatio - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.nullRatio = 0; - - /** - * ProfileInfo distinctRatio. - * @member {number} distinctRatio - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.distinctRatio = 0; - - /** - * ProfileInfo topNValues. - * @member {Array.} topNValues - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.topNValues = $util.emptyArray; - - /** - * ProfileInfo stringProfile. - * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null|undefined} stringProfile - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.stringProfile = null; - - /** - * ProfileInfo integerProfile. - * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null|undefined} integerProfile - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.integerProfile = null; - - /** - * ProfileInfo doubleProfile. - * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null|undefined} doubleProfile - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - ProfileInfo.prototype.doubleProfile = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ProfileInfo fieldInfo. - * @member {"stringProfile"|"integerProfile"|"doubleProfile"|undefined} fieldInfo - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - */ - Object.defineProperty(ProfileInfo.prototype, "fieldInfo", { - get: $util.oneOfGetter($oneOfFields = ["stringProfile", "integerProfile", "doubleProfile"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ProfileInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo instance - */ - ProfileInfo.create = function create(properties) { - return new ProfileInfo(properties); - }; - - /** - * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProfileInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullRatio != null && Object.hasOwnProperty.call(message, "nullRatio")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.nullRatio); - if (message.distinctRatio != null && Object.hasOwnProperty.call(message, "distinctRatio")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.distinctRatio); - if (message.topNValues != null && message.topNValues.length) - for (var i = 0; i < message.topNValues.length; ++i) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.encode(message.topNValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stringProfile != null && Object.hasOwnProperty.call(message, "stringProfile")) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.encode(message.stringProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.integerProfile != null && Object.hasOwnProperty.call(message, "integerProfile")) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.encode(message.integerProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.doubleProfile != null && Object.hasOwnProperty.call(message, "doubleProfile")) - $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.encode(message.doubleProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProfileInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProfileInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProfileInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.nullRatio = reader.double(); - break; - } - case 3: { - message.distinctRatio = reader.double(); - break; - } - case 4: { - if (!(message.topNValues && message.topNValues.length)) - message.topNValues = []; - message.topNValues.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.decode(reader, reader.uint32())); - break; - } - case 101: { - message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.decode(reader, reader.uint32()); - break; - } - case 102: { - message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.decode(reader, reader.uint32()); - break; - } - case 103: { - message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProfileInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProfileInfo message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProfileInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) - if (typeof message.nullRatio !== "number") - return "nullRatio: number expected"; - if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) - if (typeof message.distinctRatio !== "number") - return "distinctRatio: number expected"; - if (message.topNValues != null && message.hasOwnProperty("topNValues")) { - if (!Array.isArray(message.topNValues)) - return "topNValues: array expected"; - for (var i = 0; i < message.topNValues.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify(message.topNValues[i]); - if (error) - return "topNValues." + error; - } - } - if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { - properties.fieldInfo = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify(message.stringProfile); - if (error) - return "stringProfile." + error; - } - } - if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { - if (properties.fieldInfo === 1) - return "fieldInfo: multiple values"; - properties.fieldInfo = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify(message.integerProfile); - if (error) - return "integerProfile." + error; - } - } - if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { - if (properties.fieldInfo === 1) - return "fieldInfo: multiple values"; - properties.fieldInfo = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify(message.doubleProfile); - if (error) - return "doubleProfile." + error; - } - } - return null; - }; - - /** - * Creates a ProfileInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo - */ - ProfileInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); - if (object.nullRatio != null) - message.nullRatio = Number(object.nullRatio); - if (object.distinctRatio != null) - message.distinctRatio = Number(object.distinctRatio); - if (object.topNValues) { - if (!Array.isArray(object.topNValues)) - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: array expected"); - message.topNValues = []; - for (var i = 0; i < object.topNValues.length; ++i) { - if (typeof object.topNValues[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: object expected"); - message.topNValues[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.fromObject(object.topNValues[i]); - } - } - if (object.stringProfile != null) { - if (typeof object.stringProfile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.stringProfile: object expected"); - message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.fromObject(object.stringProfile); - } - if (object.integerProfile != null) { - if (typeof object.integerProfile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.integerProfile: object expected"); - message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.fromObject(object.integerProfile); - } - if (object.doubleProfile != null) { - if (typeof object.doubleProfile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.doubleProfile: object expected"); - message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.fromObject(object.doubleProfile); - } - return message; - }; - - /** - * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} message ProfileInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProfileInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.topNValues = []; - if (options.defaults) { - object.nullRatio = 0; - object.distinctRatio = 0; - } - if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) - object.nullRatio = options.json && !isFinite(message.nullRatio) ? String(message.nullRatio) : message.nullRatio; - if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) - object.distinctRatio = options.json && !isFinite(message.distinctRatio) ? String(message.distinctRatio) : message.distinctRatio; - if (message.topNValues && message.topNValues.length) { - object.topNValues = []; - for (var j = 0; j < message.topNValues.length; ++j) - object.topNValues[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.toObject(message.topNValues[j], options); - } - if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { - object.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.toObject(message.stringProfile, options); - if (options.oneofs) - object.fieldInfo = "stringProfile"; - } - if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { - object.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.toObject(message.integerProfile, options); - if (options.oneofs) - object.fieldInfo = "integerProfile"; - } - if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { - object.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.toObject(message.doubleProfile, options); - if (options.oneofs) - object.fieldInfo = "doubleProfile"; - } - return object; - }; - - /** - * Converts this ProfileInfo to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @instance - * @returns {Object.} JSON object - */ - ProfileInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProfileInfo - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProfileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"; - }; - - ProfileInfo.StringFieldInfo = (function() { - - /** - * Properties of a StringFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @interface IStringFieldInfo - * @property {number|Long|null} [minLength] StringFieldInfo minLength - * @property {number|Long|null} [maxLength] StringFieldInfo maxLength - * @property {number|null} [averageLength] StringFieldInfo averageLength - */ - - /** - * Constructs a new StringFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @classdesc Represents a StringFieldInfo. - * @implements IStringFieldInfo - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set - */ - function StringFieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringFieldInfo minLength. - * @member {number|Long} minLength - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @instance - */ - StringFieldInfo.prototype.minLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StringFieldInfo maxLength. - * @member {number|Long} maxLength - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @instance - */ - StringFieldInfo.prototype.maxLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StringFieldInfo averageLength. - * @member {number} averageLength - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @instance - */ - StringFieldInfo.prototype.averageLength = 0; - - /** - * Creates a new StringFieldInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo instance - */ - StringFieldInfo.create = function create(properties) { - return new StringFieldInfo(properties); - }; - - /** - * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.minLength != null && Object.hasOwnProperty.call(message, "minLength")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minLength); - if (message.maxLength != null && Object.hasOwnProperty.call(message, "maxLength")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxLength); - if (message.averageLength != null && Object.hasOwnProperty.call(message, "averageLength")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.averageLength); - return writer; - }; - - /** - * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringFieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFieldInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.minLength = reader.int64(); - break; - } - case 2: { - message.maxLength = reader.int64(); - break; - } - case 3: { - message.averageLength = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringFieldInfo message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.minLength != null && message.hasOwnProperty("minLength")) - if (!$util.isInteger(message.minLength) && !(message.minLength && $util.isInteger(message.minLength.low) && $util.isInteger(message.minLength.high))) - return "minLength: integer|Long expected"; - if (message.maxLength != null && message.hasOwnProperty("maxLength")) - if (!$util.isInteger(message.maxLength) && !(message.maxLength && $util.isInteger(message.maxLength.low) && $util.isInteger(message.maxLength.high))) - return "maxLength: integer|Long expected"; - if (message.averageLength != null && message.hasOwnProperty("averageLength")) - if (typeof message.averageLength !== "number") - return "averageLength: number expected"; - return null; - }; - - /** - * Creates a StringFieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo - */ - StringFieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); - if (object.minLength != null) - if ($util.Long) - (message.minLength = $util.Long.fromValue(object.minLength)).unsigned = false; - else if (typeof object.minLength === "string") - message.minLength = parseInt(object.minLength, 10); - else if (typeof object.minLength === "number") - message.minLength = object.minLength; - else if (typeof object.minLength === "object") - message.minLength = new $util.LongBits(object.minLength.low >>> 0, object.minLength.high >>> 0).toNumber(); - if (object.maxLength != null) - if ($util.Long) - (message.maxLength = $util.Long.fromValue(object.maxLength)).unsigned = false; - else if (typeof object.maxLength === "string") - message.maxLength = parseInt(object.maxLength, 10); - else if (typeof object.maxLength === "number") - message.maxLength = object.maxLength; - else if (typeof object.maxLength === "object") - message.maxLength = new $util.LongBits(object.maxLength.low >>> 0, object.maxLength.high >>> 0).toNumber(); - if (object.averageLength != null) - message.averageLength = Number(object.averageLength); - return message; - }; - - /** - * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} message StringFieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFieldInfo.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.minLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.minLength = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxLength = options.longs === String ? "0" : 0; - object.averageLength = 0; - } - if (message.minLength != null && message.hasOwnProperty("minLength")) - if (typeof message.minLength === "number") - object.minLength = options.longs === String ? String(message.minLength) : message.minLength; - else - object.minLength = options.longs === String ? $util.Long.prototype.toString.call(message.minLength) : options.longs === Number ? new $util.LongBits(message.minLength.low >>> 0, message.minLength.high >>> 0).toNumber() : message.minLength; - if (message.maxLength != null && message.hasOwnProperty("maxLength")) - if (typeof message.maxLength === "number") - object.maxLength = options.longs === String ? String(message.maxLength) : message.maxLength; - else - object.maxLength = options.longs === String ? $util.Long.prototype.toString.call(message.maxLength) : options.longs === Number ? new $util.LongBits(message.maxLength.low >>> 0, message.maxLength.high >>> 0).toNumber() : message.maxLength; - if (message.averageLength != null && message.hasOwnProperty("averageLength")) - object.averageLength = options.json && !isFinite(message.averageLength) ? String(message.averageLength) : message.averageLength; - return object; - }; - - /** - * Converts this StringFieldInfo to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @instance - * @returns {Object.} JSON object - */ - StringFieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringFieldInfo - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"; - }; - - return StringFieldInfo; - })(); - - ProfileInfo.IntegerFieldInfo = (function() { - - /** - * Properties of an IntegerFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @interface IIntegerFieldInfo - * @property {number|null} [average] IntegerFieldInfo average - * @property {number|null} [standardDeviation] IntegerFieldInfo standardDeviation - * @property {number|Long|null} [min] IntegerFieldInfo min - * @property {Array.|null} [quartiles] IntegerFieldInfo quartiles - * @property {number|Long|null} [max] IntegerFieldInfo max - */ - - /** - * Constructs a new IntegerFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @classdesc Represents an IntegerFieldInfo. - * @implements IIntegerFieldInfo - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set - */ - function IntegerFieldInfo(properties) { - this.quartiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntegerFieldInfo average. - * @member {number} average - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - */ - IntegerFieldInfo.prototype.average = 0; - - /** - * IntegerFieldInfo standardDeviation. - * @member {number} standardDeviation - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - */ - IntegerFieldInfo.prototype.standardDeviation = 0; - - /** - * IntegerFieldInfo min. - * @member {number|Long} min - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - */ - IntegerFieldInfo.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IntegerFieldInfo quartiles. - * @member {Array.} quartiles - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - */ - IntegerFieldInfo.prototype.quartiles = $util.emptyArray; - - /** - * IntegerFieldInfo max. - * @member {number|Long} max - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - */ - IntegerFieldInfo.prototype.max = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new IntegerFieldInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo instance - */ - IntegerFieldInfo.create = function create(properties) { - return new IntegerFieldInfo(properties); - }; - - /** - * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntegerFieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.average != null && Object.hasOwnProperty.call(message, "average")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); - if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.max); - if (message.quartiles != null && message.quartiles.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.quartiles.length; ++i) - writer.int64(message.quartiles[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntegerFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IntegerFieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntegerFieldInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.average = reader.double(); - break; - } - case 3: { - message.standardDeviation = reader.double(); - break; - } - case 4: { - message.min = reader.int64(); - break; - } - case 6: { - if (!(message.quartiles && message.quartiles.length)) - message.quartiles = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.quartiles.push(reader.int64()); - } else - message.quartiles.push(reader.int64()); - break; - } - case 5: { - message.max = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntegerFieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntegerFieldInfo message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntegerFieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.average != null && message.hasOwnProperty("average")) - if (typeof message.average !== "number") - return "average: number expected"; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - if (typeof message.standardDeviation !== "number") - return "standardDeviation: number expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high))) - return "min: integer|Long expected"; - if (message.quartiles != null && message.hasOwnProperty("quartiles")) { - if (!Array.isArray(message.quartiles)) - return "quartiles: array expected"; - for (var i = 0; i < message.quartiles.length; ++i) - if (!$util.isInteger(message.quartiles[i]) && !(message.quartiles[i] && $util.isInteger(message.quartiles[i].low) && $util.isInteger(message.quartiles[i].high))) - return "quartiles: integer|Long[] expected"; - } - if (message.max != null && message.hasOwnProperty("max")) - if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high))) - return "max: integer|Long expected"; - return null; - }; - - /** - * Creates an IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo - */ - IntegerFieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); - if (object.average != null) - message.average = Number(object.average); - if (object.standardDeviation != null) - message.standardDeviation = Number(object.standardDeviation); - if (object.min != null) - if ($util.Long) - (message.min = $util.Long.fromValue(object.min)).unsigned = false; - else if (typeof object.min === "string") - message.min = parseInt(object.min, 10); - else if (typeof object.min === "number") - message.min = object.min; - else if (typeof object.min === "object") - message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber(); - if (object.quartiles) { - if (!Array.isArray(object.quartiles)) - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.quartiles: array expected"); - message.quartiles = []; - for (var i = 0; i < object.quartiles.length; ++i) - if ($util.Long) - (message.quartiles[i] = $util.Long.fromValue(object.quartiles[i])).unsigned = false; - else if (typeof object.quartiles[i] === "string") - message.quartiles[i] = parseInt(object.quartiles[i], 10); - else if (typeof object.quartiles[i] === "number") - message.quartiles[i] = object.quartiles[i]; - else if (typeof object.quartiles[i] === "object") - message.quartiles[i] = new $util.LongBits(object.quartiles[i].low >>> 0, object.quartiles[i].high >>> 0).toNumber(); - } - if (object.max != null) - if ($util.Long) - (message.max = $util.Long.fromValue(object.max)).unsigned = false; - else if (typeof object.max === "string") - message.max = parseInt(object.max, 10); - else if (typeof object.max === "number") - message.max = object.max; - else if (typeof object.max === "object") - message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} message IntegerFieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntegerFieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.quartiles = []; - if (options.defaults) { - object.average = 0; - object.standardDeviation = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.min = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max = options.longs === String ? "0" : 0; - } - if (message.average != null && message.hasOwnProperty("average")) - object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min === "number") - object.min = options.longs === String ? String(message.min) : message.min; - else - object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max === "number") - object.max = options.longs === String ? String(message.max) : message.max; - else - object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max; - if (message.quartiles && message.quartiles.length) { - object.quartiles = []; - for (var j = 0; j < message.quartiles.length; ++j) - if (typeof message.quartiles[j] === "number") - object.quartiles[j] = options.longs === String ? String(message.quartiles[j]) : message.quartiles[j]; - else - object.quartiles[j] = options.longs === String ? $util.Long.prototype.toString.call(message.quartiles[j]) : options.longs === Number ? new $util.LongBits(message.quartiles[j].low >>> 0, message.quartiles[j].high >>> 0).toNumber() : message.quartiles[j]; - } - return object; - }; - - /** - * Converts this IntegerFieldInfo to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @instance - * @returns {Object.} JSON object - */ - IntegerFieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IntegerFieldInfo - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IntegerFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"; - }; - - return IntegerFieldInfo; - })(); - - ProfileInfo.DoubleFieldInfo = (function() { - - /** - * Properties of a DoubleFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @interface IDoubleFieldInfo - * @property {number|null} [average] DoubleFieldInfo average - * @property {number|null} [standardDeviation] DoubleFieldInfo standardDeviation - * @property {number|null} [min] DoubleFieldInfo min - * @property {Array.|null} [quartiles] DoubleFieldInfo quartiles - * @property {number|null} [max] DoubleFieldInfo max - */ - - /** - * Constructs a new DoubleFieldInfo. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @classdesc Represents a DoubleFieldInfo. - * @implements IDoubleFieldInfo - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set - */ - function DoubleFieldInfo(properties) { - this.quartiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleFieldInfo average. - * @member {number} average - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - */ - DoubleFieldInfo.prototype.average = 0; - - /** - * DoubleFieldInfo standardDeviation. - * @member {number} standardDeviation - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - */ - DoubleFieldInfo.prototype.standardDeviation = 0; - - /** - * DoubleFieldInfo min. - * @member {number} min - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - */ - DoubleFieldInfo.prototype.min = 0; - - /** - * DoubleFieldInfo quartiles. - * @member {Array.} quartiles - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - */ - DoubleFieldInfo.prototype.quartiles = $util.emptyArray; - - /** - * DoubleFieldInfo max. - * @member {number} max - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - */ - DoubleFieldInfo.prototype.max = 0; - - /** - * Creates a new DoubleFieldInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo instance - */ - DoubleFieldInfo.create = function create(properties) { - return new DoubleFieldInfo(properties); - }; - - /** - * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleFieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.average != null && Object.hasOwnProperty.call(message, "average")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); - if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.max); - if (message.quartiles != null && message.quartiles.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.quartiles.length; ++i) - writer.double(message.quartiles[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleFieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleFieldInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.average = reader.double(); - break; - } - case 3: { - message.standardDeviation = reader.double(); - break; - } - case 4: { - message.min = reader.double(); - break; - } - case 6: { - if (!(message.quartiles && message.quartiles.length)) - message.quartiles = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.quartiles.push(reader.double()); - } else - message.quartiles.push(reader.double()); - break; - } - case 5: { - message.max = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleFieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleFieldInfo message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleFieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.average != null && message.hasOwnProperty("average")) - if (typeof message.average !== "number") - return "average: number expected"; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - if (typeof message.standardDeviation !== "number") - return "standardDeviation: number expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.quartiles != null && message.hasOwnProperty("quartiles")) { - if (!Array.isArray(message.quartiles)) - return "quartiles: array expected"; - for (var i = 0; i < message.quartiles.length; ++i) - if (typeof message.quartiles[i] !== "number") - return "quartiles: number[] expected"; - } - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - return null; - }; - - /** - * Creates a DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo - */ - DoubleFieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); - if (object.average != null) - message.average = Number(object.average); - if (object.standardDeviation != null) - message.standardDeviation = Number(object.standardDeviation); - if (object.min != null) - message.min = Number(object.min); - if (object.quartiles) { - if (!Array.isArray(object.quartiles)) - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.quartiles: array expected"); - message.quartiles = []; - for (var i = 0; i < object.quartiles.length; ++i) - message.quartiles[i] = Number(object.quartiles[i]); - } - if (object.max != null) - message.max = Number(object.max); - return message; - }; - - /** - * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} message DoubleFieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleFieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.quartiles = []; - if (options.defaults) { - object.average = 0; - object.standardDeviation = 0; - object.min = 0; - object.max = 0; - } - if (message.average != null && message.hasOwnProperty("average")) - object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; - if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) - object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - if (message.quartiles && message.quartiles.length) { - object.quartiles = []; - for (var j = 0; j < message.quartiles.length; ++j) - object.quartiles[j] = options.json && !isFinite(message.quartiles[j]) ? String(message.quartiles[j]) : message.quartiles[j]; - } - return object; - }; - - /** - * Converts this DoubleFieldInfo to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @instance - * @returns {Object.} JSON object - */ - DoubleFieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleFieldInfo - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"; - }; - - return DoubleFieldInfo; - })(); - - ProfileInfo.TopNValue = (function() { - - /** - * Properties of a TopNValue. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @interface ITopNValue - * @property {string|null} [value] TopNValue value - * @property {number|Long|null} [count] TopNValue count - * @property {number|null} [ratio] TopNValue ratio - */ - - /** - * Constructs a new TopNValue. - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - * @classdesc Represents a TopNValue. - * @implements ITopNValue - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set - */ - function TopNValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TopNValue value. - * @member {string} value - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @instance - */ - TopNValue.prototype.value = ""; - - /** - * TopNValue count. - * @member {number|Long} count - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @instance - */ - TopNValue.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TopNValue ratio. - * @member {number} ratio - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @instance - */ - TopNValue.prototype.ratio = 0; - - /** - * Creates a new TopNValue instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue instance - */ - TopNValue.create = function create(properties) { - return new TopNValue(properties); - }; - - /** - * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopNValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); - if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.ratio); - return writer; - }; - - /** - * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopNValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TopNValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopNValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - case 2: { - message.count = reader.int64(); - break; - } - case 3: { - message.ratio = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TopNValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopNValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TopNValue message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TopNValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.ratio != null && message.hasOwnProperty("ratio")) - if (typeof message.ratio !== "number") - return "ratio: number expected"; - return null; - }; - - /** - * Creates a TopNValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue - */ - TopNValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); - if (object.value != null) - message.value = String(object.value); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.ratio != null) - message.ratio = Number(object.ratio); - return message; - }; - - /** - * Creates a plain object from a TopNValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} message TopNValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TopNValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.ratio = 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.ratio != null && message.hasOwnProperty("ratio")) - object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; - return object; - }; - - /** - * Converts this TopNValue to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @instance - * @returns {Object.} JSON object - */ - TopNValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TopNValue - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TopNValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"; - }; - - return TopNValue; - })(); - - return ProfileInfo; - })(); - - return Field; - })(); - - return Profile; - })(); - - DataProfileResult.PostScanActionsResult = (function() { - - /** - * Properties of a PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @interface IPostScanActionsResult - * @property {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult - */ - - /** - * Constructs a new PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataProfileResult - * @classdesc Represents a PostScanActionsResult. - * @implements IPostScanActionsResult - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult=} [properties] Properties to set - */ - function PostScanActionsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostScanActionsResult bigqueryExportResult. - * @member {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @instance - */ - PostScanActionsResult.prototype.bigqueryExportResult = null; - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult instance - */ - PostScanActionsResult.create = function create(properties) { - return new PostScanActionsResult(properties); - }; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) - $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostScanActionsResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostScanActionsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); - if (error) - return "bigqueryExportResult." + error; - } - return null; - }; - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} PostScanActionsResult - */ - PostScanActionsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(); - if (object.bigqueryExportResult != null) { - if (typeof object.bigqueryExportResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.bigqueryExportResult: object expected"); - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); - } - return message; - }; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} message PostScanActionsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostScanActionsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryExportResult = null; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) - object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); - return object; - }; - - /** - * Converts this PostScanActionsResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @instance - * @returns {Object.} JSON object - */ - PostScanActionsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostScanActionsResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"; - }; - - PostScanActionsResult.BigQueryExportResult = (function() { - - /** - * Properties of a BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @interface IBigQueryExportResult - * @property {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state - * @property {string|null} [message] BigQueryExportResult message - */ - - /** - * Constructs a new BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - * @classdesc Represents a BigQueryExportResult. - * @implements IBigQueryExportResult - * @constructor - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - */ - function BigQueryExportResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryExportResult state. - * @member {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State} state - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.state = 0; - - /** - * BigQueryExportResult message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.message = ""; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance - */ - BigQueryExportResult.create = function create(properties) { - return new BigQueryExportResult(properties); - }; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - return writer; - }; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryExportResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - */ - BigQueryExportResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "SKIPPED": - case 3: - message.state = 3; - break; - } - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryExportResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this BigQueryExportResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @instance - * @returns {Object.} JSON object - */ - BigQueryExportResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryExportResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} SKIPPED=3 SKIPPED value - */ - BigQueryExportResult.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "SKIPPED"] = 3; - return values; - })(); - - return BigQueryExportResult; - })(); - - return PostScanActionsResult; - })(); - - return DataProfileResult; - })(); - - v1.Trigger = (function() { - - /** - * Properties of a Trigger. - * @memberof google.cloud.dataplex.v1 - * @interface ITrigger - * @property {google.cloud.dataplex.v1.Trigger.IOnDemand|null} [onDemand] Trigger onDemand - * @property {google.cloud.dataplex.v1.Trigger.ISchedule|null} [schedule] Trigger schedule - */ - - /** - * Constructs a new Trigger. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Trigger. - * @implements ITrigger - * @constructor - * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set - */ - function Trigger(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trigger onDemand. - * @member {google.cloud.dataplex.v1.Trigger.IOnDemand|null|undefined} onDemand - * @memberof google.cloud.dataplex.v1.Trigger - * @instance - */ - Trigger.prototype.onDemand = null; - - /** - * Trigger schedule. - * @member {google.cloud.dataplex.v1.Trigger.ISchedule|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Trigger - * @instance - */ - Trigger.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Trigger mode. - * @member {"onDemand"|"schedule"|undefined} mode - * @memberof google.cloud.dataplex.v1.Trigger - * @instance - */ - Object.defineProperty(Trigger.prototype, "mode", { - get: $util.oneOfGetter($oneOfFields = ["onDemand", "schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Trigger instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Trigger} Trigger instance - */ - Trigger.create = function create(properties) { - return new Trigger(properties); - }; - - /** - * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trigger.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onDemand != null && Object.hasOwnProperty.call(message, "onDemand")) - $root.google.cloud.dataplex.v1.Trigger.OnDemand.encode(message.onDemand, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - $root.google.cloud.dataplex.v1.Trigger.Schedule.encode(message.schedule, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trigger.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trigger message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Trigger} Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trigger.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.decode(reader, reader.uint32()); - break; - } - case 101: { - message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Trigger} Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trigger.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trigger message. - * @function verify - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trigger.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.onDemand != null && message.hasOwnProperty("onDemand")) { - properties.mode = 1; - { - var error = $root.google.cloud.dataplex.v1.Trigger.OnDemand.verify(message.onDemand); - if (error) - return "onDemand." + error; - } - } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - { - var error = $root.google.cloud.dataplex.v1.Trigger.Schedule.verify(message.schedule); - if (error) - return "schedule." + error; - } - } - return null; - }; - - /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Trigger} Trigger - */ - Trigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Trigger) - return object; - var message = new $root.google.cloud.dataplex.v1.Trigger(); - if (object.onDemand != null) { - if (typeof object.onDemand !== "object") - throw TypeError(".google.cloud.dataplex.v1.Trigger.onDemand: object expected"); - message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.fromObject(object.onDemand); - } - if (object.schedule != null) { - if (typeof object.schedule !== "object") - throw TypeError(".google.cloud.dataplex.v1.Trigger.schedule: object expected"); - message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.fromObject(object.schedule); - } - return message; - }; - - /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {google.cloud.dataplex.v1.Trigger} message Trigger - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trigger.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.onDemand != null && message.hasOwnProperty("onDemand")) { - object.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.toObject(message.onDemand, options); - if (options.oneofs) - object.mode = "onDemand"; - } - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.toObject(message.schedule, options); - if (options.oneofs) - object.mode = "schedule"; - } - return object; - }; - - /** - * Converts this Trigger to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Trigger - * @instance - * @returns {Object.} JSON object - */ - Trigger.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trigger - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Trigger - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger"; - }; - - Trigger.OnDemand = (function() { - - /** - * Properties of an OnDemand. - * @memberof google.cloud.dataplex.v1.Trigger - * @interface IOnDemand - */ - - /** - * Constructs a new OnDemand. - * @memberof google.cloud.dataplex.v1.Trigger - * @classdesc Represents an OnDemand. - * @implements IOnDemand - * @constructor - * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set - */ - function OnDemand(properties) { - if (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 OnDemand instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand instance - */ - OnDemand.create = function create(properties) { - return new OnDemand(properties); - }; - - /** - * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OnDemand.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OnDemand.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OnDemand message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OnDemand.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OnDemand message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OnDemand.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OnDemand message. - * @function verify - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OnDemand.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand - */ - OnDemand.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Trigger.OnDemand) - return object; - return new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); - }; - - /** - * Creates a plain object from an OnDemand message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {google.cloud.dataplex.v1.Trigger.OnDemand} message OnDemand - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OnDemand.toObject = function toObject() { - return {}; - }; - - /** - * Converts this OnDemand to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @instance - * @returns {Object.} JSON object - */ - OnDemand.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OnDemand - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Trigger.OnDemand - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OnDemand.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.OnDemand"; - }; - - return OnDemand; - })(); - - Trigger.Schedule = (function() { - - /** - * Properties of a Schedule. - * @memberof google.cloud.dataplex.v1.Trigger - * @interface ISchedule - * @property {string|null} [cron] Schedule cron - */ - - /** - * Constructs a new Schedule. - * @memberof google.cloud.dataplex.v1.Trigger - * @classdesc Represents a Schedule. - * @implements ISchedule - * @constructor - * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set - */ - function Schedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Schedule cron. - * @member {string} cron - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @instance - */ - Schedule.prototype.cron = ""; - - /** - * Creates a new Schedule instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule instance - */ - Schedule.create = function create(properties) { - return new Schedule(properties); - }; - - /** - * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cron != null && Object.hasOwnProperty.call(message, "cron")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cron); - return writer; - }; - - /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Schedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cron = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schedule message. - * @function verify - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cron != null && message.hasOwnProperty("cron")) - if (!$util.isString(message.cron)) - return "cron: string expected"; - return null; - }; - - /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule - */ - Schedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Trigger.Schedule) - return object; - var message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); - if (object.cron != null) - message.cron = String(object.cron); - return message; - }; - - /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {google.cloud.dataplex.v1.Trigger.Schedule} message Schedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cron = ""; - if (message.cron != null && message.hasOwnProperty("cron")) - object.cron = message.cron; - return object; - }; - - /** - * Converts this Schedule to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @instance - * @returns {Object.} JSON object - */ - Schedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Schedule - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Trigger.Schedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.Schedule"; - }; - - return Schedule; - })(); - - return Trigger; - })(); - - v1.DataSource = (function() { - - /** - * Properties of a DataSource. - * @memberof google.cloud.dataplex.v1 - * @interface IDataSource - * @property {string|null} [entity] DataSource entity - * @property {string|null} [resource] DataSource resource - */ - - /** - * Constructs a new DataSource. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource - * @constructor - * @param {google.cloud.dataplex.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 entity. - * @member {string|null|undefined} entity - * @memberof google.cloud.dataplex.v1.DataSource - * @instance - */ - DataSource.prototype.entity = null; - - /** - * DataSource resource. - * @member {string|null|undefined} resource - * @memberof google.cloud.dataplex.v1.DataSource - * @instance - */ - DataSource.prototype.resource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSource source. - * @member {"entity"|"resource"|undefined} source - * @memberof google.cloud.dataplex.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["entity", "resource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSource instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataSource - * @static - * @param {google.cloud.dataplex.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataSource} DataSource instance - */ - DataSource.create = function create(properties) { - return new DataSource(properties); - }; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataSource - * @static - * @param {google.cloud.dataplex.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.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.entity); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.resource); - return writer; - }; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataSource - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.DataSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.entity = reader.string(); - break; - } - case 101: { - message.resource = reader.string(); - 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.dataplex.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.entity != null && message.hasOwnProperty("entity")) { - properties.source = 1; - if (!$util.isString(message.entity)) - return "entity: string expected"; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.resource)) - return "resource: string expected"; - } - return null; - }; - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataSource} DataSource - */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataSource) - return object; - var message = new $root.google.cloud.dataplex.v1.DataSource(); - if (object.entity != null) - message.entity = String(object.entity); - if (object.resource != null) - message.resource = String(object.resource); - return message; - }; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataSource - * @static - * @param {google.cloud.dataplex.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 (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = message.entity; - if (options.oneofs) - object.source = "entity"; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - object.resource = message.resource; - if (options.oneofs) - object.source = "resource"; - } - return object; - }; - - /** - * Converts this DataSource to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.DataSource"; - }; - - return DataSource; - })(); - - v1.ScannedData = (function() { - - /** - * Properties of a ScannedData. - * @memberof google.cloud.dataplex.v1 - * @interface IScannedData - * @property {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null} [incrementalField] ScannedData incrementalField - */ - - /** - * Constructs a new ScannedData. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ScannedData. - * @implements IScannedData - * @constructor - * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set - */ - function ScannedData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScannedData incrementalField. - * @member {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null|undefined} incrementalField - * @memberof google.cloud.dataplex.v1.ScannedData - * @instance - */ - ScannedData.prototype.incrementalField = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ScannedData dataRange. - * @member {"incrementalField"|undefined} dataRange - * @memberof google.cloud.dataplex.v1.ScannedData - * @instance - */ - Object.defineProperty(ScannedData.prototype, "dataRange", { - get: $util.oneOfGetter($oneOfFields = ["incrementalField"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ScannedData instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData instance - */ - ScannedData.create = function create(properties) { - return new ScannedData(properties); - }; - - /** - * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScannedData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incrementalField != null && Object.hasOwnProperty.call(message, "incrementalField")) - $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.encode(message.incrementalField, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScannedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScannedData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScannedData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScannedData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScannedData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScannedData message. - * @function verify - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScannedData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { - properties.dataRange = 1; - { - var error = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.verify(message.incrementalField); - if (error) - return "incrementalField." + error; - } - } - return null; - }; - - /** - * Creates a ScannedData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData - */ - ScannedData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ScannedData) - return object; - var message = new $root.google.cloud.dataplex.v1.ScannedData(); - if (object.incrementalField != null) { - if (typeof object.incrementalField !== "object") - throw TypeError(".google.cloud.dataplex.v1.ScannedData.incrementalField: object expected"); - message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.fromObject(object.incrementalField); - } - return message; - }; - - /** - * Creates a plain object from a ScannedData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {google.cloud.dataplex.v1.ScannedData} message ScannedData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScannedData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { - object.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.toObject(message.incrementalField, options); - if (options.oneofs) - object.dataRange = "incrementalField"; - } - return object; - }; - - /** - * Converts this ScannedData to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ScannedData - * @instance - * @returns {Object.} JSON object - */ - ScannedData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ScannedData - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ScannedData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScannedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData"; - }; - - ScannedData.IncrementalField = (function() { - - /** - * Properties of an IncrementalField. - * @memberof google.cloud.dataplex.v1.ScannedData - * @interface IIncrementalField - * @property {string|null} [field] IncrementalField field - * @property {string|null} [start] IncrementalField start - * @property {string|null} [end] IncrementalField end - */ - - /** - * Constructs a new IncrementalField. - * @memberof google.cloud.dataplex.v1.ScannedData - * @classdesc Represents an IncrementalField. - * @implements IIncrementalField - * @constructor - * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set - */ - function IncrementalField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IncrementalField field. - * @member {string} field - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @instance - */ - IncrementalField.prototype.field = ""; - - /** - * IncrementalField start. - * @member {string} start - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @instance - */ - IncrementalField.prototype.start = ""; - - /** - * IncrementalField end. - * @member {string} end - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @instance - */ - IncrementalField.prototype.end = ""; - - /** - * Creates a new IncrementalField instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField instance - */ - IncrementalField.create = function create(properties) { - return new IncrementalField(properties); - }; - - /** - * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncrementalField.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.end); - return writer; - }; - - /** - * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncrementalField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IncrementalField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncrementalField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.start = reader.string(); - break; - } - case 3: { - message.end = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IncrementalField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncrementalField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IncrementalField message. - * @function verify - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IncrementalField.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isString(message.start)) - return "start: string expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isString(message.end)) - return "end: string expected"; - return null; - }; - - /** - * Creates an IncrementalField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField - */ - IncrementalField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ScannedData.IncrementalField) - return object; - var message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); - if (object.field != null) - message.field = String(object.field); - if (object.start != null) - message.start = String(object.start); - if (object.end != null) - message.end = String(object.end); - return message; - }; - - /** - * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {google.cloud.dataplex.v1.ScannedData.IncrementalField} message IncrementalField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IncrementalField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = ""; - object.start = ""; - object.end = ""; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - 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 IncrementalField to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @instance - * @returns {Object.} JSON object - */ - IncrementalField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IncrementalField - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IncrementalField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData.IncrementalField"; - }; - - return IncrementalField; - })(); - - return ScannedData; - })(); - - v1.DataQualitySpec = (function() { - - /** - * Properties of a DataQualitySpec. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualitySpec - * @property {Array.|null} [rules] DataQualitySpec rules - * @property {number|null} [samplingPercent] DataQualitySpec samplingPercent - * @property {string|null} [rowFilter] DataQualitySpec rowFilter - * @property {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null} [postScanActions] DataQualitySpec postScanActions - */ - - /** - * Constructs a new DataQualitySpec. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualitySpec. - * @implements IDataQualitySpec - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set - */ - function DataQualitySpec(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]]; - } - - /** - * DataQualitySpec rules. - * @member {Array.} rules - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @instance - */ - DataQualitySpec.prototype.rules = $util.emptyArray; - - /** - * DataQualitySpec samplingPercent. - * @member {number} samplingPercent - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @instance - */ - DataQualitySpec.prototype.samplingPercent = 0; - - /** - * DataQualitySpec rowFilter. - * @member {string} rowFilter - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @instance - */ - DataQualitySpec.prototype.rowFilter = ""; - - /** - * DataQualitySpec postScanActions. - * @member {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions|null|undefined} postScanActions - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @instance - */ - DataQualitySpec.prototype.postScanActions = null; - - /** - * Creates a new DataQualitySpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec instance - */ - DataQualitySpec.create = function create(properties) { - return new DataQualitySpec(properties); - }; - - /** - * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualitySpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.samplingPercent); - if (message.rowFilter != null && Object.hasOwnProperty.call(message, "rowFilter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.rowFilter); - if (message.postScanActions != null && Object.hasOwnProperty.call(message, "postScanActions")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.encode(message.postScanActions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualitySpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualitySpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); - 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.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32())); - break; - } - case 4: { - message.samplingPercent = reader.float(); - break; - } - case 5: { - message.rowFilter = reader.string(); - break; - } - case 6: { - message.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualitySpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualitySpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualitySpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - if (typeof message.samplingPercent !== "number") - return "samplingPercent: number expected"; - if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) - if (!$util.isString(message.rowFilter)) - return "rowFilter: string expected"; - if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify(message.postScanActions); - if (error) - return "postScanActions." + error; - } - return null; - }; - - /** - * Creates a DataQualitySpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec - */ - DataQualitySpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: object expected"); - message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rules[i]); - } - } - if (object.samplingPercent != null) - message.samplingPercent = Number(object.samplingPercent); - if (object.rowFilter != null) - message.rowFilter = String(object.rowFilter); - if (object.postScanActions != null) { - if (typeof object.postScanActions !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.postScanActions: object expected"); - message.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.fromObject(object.postScanActions); - } - return message; - }; - - /** - * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec} message DataQualitySpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualitySpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) { - object.samplingPercent = 0; - object.rowFilter = ""; - object.postScanActions = null; - } - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rules[j], options); - } - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; - if (message.rowFilter != null && message.hasOwnProperty("rowFilter")) - object.rowFilter = message.rowFilter; - if (message.postScanActions != null && message.hasOwnProperty("postScanActions")) - object.postScanActions = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.toObject(message.postScanActions, options); - return object; - }; - - /** - * Converts this DataQualitySpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @instance - * @returns {Object.} JSON object - */ - DataQualitySpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualitySpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec"; - }; - - DataQualitySpec.PostScanActions = (function() { - - /** - * Properties of a PostScanActions. - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @interface IPostScanActions - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null} [bigqueryExport] PostScanActions bigqueryExport - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null} [notificationReport] PostScanActions notificationReport - */ - - /** - * Constructs a new PostScanActions. - * @memberof google.cloud.dataplex.v1.DataQualitySpec - * @classdesc Represents a PostScanActions. - * @implements IPostScanActions - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions=} [properties] Properties to set - */ - function PostScanActions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostScanActions bigqueryExport. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport|null|undefined} bigqueryExport - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @instance - */ - PostScanActions.prototype.bigqueryExport = null; - - /** - * PostScanActions notificationReport. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport|null|undefined} notificationReport - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @instance - */ - PostScanActions.prototype.notificationReport = null; - - /** - * Creates a new PostScanActions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions instance - */ - PostScanActions.create = function create(properties) { - return new PostScanActions(properties); - }; - - /** - * Encodes the specified PostScanActions message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions} message PostScanActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryExport != null && Object.hasOwnProperty.call(message, "bigqueryExport")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.encode(message.bigqueryExport, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.notificationReport != null && Object.hasOwnProperty.call(message, "notificationReport")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.encode(message.notificationReport, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostScanActions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.IPostScanActions} message PostScanActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostScanActions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostScanActions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostScanActions message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostScanActions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify(message.bigqueryExport); - if (error) - return "bigqueryExport." + error; - } - if (message.notificationReport != null && message.hasOwnProperty("notificationReport")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify(message.notificationReport); - if (error) - return "notificationReport." + error; - } - return null; - }; - - /** - * Creates a PostScanActions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} PostScanActions - */ - PostScanActions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(); - if (object.bigqueryExport != null) { - if (typeof object.bigqueryExport !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.bigqueryExport: object expected"); - message.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.fromObject(object.bigqueryExport); - } - if (object.notificationReport != null) { - if (typeof object.notificationReport !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.notificationReport: object expected"); - message.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.fromObject(object.notificationReport); - } - return message; - }; - - /** - * Creates a plain object from a PostScanActions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} message PostScanActions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostScanActions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bigqueryExport = null; - object.notificationReport = null; - } - if (message.bigqueryExport != null && message.hasOwnProperty("bigqueryExport")) - object.bigqueryExport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.toObject(message.bigqueryExport, options); - if (message.notificationReport != null && message.hasOwnProperty("notificationReport")) - object.notificationReport = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.toObject(message.notificationReport, options); - return object; - }; - - /** - * Converts this PostScanActions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @instance - * @returns {Object.} JSON object - */ - PostScanActions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostScanActions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostScanActions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"; - }; - - PostScanActions.BigQueryExport = (function() { - - /** - * Properties of a BigQueryExport. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface IBigQueryExport - * @property {string|null} [resultsTable] BigQueryExport resultsTable - */ - - /** - * Constructs a new BigQueryExport. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a BigQueryExport. - * @implements IBigQueryExport - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport=} [properties] Properties to set - */ - function BigQueryExport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryExport resultsTable. - * @member {string} resultsTable - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @instance - */ - BigQueryExport.prototype.resultsTable = ""; - - /** - * Creates a new BigQueryExport instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport instance - */ - BigQueryExport.create = function create(properties) { - return new BigQueryExport(properties); - }; - - /** - * Encodes the specified BigQueryExport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resultsTable != null && Object.hasOwnProperty.call(message, "resultsTable")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resultsTable); - return writer; - }; - - /** - * Encodes the specified BigQueryExport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IBigQueryExport} message BigQueryExport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resultsTable = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryExport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryExport message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryExport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) - if (!$util.isString(message.resultsTable)) - return "resultsTable: string expected"; - return null; - }; - - /** - * Creates a BigQueryExport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} BigQueryExport - */ - BigQueryExport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(); - if (object.resultsTable != null) - message.resultsTable = String(object.resultsTable); - return message; - }; - - /** - * Creates a plain object from a BigQueryExport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} message BigQueryExport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryExport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.resultsTable = ""; - if (message.resultsTable != null && message.hasOwnProperty("resultsTable")) - object.resultsTable = message.resultsTable; - return object; - }; - - /** - * Converts this BigQueryExport to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @instance - * @returns {Object.} JSON object - */ - BigQueryExport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryExport - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryExport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"; - }; - - return BigQueryExport; - })(); - - PostScanActions.Recipients = (function() { - - /** - * Properties of a Recipients. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface IRecipients - * @property {Array.|null} [emails] Recipients emails - */ - - /** - * Constructs a new Recipients. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a Recipients. - * @implements IRecipients - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients=} [properties] Properties to set - */ - function Recipients(properties) { - this.emails = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Recipients emails. - * @member {Array.} emails - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @instance - */ - Recipients.prototype.emails = $util.emptyArray; - - /** - * Creates a new Recipients instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients instance - */ - Recipients.create = function create(properties) { - return new Recipients(properties); - }; - - /** - * Encodes the specified Recipients message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients} message Recipients message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Recipients.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.emails != null && message.emails.length) - for (var i = 0; i < message.emails.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.emails[i]); - return writer; - }; - - /** - * Encodes the specified Recipients message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients} message Recipients message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Recipients.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Recipients message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Recipients.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.emails && message.emails.length)) - message.emails = []; - message.emails.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Recipients message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Recipients.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Recipients message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Recipients.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.emails != null && message.hasOwnProperty("emails")) { - if (!Array.isArray(message.emails)) - return "emails: array expected"; - for (var i = 0; i < message.emails.length; ++i) - if (!$util.isString(message.emails[i])) - return "emails: string[] expected"; - } - return null; - }; - - /** - * Creates a Recipients message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} Recipients - */ - Recipients.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients(); - if (object.emails) { - if (!Array.isArray(object.emails)) - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.emails: array expected"); - message.emails = []; - for (var i = 0; i < object.emails.length; ++i) - message.emails[i] = String(object.emails[i]); - } - return message; - }; - - /** - * Creates a plain object from a Recipients message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients} message Recipients - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Recipients.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.emails = []; - if (message.emails && message.emails.length) { - object.emails = []; - for (var j = 0; j < message.emails.length; ++j) - object.emails[j] = message.emails[j]; - } - return object; - }; - - /** - * Converts this Recipients to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @instance - * @returns {Object.} JSON object - */ - Recipients.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Recipients - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Recipients.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"; - }; - - return Recipients; - })(); - - PostScanActions.ScoreThresholdTrigger = (function() { - - /** - * Properties of a ScoreThresholdTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface IScoreThresholdTrigger - * @property {number|null} [scoreThreshold] ScoreThresholdTrigger scoreThreshold - */ - - /** - * Constructs a new ScoreThresholdTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a ScoreThresholdTrigger. - * @implements IScoreThresholdTrigger - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger=} [properties] Properties to set - */ - function ScoreThresholdTrigger(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScoreThresholdTrigger scoreThreshold. - * @member {number} scoreThreshold - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @instance - */ - ScoreThresholdTrigger.prototype.scoreThreshold = 0; - - /** - * Creates a new ScoreThresholdTrigger instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger instance - */ - ScoreThresholdTrigger.create = function create(properties) { - return new ScoreThresholdTrigger(properties); - }; - - /** - * Encodes the specified ScoreThresholdTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger} message ScoreThresholdTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScoreThresholdTrigger.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scoreThreshold != null && Object.hasOwnProperty.call(message, "scoreThreshold")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.scoreThreshold); - return writer; - }; - - /** - * Encodes the specified ScoreThresholdTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger} message ScoreThresholdTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScoreThresholdTrigger.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScoreThresholdTrigger message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScoreThresholdTrigger.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.scoreThreshold = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScoreThresholdTrigger message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScoreThresholdTrigger.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScoreThresholdTrigger message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScoreThresholdTrigger.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scoreThreshold != null && message.hasOwnProperty("scoreThreshold")) - if (typeof message.scoreThreshold !== "number") - return "scoreThreshold: number expected"; - return null; - }; - - /** - * Creates a ScoreThresholdTrigger message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} ScoreThresholdTrigger - */ - ScoreThresholdTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger(); - if (object.scoreThreshold != null) - message.scoreThreshold = Number(object.scoreThreshold); - return message; - }; - - /** - * Creates a plain object from a ScoreThresholdTrigger message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger} message ScoreThresholdTrigger - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScoreThresholdTrigger.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scoreThreshold = 0; - if (message.scoreThreshold != null && message.hasOwnProperty("scoreThreshold")) - object.scoreThreshold = options.json && !isFinite(message.scoreThreshold) ? String(message.scoreThreshold) : message.scoreThreshold; - return object; - }; - - /** - * Converts this ScoreThresholdTrigger to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @instance - * @returns {Object.} JSON object - */ - ScoreThresholdTrigger.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ScoreThresholdTrigger - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScoreThresholdTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"; - }; - - return ScoreThresholdTrigger; - })(); - - PostScanActions.JobFailureTrigger = (function() { - - /** - * Properties of a JobFailureTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface IJobFailureTrigger - */ - - /** - * Constructs a new JobFailureTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a JobFailureTrigger. - * @implements IJobFailureTrigger - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger=} [properties] Properties to set - */ - function JobFailureTrigger(properties) { - if (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 JobFailureTrigger instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger instance - */ - JobFailureTrigger.create = function create(properties) { - return new JobFailureTrigger(properties); - }; - - /** - * Encodes the specified JobFailureTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger} message JobFailureTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobFailureTrigger.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified JobFailureTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger} message JobFailureTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobFailureTrigger.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JobFailureTrigger message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobFailureTrigger.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JobFailureTrigger message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobFailureTrigger.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JobFailureTrigger message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobFailureTrigger.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a JobFailureTrigger message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} JobFailureTrigger - */ - JobFailureTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger) - return object; - return new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger(); - }; - - /** - * Creates a plain object from a JobFailureTrigger message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger} message JobFailureTrigger - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JobFailureTrigger.toObject = function toObject() { - return {}; - }; - - /** - * Converts this JobFailureTrigger to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @instance - * @returns {Object.} JSON object - */ - JobFailureTrigger.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JobFailureTrigger - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JobFailureTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"; - }; - - return JobFailureTrigger; - })(); - - PostScanActions.JobEndTrigger = (function() { - - /** - * Properties of a JobEndTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface IJobEndTrigger - */ - - /** - * Constructs a new JobEndTrigger. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a JobEndTrigger. - * @implements IJobEndTrigger - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger=} [properties] Properties to set - */ - function JobEndTrigger(properties) { - if (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 JobEndTrigger instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger instance - */ - JobEndTrigger.create = function create(properties) { - return new JobEndTrigger(properties); - }; - - /** - * Encodes the specified JobEndTrigger message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger} message JobEndTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobEndTrigger.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified JobEndTrigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger} message JobEndTrigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobEndTrigger.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JobEndTrigger message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobEndTrigger.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JobEndTrigger message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobEndTrigger.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JobEndTrigger message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobEndTrigger.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a JobEndTrigger message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} JobEndTrigger - */ - JobEndTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger) - return object; - return new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger(); - }; - - /** - * Creates a plain object from a JobEndTrigger message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger} message JobEndTrigger - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JobEndTrigger.toObject = function toObject() { - return {}; - }; - - /** - * Converts this JobEndTrigger to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @instance - * @returns {Object.} JSON object - */ - JobEndTrigger.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JobEndTrigger - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JobEndTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"; - }; - - return JobEndTrigger; - })(); - - PostScanActions.NotificationReport = (function() { - - /** - * Properties of a NotificationReport. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @interface INotificationReport - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null} [recipients] NotificationReport recipients - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null} [scoreThresholdTrigger] NotificationReport scoreThresholdTrigger - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null} [jobFailureTrigger] NotificationReport jobFailureTrigger - * @property {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null} [jobEndTrigger] NotificationReport jobEndTrigger - */ - - /** - * Constructs a new NotificationReport. - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - * @classdesc Represents a NotificationReport. - * @implements INotificationReport - * @constructor - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport=} [properties] Properties to set - */ - function NotificationReport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NotificationReport recipients. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IRecipients|null|undefined} recipients - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @instance - */ - NotificationReport.prototype.recipients = null; - - /** - * NotificationReport scoreThresholdTrigger. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IScoreThresholdTrigger|null|undefined} scoreThresholdTrigger - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @instance - */ - NotificationReport.prototype.scoreThresholdTrigger = null; - - /** - * NotificationReport jobFailureTrigger. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobFailureTrigger|null|undefined} jobFailureTrigger - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @instance - */ - NotificationReport.prototype.jobFailureTrigger = null; - - /** - * NotificationReport jobEndTrigger. - * @member {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.IJobEndTrigger|null|undefined} jobEndTrigger - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @instance - */ - NotificationReport.prototype.jobEndTrigger = null; - - /** - * Creates a new NotificationReport instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport instance - */ - NotificationReport.create = function create(properties) { - return new NotificationReport(properties); - }; - - /** - * Encodes the specified NotificationReport message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport} message NotificationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recipients != null && Object.hasOwnProperty.call(message, "recipients")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.encode(message.recipients, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.scoreThresholdTrigger != null && Object.hasOwnProperty.call(message, "scoreThresholdTrigger")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.encode(message.scoreThresholdTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.jobFailureTrigger != null && Object.hasOwnProperty.call(message, "jobFailureTrigger")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.encode(message.jobFailureTrigger, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jobEndTrigger != null && Object.hasOwnProperty.call(message, "jobEndTrigger")) - $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.encode(message.jobEndTrigger, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NotificationReport message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.INotificationReport} message NotificationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotificationReport message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.decode(reader, reader.uint32()); - break; - } - case 2: { - message.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.decode(reader, reader.uint32()); - break; - } - case 4: { - message.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.decode(reader, reader.uint32()); - break; - } - case 5: { - message.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotificationReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotificationReport message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recipients != null && message.hasOwnProperty("recipients")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.verify(message.recipients); - if (error) - return "recipients." + error; - } - if (message.scoreThresholdTrigger != null && message.hasOwnProperty("scoreThresholdTrigger")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.verify(message.scoreThresholdTrigger); - if (error) - return "scoreThresholdTrigger." + error; - } - if (message.jobFailureTrigger != null && message.hasOwnProperty("jobFailureTrigger")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.verify(message.jobFailureTrigger); - if (error) - return "jobFailureTrigger." + error; - } - if (message.jobEndTrigger != null && message.hasOwnProperty("jobEndTrigger")) { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.verify(message.jobEndTrigger); - if (error) - return "jobEndTrigger." + error; - } - return null; - }; - - /** - * Creates a NotificationReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} NotificationReport - */ - NotificationReport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport(); - if (object.recipients != null) { - if (typeof object.recipients !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.recipients: object expected"); - message.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.fromObject(object.recipients); - } - if (object.scoreThresholdTrigger != null) { - if (typeof object.scoreThresholdTrigger !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.scoreThresholdTrigger: object expected"); - message.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.fromObject(object.scoreThresholdTrigger); - } - if (object.jobFailureTrigger != null) { - if (typeof object.jobFailureTrigger !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.jobFailureTrigger: object expected"); - message.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.fromObject(object.jobFailureTrigger); - } - if (object.jobEndTrigger != null) { - if (typeof object.jobEndTrigger !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport.jobEndTrigger: object expected"); - message.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.fromObject(object.jobEndTrigger); - } - return message; - }; - - /** - * Creates a plain object from a NotificationReport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport} message NotificationReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.recipients = null; - object.scoreThresholdTrigger = null; - object.jobFailureTrigger = null; - object.jobEndTrigger = null; - } - if (message.recipients != null && message.hasOwnProperty("recipients")) - object.recipients = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients.toObject(message.recipients, options); - if (message.scoreThresholdTrigger != null && message.hasOwnProperty("scoreThresholdTrigger")) - object.scoreThresholdTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger.toObject(message.scoreThresholdTrigger, options); - if (message.jobFailureTrigger != null && message.hasOwnProperty("jobFailureTrigger")) - object.jobFailureTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger.toObject(message.jobFailureTrigger, options); - if (message.jobEndTrigger != null && message.hasOwnProperty("jobEndTrigger")) - object.jobEndTrigger = $root.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger.toObject(message.jobEndTrigger, options); - return object; - }; - - /** - * Converts this NotificationReport to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @instance - * @returns {Object.} JSON object - */ - NotificationReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NotificationReport - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotificationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"; - }; - - return NotificationReport; - })(); - - return PostScanActions; - })(); - - return DataQualitySpec; - })(); - - v1.DataQualityResult = (function() { - - /** - * Properties of a DataQualityResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityResult - * @property {boolean|null} [passed] DataQualityResult passed - * @property {number|null} [score] DataQualityResult score - * @property {Array.|null} [dimensions] DataQualityResult dimensions - * @property {Array.|null} [columns] DataQualityResult columns - * @property {Array.|null} [rules] DataQualityResult rules - * @property {number|Long|null} [rowCount] DataQualityResult rowCount - * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataQualityResult scannedData - * @property {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null} [postScanActionsResult] DataQualityResult postScanActionsResult - */ - - /** - * Constructs a new DataQualityResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityResult. - * @implements IDataQualityResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set - */ - function DataQualityResult(properties) { - this.dimensions = []; - this.columns = []; - 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]]; - } - - /** - * DataQualityResult passed. - * @member {boolean} passed - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.passed = false; - - /** - * DataQualityResult score. - * @member {number|null|undefined} score - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.score = null; - - /** - * DataQualityResult dimensions. - * @member {Array.} dimensions - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.dimensions = $util.emptyArray; - - /** - * DataQualityResult columns. - * @member {Array.} columns - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.columns = $util.emptyArray; - - /** - * DataQualityResult rules. - * @member {Array.} rules - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.rules = $util.emptyArray; - - /** - * DataQualityResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityResult scannedData. - * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.scannedData = null; - - /** - * DataQualityResult postScanActionsResult. - * @member {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult|null|undefined} postScanActionsResult - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - DataQualityResult.prototype.postScanActionsResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataQualityResult _score. - * @member {"score"|undefined} _score - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - */ - Object.defineProperty(DataQualityResult.prototype, "_score", { - get: $util.oneOfGetter($oneOfFields = ["score"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataQualityResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult instance - */ - DataQualityResult.create = function create(properties) { - return new DataQualityResult(properties); - }; - - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimensions != null && message.dimensions.length) - for (var i = 0; i < message.dimensions.length; ++i) - $root.google.cloud.dataplex.v1.DataQualityDimensionResult.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.dataplex.v1.DataQualityRuleResult.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowCount); - if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passed); - if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) - $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) - $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.score); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.dataplex.v1.DataQualityColumnResult.encode(message.columns[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.passed = reader.bool(); - break; - } - case 9: { - message.score = reader.float(); - break; - } - case 2: { - if (!(message.dimensions && message.dimensions.length)) - message.dimensions = []; - message.dimensions.push($root.google.cloud.dataplex.v1.DataQualityDimensionResult.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.dataplex.v1.DataQualityColumnResult.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.cloud.dataplex.v1.DataQualityRuleResult.decode(reader, reader.uint32())); - break; - } - case 4: { - message.rowCount = reader.int64(); - break; - } - case 7: { - message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); - break; - } - case 8: { - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.passed != null && message.hasOwnProperty("passed")) - if (typeof message.passed !== "boolean") - return "passed: boolean expected"; - if (message.score != null && message.hasOwnProperty("score")) { - properties._score = 1; - if (typeof message.score !== "number") - return "score: number expected"; - } - if (message.dimensions != null && message.hasOwnProperty("dimensions")) { - if (!Array.isArray(message.dimensions)) - return "dimensions: array expected"; - for (var i = 0; i < message.dimensions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.verify(message.dimensions[i]); - if (error) - return "dimensions." + error; - } - } - 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.dataplex.v1.DataQualityColumnResult.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataQualityRuleResult.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - if (message.scannedData != null && message.hasOwnProperty("scannedData")) { - var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); - if (error) - return "scannedData." + error; - } - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { - var error = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify(message.postScanActionsResult); - if (error) - return "postScanActionsResult." + error; - } - return null; - }; - - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult - */ - DataQualityResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityResult(); - if (object.passed != null) - message.passed = Boolean(object.passed); - if (object.score != null) - message.score = Number(object.score); - if (object.dimensions) { - if (!Array.isArray(object.dimensions)) - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: array expected"); - message.dimensions = []; - for (var i = 0; i < object.dimensions.length; ++i) { - if (typeof object.dimensions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: object expected"); - message.dimensions[i] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.fromObject(object.dimensions[i]); - } - } - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.columns: object expected"); - message.columns[i] = $root.google.cloud.dataplex.v1.DataQualityColumnResult.fromObject(object.columns[i]); - } - } - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: object expected"); - message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.fromObject(object.rules[i]); - } - } - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - if (object.scannedData != null) { - if (typeof object.scannedData !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.scannedData: object expected"); - message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); - } - if (object.postScanActionsResult != null) { - if (typeof object.postScanActionsResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.postScanActionsResult: object expected"); - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.fromObject(object.postScanActionsResult); - } - return message; - }; - - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult} message DataQualityResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dimensions = []; - object.rules = []; - object.columns = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - object.passed = false; - object.scannedData = null; - object.postScanActionsResult = null; - } - if (message.dimensions && message.dimensions.length) { - object.dimensions = []; - for (var j = 0; j < message.dimensions.length; ++j) - object.dimensions[j] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.toObject(message.dimensions[j], options); - } - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.toObject(message.rules[j], options); - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - if (message.passed != null && message.hasOwnProperty("passed")) - object.passed = message.passed; - if (message.scannedData != null && message.hasOwnProperty("scannedData")) - object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) - object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.toObject(message.postScanActionsResult, options); - if (message.score != null && message.hasOwnProperty("score")) { - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (options.oneofs) - object._score = "score"; - } - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.dataplex.v1.DataQualityColumnResult.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this DataQualityResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult"; - }; - - DataQualityResult.PostScanActionsResult = (function() { - - /** - * Properties of a PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @interface IPostScanActionsResult - * @property {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult - */ - - /** - * Constructs a new PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataQualityResult - * @classdesc Represents a PostScanActionsResult. - * @implements IPostScanActionsResult - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult=} [properties] Properties to set - */ - function PostScanActionsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostScanActionsResult bigqueryExportResult. - * @member {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @instance - */ - PostScanActionsResult.prototype.bigqueryExportResult = null; - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult instance - */ - PostScanActionsResult.create = function create(properties) { - return new PostScanActionsResult(properties); - }; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) - $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostScanActionsResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostScanActionsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { - var error = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); - if (error) - return "bigqueryExportResult." + error; - } - return null; - }; - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} PostScanActionsResult - */ - PostScanActionsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(); - if (object.bigqueryExportResult != null) { - if (typeof object.bigqueryExportResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.bigqueryExportResult: object expected"); - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); - } - return message; - }; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} message PostScanActionsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostScanActionsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryExportResult = null; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) - object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); - return object; - }; - - /** - * Converts this PostScanActionsResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @instance - * @returns {Object.} JSON object - */ - PostScanActionsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostScanActionsResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"; - }; - - PostScanActionsResult.BigQueryExportResult = (function() { - - /** - * Properties of a BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @interface IBigQueryExportResult - * @property {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state - * @property {string|null} [message] BigQueryExportResult message - */ - - /** - * Constructs a new BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - * @classdesc Represents a BigQueryExportResult. - * @implements IBigQueryExportResult - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - */ - function BigQueryExportResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryExportResult state. - * @member {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State} state - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.state = 0; - - /** - * BigQueryExportResult message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.message = ""; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance - */ - BigQueryExportResult.create = function create(properties) { - return new BigQueryExportResult(properties); - }; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - return writer; - }; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryExportResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - */ - BigQueryExportResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "SKIPPED": - case 3: - message.state = 3; - break; - } - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryExportResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this BigQueryExportResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @instance - * @returns {Object.} JSON object - */ - BigQueryExportResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryExportResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} SKIPPED=3 SKIPPED value - */ - BigQueryExportResult.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "SKIPPED"] = 3; - return values; - })(); - - return BigQueryExportResult; - })(); - - return PostScanActionsResult; - })(); - - return DataQualityResult; - })(); - - v1.DataQualityRuleResult = (function() { - - /** - * Properties of a DataQualityRuleResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityRuleResult - * @property {google.cloud.dataplex.v1.IDataQualityRule|null} [rule] DataQualityRuleResult rule - * @property {boolean|null} [passed] DataQualityRuleResult passed - * @property {number|Long|null} [evaluatedCount] DataQualityRuleResult evaluatedCount - * @property {number|Long|null} [passedCount] DataQualityRuleResult passedCount - * @property {number|Long|null} [nullCount] DataQualityRuleResult nullCount - * @property {number|null} [passRatio] DataQualityRuleResult passRatio - * @property {string|null} [failingRowsQuery] DataQualityRuleResult failingRowsQuery - * @property {number|Long|null} [assertionRowCount] DataQualityRuleResult assertionRowCount - */ - - /** - * Constructs a new DataQualityRuleResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityRuleResult. - * @implements IDataQualityRuleResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set - */ - function DataQualityRuleResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityRuleResult rule. - * @member {google.cloud.dataplex.v1.IDataQualityRule|null|undefined} rule - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.rule = null; - - /** - * DataQualityRuleResult passed. - * @member {boolean} passed - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.passed = false; - - /** - * DataQualityRuleResult evaluatedCount. - * @member {number|Long} evaluatedCount - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.evaluatedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityRuleResult passedCount. - * @member {number|Long} passedCount - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.passedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityRuleResult nullCount. - * @member {number|Long} nullCount - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.nullCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityRuleResult passRatio. - * @member {number} passRatio - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.passRatio = 0; - - /** - * DataQualityRuleResult failingRowsQuery. - * @member {string} failingRowsQuery - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.failingRowsQuery = ""; - - /** - * DataQualityRuleResult assertionRowCount. - * @member {number|Long} assertionRowCount - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - */ - DataQualityRuleResult.prototype.assertionRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataQualityRuleResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult instance - */ - DataQualityRuleResult.create = function create(properties) { - return new DataQualityRuleResult(properties); - }; - - /** - * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityRuleResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) - $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nullCount != null && Object.hasOwnProperty.call(message, "nullCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.nullCount); - if (message.passRatio != null && Object.hasOwnProperty.call(message, "passRatio")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.passRatio); - if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.passed); - if (message.passedCount != null && Object.hasOwnProperty.call(message, "passedCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.passedCount); - if (message.evaluatedCount != null && Object.hasOwnProperty.call(message, "evaluatedCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.evaluatedCount); - if (message.failingRowsQuery != null && Object.hasOwnProperty.call(message, "failingRowsQuery")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.failingRowsQuery); - if (message.assertionRowCount != null && Object.hasOwnProperty.call(message, "assertionRowCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.assertionRowCount); - return writer; - }; - - /** - * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityRuleResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityRuleResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityRuleResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32()); - break; - } - case 7: { - message.passed = reader.bool(); - break; - } - case 9: { - message.evaluatedCount = reader.int64(); - break; - } - case 8: { - message.passedCount = reader.int64(); - break; - } - case 5: { - message.nullCount = reader.int64(); - break; - } - case 6: { - message.passRatio = reader.double(); - break; - } - case 10: { - message.failingRowsQuery = reader.string(); - break; - } - case 11: { - message.assertionRowCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityRuleResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityRuleResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityRuleResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rule != null && message.hasOwnProperty("rule")) { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rule); - if (error) - return "rule." + error; - } - if (message.passed != null && message.hasOwnProperty("passed")) - if (typeof message.passed !== "boolean") - return "passed: boolean expected"; - if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) - if (!$util.isInteger(message.evaluatedCount) && !(message.evaluatedCount && $util.isInteger(message.evaluatedCount.low) && $util.isInteger(message.evaluatedCount.high))) - return "evaluatedCount: integer|Long expected"; - if (message.passedCount != null && message.hasOwnProperty("passedCount")) - if (!$util.isInteger(message.passedCount) && !(message.passedCount && $util.isInteger(message.passedCount.low) && $util.isInteger(message.passedCount.high))) - return "passedCount: integer|Long expected"; - if (message.nullCount != null && message.hasOwnProperty("nullCount")) - if (!$util.isInteger(message.nullCount) && !(message.nullCount && $util.isInteger(message.nullCount.low) && $util.isInteger(message.nullCount.high))) - return "nullCount: integer|Long expected"; - if (message.passRatio != null && message.hasOwnProperty("passRatio")) - if (typeof message.passRatio !== "number") - return "passRatio: number expected"; - if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) - if (!$util.isString(message.failingRowsQuery)) - return "failingRowsQuery: string expected"; - if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) - if (!$util.isInteger(message.assertionRowCount) && !(message.assertionRowCount && $util.isInteger(message.assertionRowCount.low) && $util.isInteger(message.assertionRowCount.high))) - return "assertionRowCount: integer|Long expected"; - return null; - }; - - /** - * Creates a DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult - */ - DataQualityRuleResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRuleResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); - if (object.rule != null) { - if (typeof object.rule !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRuleResult.rule: object expected"); - message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rule); - } - if (object.passed != null) - message.passed = Boolean(object.passed); - if (object.evaluatedCount != null) - if ($util.Long) - (message.evaluatedCount = $util.Long.fromValue(object.evaluatedCount)).unsigned = false; - else if (typeof object.evaluatedCount === "string") - message.evaluatedCount = parseInt(object.evaluatedCount, 10); - else if (typeof object.evaluatedCount === "number") - message.evaluatedCount = object.evaluatedCount; - else if (typeof object.evaluatedCount === "object") - message.evaluatedCount = new $util.LongBits(object.evaluatedCount.low >>> 0, object.evaluatedCount.high >>> 0).toNumber(); - if (object.passedCount != null) - if ($util.Long) - (message.passedCount = $util.Long.fromValue(object.passedCount)).unsigned = false; - else if (typeof object.passedCount === "string") - message.passedCount = parseInt(object.passedCount, 10); - else if (typeof object.passedCount === "number") - message.passedCount = object.passedCount; - else if (typeof object.passedCount === "object") - message.passedCount = new $util.LongBits(object.passedCount.low >>> 0, object.passedCount.high >>> 0).toNumber(); - if (object.nullCount != null) - if ($util.Long) - (message.nullCount = $util.Long.fromValue(object.nullCount)).unsigned = false; - else if (typeof object.nullCount === "string") - message.nullCount = parseInt(object.nullCount, 10); - else if (typeof object.nullCount === "number") - message.nullCount = object.nullCount; - else if (typeof object.nullCount === "object") - message.nullCount = new $util.LongBits(object.nullCount.low >>> 0, object.nullCount.high >>> 0).toNumber(); - if (object.passRatio != null) - message.passRatio = Number(object.passRatio); - if (object.failingRowsQuery != null) - message.failingRowsQuery = String(object.failingRowsQuery); - if (object.assertionRowCount != null) - if ($util.Long) - (message.assertionRowCount = $util.Long.fromValue(object.assertionRowCount)).unsigned = false; - else if (typeof object.assertionRowCount === "string") - message.assertionRowCount = parseInt(object.assertionRowCount, 10); - else if (typeof object.assertionRowCount === "number") - message.assertionRowCount = object.assertionRowCount; - else if (typeof object.assertionRowCount === "object") - message.assertionRowCount = new $util.LongBits(object.assertionRowCount.low >>> 0, object.assertionRowCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityRuleResult} message DataQualityRuleResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityRuleResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rule = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nullCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nullCount = options.longs === String ? "0" : 0; - object.passRatio = 0; - object.passed = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.passedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.passedCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.evaluatedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.evaluatedCount = options.longs === String ? "0" : 0; - object.failingRowsQuery = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.assertionRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.assertionRowCount = options.longs === String ? "0" : 0; - } - if (message.rule != null && message.hasOwnProperty("rule")) - object.rule = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rule, options); - if (message.nullCount != null && message.hasOwnProperty("nullCount")) - if (typeof message.nullCount === "number") - object.nullCount = options.longs === String ? String(message.nullCount) : message.nullCount; - else - object.nullCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullCount) : options.longs === Number ? new $util.LongBits(message.nullCount.low >>> 0, message.nullCount.high >>> 0).toNumber() : message.nullCount; - if (message.passRatio != null && message.hasOwnProperty("passRatio")) - object.passRatio = options.json && !isFinite(message.passRatio) ? String(message.passRatio) : message.passRatio; - if (message.passed != null && message.hasOwnProperty("passed")) - object.passed = message.passed; - if (message.passedCount != null && message.hasOwnProperty("passedCount")) - if (typeof message.passedCount === "number") - object.passedCount = options.longs === String ? String(message.passedCount) : message.passedCount; - else - object.passedCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedCount) : options.longs === Number ? new $util.LongBits(message.passedCount.low >>> 0, message.passedCount.high >>> 0).toNumber() : message.passedCount; - if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) - if (typeof message.evaluatedCount === "number") - object.evaluatedCount = options.longs === String ? String(message.evaluatedCount) : message.evaluatedCount; - else - object.evaluatedCount = options.longs === String ? $util.Long.prototype.toString.call(message.evaluatedCount) : options.longs === Number ? new $util.LongBits(message.evaluatedCount.low >>> 0, message.evaluatedCount.high >>> 0).toNumber() : message.evaluatedCount; - if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) - object.failingRowsQuery = message.failingRowsQuery; - if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) - if (typeof message.assertionRowCount === "number") - object.assertionRowCount = options.longs === String ? String(message.assertionRowCount) : message.assertionRowCount; - else - object.assertionRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.assertionRowCount) : options.longs === Number ? new $util.LongBits(message.assertionRowCount.low >>> 0, message.assertionRowCount.high >>> 0).toNumber() : message.assertionRowCount; - return object; - }; - - /** - * Converts this DataQualityRuleResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityRuleResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityRuleResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRuleResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityRuleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRuleResult"; - }; - - return DataQualityRuleResult; - })(); - - v1.DataQualityDimensionResult = (function() { - - /** - * Properties of a DataQualityDimensionResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityDimensionResult - * @property {google.cloud.dataplex.v1.IDataQualityDimension|null} [dimension] DataQualityDimensionResult dimension - * @property {boolean|null} [passed] DataQualityDimensionResult passed - * @property {number|null} [score] DataQualityDimensionResult score - */ - - /** - * Constructs a new DataQualityDimensionResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityDimensionResult. - * @implements IDataQualityDimensionResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set - */ - function DataQualityDimensionResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityDimensionResult dimension. - * @member {google.cloud.dataplex.v1.IDataQualityDimension|null|undefined} dimension - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @instance - */ - DataQualityDimensionResult.prototype.dimension = null; - - /** - * DataQualityDimensionResult passed. - * @member {boolean} passed - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @instance - */ - DataQualityDimensionResult.prototype.passed = false; - - /** - * DataQualityDimensionResult score. - * @member {number|null|undefined} score - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @instance - */ - DataQualityDimensionResult.prototype.score = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataQualityDimensionResult _score. - * @member {"score"|undefined} _score - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @instance - */ - Object.defineProperty(DataQualityDimensionResult.prototype, "_score", { - get: $util.oneOfGetter($oneOfFields = ["score"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataQualityDimensionResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult instance - */ - DataQualityDimensionResult.create = function create(properties) { - return new DataQualityDimensionResult(properties); - }; - - /** - * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityDimensionResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - $root.google.cloud.dataplex.v1.DataQualityDimension.encode(message.dimension, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passed); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); - return writer; - }; - - /** - * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityDimensionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityDimensionResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityDimensionResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.decode(reader, reader.uint32()); - break; - } - case 3: { - message.passed = reader.bool(); - break; - } - case 4: { - message.score = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityDimensionResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityDimensionResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityDimensionResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dimension != null && message.hasOwnProperty("dimension")) { - var error = $root.google.cloud.dataplex.v1.DataQualityDimension.verify(message.dimension); - if (error) - return "dimension." + error; - } - if (message.passed != null && message.hasOwnProperty("passed")) - if (typeof message.passed !== "boolean") - return "passed: boolean expected"; - if (message.score != null && message.hasOwnProperty("score")) { - properties._score = 1; - if (typeof message.score !== "number") - return "score: number expected"; - } - return null; - }; - - /** - * Creates a DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult - */ - DataQualityDimensionResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityDimensionResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); - if (object.dimension != null) { - if (typeof object.dimension !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityDimensionResult.dimension: object expected"); - message.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.fromObject(object.dimension); - } - if (object.passed != null) - message.passed = Boolean(object.passed); - if (object.score != null) - message.score = Number(object.score); - return message; - }; - - /** - * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityDimensionResult} message DataQualityDimensionResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityDimensionResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dimension = null; - object.passed = false; - } - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = $root.google.cloud.dataplex.v1.DataQualityDimension.toObject(message.dimension, options); - if (message.passed != null && message.hasOwnProperty("passed")) - object.passed = message.passed; - if (message.score != null && message.hasOwnProperty("score")) { - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (options.oneofs) - object._score = "score"; - } - return object; - }; - - /** - * Converts this DataQualityDimensionResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityDimensionResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityDimensionResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityDimensionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityDimensionResult"; - }; - - return DataQualityDimensionResult; - })(); - - v1.DataQualityDimension = (function() { - - /** - * Properties of a DataQualityDimension. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityDimension - * @property {string|null} [name] DataQualityDimension name - */ - - /** - * Constructs a new DataQualityDimension. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityDimension. - * @implements IDataQualityDimension - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityDimension=} [properties] Properties to set - */ - function DataQualityDimension(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityDimension name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @instance - */ - DataQualityDimension.prototype.name = ""; - - /** - * Creates a new DataQualityDimension instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimension=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension instance - */ - DataQualityDimension.create = function create(properties) { - return new DataQualityDimension(properties); - }; - - /** - * Encodes the specified DataQualityDimension message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimension} message DataQualityDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityDimension.encode = function encode(message, writer) { - 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 DataQualityDimension message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimension.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {google.cloud.dataplex.v1.IDataQualityDimension} message DataQualityDimension message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityDimension.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityDimension message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityDimension.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityDimension(); - 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 DataQualityDimension message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityDimension.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityDimension message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityDimension.verify = function verify(message) { - if (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 DataQualityDimension message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityDimension} DataQualityDimension - */ - DataQualityDimension.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityDimension) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityDimension(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DataQualityDimension message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {google.cloud.dataplex.v1.DataQualityDimension} message DataQualityDimension - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityDimension.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 DataQualityDimension to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @instance - * @returns {Object.} JSON object - */ - DataQualityDimension.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityDimension - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityDimension - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityDimension"; - }; - - return DataQualityDimension; - })(); - - v1.DataQualityRule = (function() { - - /** - * Properties of a DataQualityRule. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityRule - * @property {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null} [rangeExpectation] DataQualityRule rangeExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null} [nonNullExpectation] DataQualityRule nonNullExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null} [setExpectation] DataQualityRule setExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null} [regexExpectation] DataQualityRule regexExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null} [uniquenessExpectation] DataQualityRule uniquenessExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null} [statisticRangeExpectation] DataQualityRule statisticRangeExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null} [rowConditionExpectation] DataQualityRule rowConditionExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null} [tableConditionExpectation] DataQualityRule tableConditionExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null} [sqlAssertion] DataQualityRule sqlAssertion - * @property {string|null} [column] DataQualityRule column - * @property {boolean|null} [ignoreNull] DataQualityRule ignoreNull - * @property {string|null} [dimension] DataQualityRule dimension - * @property {number|null} [threshold] DataQualityRule threshold - * @property {string|null} [name] DataQualityRule name - * @property {string|null} [description] DataQualityRule description - * @property {boolean|null} [suspended] DataQualityRule suspended - */ - - /** - * Constructs a new DataQualityRule. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityRule. - * @implements IDataQualityRule - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set - */ - function DataQualityRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityRule rangeExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null|undefined} rangeExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.rangeExpectation = null; - - /** - * DataQualityRule nonNullExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null|undefined} nonNullExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.nonNullExpectation = null; - - /** - * DataQualityRule setExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null|undefined} setExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.setExpectation = null; - - /** - * DataQualityRule regexExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null|undefined} regexExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.regexExpectation = null; - - /** - * DataQualityRule uniquenessExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null|undefined} uniquenessExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.uniquenessExpectation = null; - - /** - * DataQualityRule statisticRangeExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null|undefined} statisticRangeExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.statisticRangeExpectation = null; - - /** - * DataQualityRule rowConditionExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null|undefined} rowConditionExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.rowConditionExpectation = null; - - /** - * DataQualityRule tableConditionExpectation. - * @member {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null|undefined} tableConditionExpectation - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.tableConditionExpectation = null; - - /** - * DataQualityRule sqlAssertion. - * @member {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion|null|undefined} sqlAssertion - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.sqlAssertion = null; - - /** - * DataQualityRule column. - * @member {string} column - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.column = ""; - - /** - * DataQualityRule ignoreNull. - * @member {boolean} ignoreNull - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.ignoreNull = false; - - /** - * DataQualityRule dimension. - * @member {string} dimension - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.dimension = ""; - - /** - * DataQualityRule threshold. - * @member {number} threshold - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.threshold = 0; - - /** - * DataQualityRule name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.name = ""; - - /** - * DataQualityRule description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.description = ""; - - /** - * DataQualityRule suspended. - * @member {boolean} suspended - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - DataQualityRule.prototype.suspended = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataQualityRule ruleType. - * @member {"rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|"sqlAssertion"|undefined} ruleType - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - */ - Object.defineProperty(DataQualityRule.prototype, "ruleType", { - get: $util.oneOfGetter($oneOfFields = ["rangeExpectation", "nonNullExpectation", "setExpectation", "regexExpectation", "uniquenessExpectation", "statisticRangeExpectation", "rowConditionExpectation", "tableConditionExpectation", "sqlAssertion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataQualityRule instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule instance - */ - DataQualityRule.create = function create(properties) { - return new DataQualityRule(properties); - }; - - /** - * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rangeExpectation != null && Object.hasOwnProperty.call(message, "rangeExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.encode(message.rangeExpectation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonNullExpectation != null && Object.hasOwnProperty.call(message, "nonNullExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.encode(message.nonNullExpectation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.setExpectation != null && Object.hasOwnProperty.call(message, "setExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.encode(message.setExpectation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.regexExpectation != null && Object.hasOwnProperty.call(message, "regexExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.encode(message.regexExpectation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.uniquenessExpectation != null && Object.hasOwnProperty.call(message, "uniquenessExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.encode(message.uniquenessExpectation, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.statisticRangeExpectation != null && Object.hasOwnProperty.call(message, "statisticRangeExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.encode(message.statisticRangeExpectation, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.rowConditionExpectation != null && Object.hasOwnProperty.call(message, "rowConditionExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.encode(message.rowConditionExpectation, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.tableConditionExpectation != null && Object.hasOwnProperty.call(message, "tableConditionExpectation")) - $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.encode(message.tableConditionExpectation, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.sqlAssertion != null && Object.hasOwnProperty.call(message, "sqlAssertion")) - $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.encode(message.sqlAssertion, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 500, wireType 2 =*/4002).string(message.column); - if (message.ignoreNull != null && Object.hasOwnProperty.call(message, "ignoreNull")) - writer.uint32(/* id 501, wireType 0 =*/4008).bool(message.ignoreNull); - if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) - writer.uint32(/* id 502, wireType 2 =*/4018).string(message.dimension); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 503, wireType 1 =*/4025).double(message.threshold); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 504, wireType 2 =*/4034).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 505, wireType 2 =*/4042).string(message.description); - if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) - writer.uint32(/* id 506, wireType 0 =*/4048).bool(message.suspended); - return writer; - }; - - /** - * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.decode(reader, reader.uint32()); - break; - } - case 2: { - message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.decode(reader, reader.uint32()); - break; - } - case 3: { - message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.decode(reader, reader.uint32()); - break; - } - case 4: { - message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.decode(reader, reader.uint32()); - break; - } - case 100: { - message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.decode(reader, reader.uint32()); - break; - } - case 101: { - message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.decode(reader, reader.uint32()); - break; - } - case 200: { - message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.decode(reader, reader.uint32()); - break; - } - case 201: { - message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.decode(reader, reader.uint32()); - break; - } - case 202: { - message.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.decode(reader, reader.uint32()); - break; - } - case 500: { - message.column = reader.string(); - break; - } - case 501: { - message.ignoreNull = reader.bool(); - break; - } - case 502: { - message.dimension = reader.string(); - break; - } - case 503: { - message.threshold = reader.double(); - break; - } - case 504: { - message.name = reader.string(); - break; - } - case 505: { - message.description = reader.string(); - break; - } - case 506: { - message.suspended = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityRule message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify(message.rangeExpectation); - if (error) - return "rangeExpectation." + error; - } - } - if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify(message.nonNullExpectation); - if (error) - return "nonNullExpectation." + error; - } - } - if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify(message.setExpectation); - if (error) - return "setExpectation." + error; - } - } - if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify(message.regexExpectation); - if (error) - return "regexExpectation." + error; - } - } - if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify(message.uniquenessExpectation); - if (error) - return "uniquenessExpectation." + error; - } - } - if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify(message.statisticRangeExpectation); - if (error) - return "statisticRangeExpectation." + error; - } - } - if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify(message.rowConditionExpectation); - if (error) - return "rowConditionExpectation." + error; - } - } - if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify(message.tableConditionExpectation); - if (error) - return "tableConditionExpectation." + error; - } - } - if (message.sqlAssertion != null && message.hasOwnProperty("sqlAssertion")) { - if (properties.ruleType === 1) - return "ruleType: multiple values"; - properties.ruleType = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify(message.sqlAssertion); - if (error) - return "sqlAssertion." + error; - } - } - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) - if (typeof message.ignoreNull !== "boolean") - return "ignoreNull: boolean expected"; - if (message.dimension != null && message.hasOwnProperty("dimension")) - if (!$util.isString(message.dimension)) - return "dimension: string expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.suspended != null && message.hasOwnProperty("suspended")) - if (typeof message.suspended !== "boolean") - return "suspended: boolean expected"; - return null; - }; - - /** - * Creates a DataQualityRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule - */ - DataQualityRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule(); - if (object.rangeExpectation != null) { - if (typeof object.rangeExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rangeExpectation: object expected"); - message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.fromObject(object.rangeExpectation); - } - if (object.nonNullExpectation != null) { - if (typeof object.nonNullExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.nonNullExpectation: object expected"); - message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.fromObject(object.nonNullExpectation); - } - if (object.setExpectation != null) { - if (typeof object.setExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.setExpectation: object expected"); - message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.fromObject(object.setExpectation); - } - if (object.regexExpectation != null) { - if (typeof object.regexExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.regexExpectation: object expected"); - message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.fromObject(object.regexExpectation); - } - if (object.uniquenessExpectation != null) { - if (typeof object.uniquenessExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.uniquenessExpectation: object expected"); - message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.fromObject(object.uniquenessExpectation); - } - if (object.statisticRangeExpectation != null) { - if (typeof object.statisticRangeExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.statisticRangeExpectation: object expected"); - message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.fromObject(object.statisticRangeExpectation); - } - if (object.rowConditionExpectation != null) { - if (typeof object.rowConditionExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rowConditionExpectation: object expected"); - message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.fromObject(object.rowConditionExpectation); - } - if (object.tableConditionExpectation != null) { - if (typeof object.tableConditionExpectation !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.tableConditionExpectation: object expected"); - message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.fromObject(object.tableConditionExpectation); - } - if (object.sqlAssertion != null) { - if (typeof object.sqlAssertion !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.sqlAssertion: object expected"); - message.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.fromObject(object.sqlAssertion); - } - if (object.column != null) - message.column = String(object.column); - if (object.ignoreNull != null) - message.ignoreNull = Boolean(object.ignoreNull); - if (object.dimension != null) - message.dimension = String(object.dimension); - if (object.threshold != null) - message.threshold = Number(object.threshold); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.suspended != null) - message.suspended = Boolean(object.suspended); - return message; - }; - - /** - * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule} message DataQualityRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.ignoreNull = false; - object.dimension = ""; - object.threshold = 0; - object.name = ""; - object.description = ""; - object.suspended = false; - } - if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { - object.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.toObject(message.rangeExpectation, options); - if (options.oneofs) - object.ruleType = "rangeExpectation"; - } - if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { - object.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.toObject(message.nonNullExpectation, options); - if (options.oneofs) - object.ruleType = "nonNullExpectation"; - } - if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { - object.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.toObject(message.setExpectation, options); - if (options.oneofs) - object.ruleType = "setExpectation"; - } - if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { - object.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.toObject(message.regexExpectation, options); - if (options.oneofs) - object.ruleType = "regexExpectation"; - } - if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { - object.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.toObject(message.uniquenessExpectation, options); - if (options.oneofs) - object.ruleType = "uniquenessExpectation"; - } - if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { - object.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.toObject(message.statisticRangeExpectation, options); - if (options.oneofs) - object.ruleType = "statisticRangeExpectation"; - } - if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { - object.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.toObject(message.rowConditionExpectation, options); - if (options.oneofs) - object.ruleType = "rowConditionExpectation"; - } - if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { - object.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.toObject(message.tableConditionExpectation, options); - if (options.oneofs) - object.ruleType = "tableConditionExpectation"; - } - if (message.sqlAssertion != null && message.hasOwnProperty("sqlAssertion")) { - object.sqlAssertion = $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.toObject(message.sqlAssertion, options); - if (options.oneofs) - object.ruleType = "sqlAssertion"; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) - object.ignoreNull = message.ignoreNull; - if (message.dimension != null && message.hasOwnProperty("dimension")) - object.dimension = message.dimension; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.suspended != null && message.hasOwnProperty("suspended")) - object.suspended = message.suspended; - return object; - }; - - /** - * Converts this DataQualityRule to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @instance - * @returns {Object.} JSON object - */ - DataQualityRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityRule - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule"; - }; - - DataQualityRule.RangeExpectation = (function() { - - /** - * Properties of a RangeExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface IRangeExpectation - * @property {string|null} [minValue] RangeExpectation minValue - * @property {string|null} [maxValue] RangeExpectation maxValue - * @property {boolean|null} [strictMinEnabled] RangeExpectation strictMinEnabled - * @property {boolean|null} [strictMaxEnabled] RangeExpectation strictMaxEnabled - */ - - /** - * Constructs a new RangeExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a RangeExpectation. - * @implements IRangeExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set - */ - function RangeExpectation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RangeExpectation minValue. - * @member {string} minValue - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @instance - */ - RangeExpectation.prototype.minValue = ""; - - /** - * RangeExpectation maxValue. - * @member {string} maxValue - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @instance - */ - RangeExpectation.prototype.maxValue = ""; - - /** - * RangeExpectation strictMinEnabled. - * @member {boolean} strictMinEnabled - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @instance - */ - RangeExpectation.prototype.strictMinEnabled = false; - - /** - * RangeExpectation strictMaxEnabled. - * @member {boolean} strictMaxEnabled - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @instance - */ - RangeExpectation.prototype.strictMaxEnabled = false; - - /** - * Creates a new RangeExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation instance - */ - RangeExpectation.create = function create(properties) { - return new RangeExpectation(properties); - }; - - /** - * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.minValue); - if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxValue); - if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.strictMinEnabled); - if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMaxEnabled); - return writer; - }; - - /** - * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RangeExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.minValue = reader.string(); - break; - } - case 2: { - message.maxValue = reader.string(); - break; - } - case 3: { - message.strictMinEnabled = reader.bool(); - break; - } - case 4: { - message.strictMaxEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RangeExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RangeExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RangeExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.minValue != null && message.hasOwnProperty("minValue")) - if (!$util.isString(message.minValue)) - return "minValue: string expected"; - if (message.maxValue != null && message.hasOwnProperty("maxValue")) - if (!$util.isString(message.maxValue)) - return "maxValue: string expected"; - if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) - if (typeof message.strictMinEnabled !== "boolean") - return "strictMinEnabled: boolean expected"; - if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) - if (typeof message.strictMaxEnabled !== "boolean") - return "strictMaxEnabled: boolean expected"; - return null; - }; - - /** - * Creates a RangeExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation - */ - RangeExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); - if (object.minValue != null) - message.minValue = String(object.minValue); - if (object.maxValue != null) - message.maxValue = String(object.maxValue); - if (object.strictMinEnabled != null) - message.strictMinEnabled = Boolean(object.strictMinEnabled); - if (object.strictMaxEnabled != null) - message.strictMaxEnabled = Boolean(object.strictMaxEnabled); - return message; - }; - - /** - * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} message RangeExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RangeExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.minValue = ""; - object.maxValue = ""; - object.strictMinEnabled = false; - object.strictMaxEnabled = false; - } - if (message.minValue != null && message.hasOwnProperty("minValue")) - object.minValue = message.minValue; - if (message.maxValue != null && message.hasOwnProperty("maxValue")) - object.maxValue = message.maxValue; - if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) - object.strictMinEnabled = message.strictMinEnabled; - if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) - object.strictMaxEnabled = message.strictMaxEnabled; - return object; - }; - - /** - * Converts this RangeExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @instance - * @returns {Object.} JSON object - */ - RangeExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RangeExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"; - }; - - return RangeExpectation; - })(); - - DataQualityRule.NonNullExpectation = (function() { - - /** - * Properties of a NonNullExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface INonNullExpectation - */ - - /** - * Constructs a new NonNullExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a NonNullExpectation. - * @implements INonNullExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set - */ - function NonNullExpectation(properties) { - if (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 NonNullExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation instance - */ - NonNullExpectation.create = function create(properties) { - return new NonNullExpectation(properties); - }; - - /** - * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonNullExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonNullExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NonNullExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonNullExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonNullExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NonNullExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NonNullExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a NonNullExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation - */ - NonNullExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation) - return object; - return new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); - }; - - /** - * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} message NonNullExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NonNullExpectation.toObject = function toObject() { - return {}; - }; - - /** - * Converts this NonNullExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @instance - * @returns {Object.} JSON object - */ - NonNullExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NonNullExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NonNullExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"; - }; - - return NonNullExpectation; - })(); - - DataQualityRule.SetExpectation = (function() { - - /** - * Properties of a SetExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface ISetExpectation - * @property {Array.|null} [values] SetExpectation values - */ - - /** - * Constructs a new SetExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a SetExpectation. - * @implements ISetExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set - */ - function SetExpectation(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetExpectation values. - * @member {Array.} values - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @instance - */ - SetExpectation.prototype.values = $util.emptyArray; - - /** - * Creates a new SetExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation instance - */ - SetExpectation.create = function create(properties) { - return new SetExpectation(properties); - }; - - /** - * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a SetExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation - */ - SetExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.SetExpectation.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} message SetExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this SetExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @instance - * @returns {Object.} JSON object - */ - SetExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"; - }; - - return SetExpectation; - })(); - - DataQualityRule.RegexExpectation = (function() { - - /** - * Properties of a RegexExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface IRegexExpectation - * @property {string|null} [regex] RegexExpectation regex - */ - - /** - * Constructs a new RegexExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a RegexExpectation. - * @implements IRegexExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set - */ - function RegexExpectation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegexExpectation regex. - * @member {string} regex - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @instance - */ - RegexExpectation.prototype.regex = ""; - - /** - * Creates a new RegexExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation instance - */ - RegexExpectation.create = function create(properties) { - return new RegexExpectation(properties); - }; - - /** - * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegexExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.regex); - return writer; - }; - - /** - * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegexExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegexExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegexExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.regex = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegexExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegexExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegexExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.regex != null && message.hasOwnProperty("regex")) - if (!$util.isString(message.regex)) - return "regex: string expected"; - return null; - }; - - /** - * Creates a RegexExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation - */ - RegexExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); - if (object.regex != null) - message.regex = String(object.regex); - return message; - }; - - /** - * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} message RegexExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegexExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.regex = ""; - if (message.regex != null && message.hasOwnProperty("regex")) - object.regex = message.regex; - return object; - }; - - /** - * Converts this RegexExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @instance - * @returns {Object.} JSON object - */ - RegexExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RegexExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RegexExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"; - }; - - return RegexExpectation; - })(); - - DataQualityRule.UniquenessExpectation = (function() { - - /** - * Properties of an UniquenessExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface IUniquenessExpectation - */ - - /** - * Constructs a new UniquenessExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents an UniquenessExpectation. - * @implements IUniquenessExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set - */ - function UniquenessExpectation(properties) { - if (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 UniquenessExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation instance - */ - UniquenessExpectation.create = function create(properties) { - return new UniquenessExpectation(properties); - }; - - /** - * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UniquenessExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UniquenessExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UniquenessExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UniquenessExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UniquenessExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UniquenessExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UniquenessExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UniquenessExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation - */ - UniquenessExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation) - return object; - return new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); - }; - - /** - * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} message UniquenessExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UniquenessExpectation.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UniquenessExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @instance - * @returns {Object.} JSON object - */ - UniquenessExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UniquenessExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UniquenessExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"; - }; - - return UniquenessExpectation; - })(); - - DataQualityRule.StatisticRangeExpectation = (function() { - - /** - * Properties of a StatisticRangeExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface IStatisticRangeExpectation - * @property {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null} [statistic] StatisticRangeExpectation statistic - * @property {string|null} [minValue] StatisticRangeExpectation minValue - * @property {string|null} [maxValue] StatisticRangeExpectation maxValue - * @property {boolean|null} [strictMinEnabled] StatisticRangeExpectation strictMinEnabled - * @property {boolean|null} [strictMaxEnabled] StatisticRangeExpectation strictMaxEnabled - */ - - /** - * Constructs a new StatisticRangeExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a StatisticRangeExpectation. - * @implements IStatisticRangeExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set - */ - function StatisticRangeExpectation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatisticRangeExpectation statistic. - * @member {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic} statistic - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - */ - StatisticRangeExpectation.prototype.statistic = 0; - - /** - * StatisticRangeExpectation minValue. - * @member {string} minValue - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - */ - StatisticRangeExpectation.prototype.minValue = ""; - - /** - * StatisticRangeExpectation maxValue. - * @member {string} maxValue - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - */ - StatisticRangeExpectation.prototype.maxValue = ""; - - /** - * StatisticRangeExpectation strictMinEnabled. - * @member {boolean} strictMinEnabled - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - */ - StatisticRangeExpectation.prototype.strictMinEnabled = false; - - /** - * StatisticRangeExpectation strictMaxEnabled. - * @member {boolean} strictMaxEnabled - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - */ - StatisticRangeExpectation.prototype.strictMaxEnabled = false; - - /** - * Creates a new StatisticRangeExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation instance - */ - StatisticRangeExpectation.create = function create(properties) { - return new StatisticRangeExpectation(properties); - }; - - /** - * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticRangeExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.statistic != null && Object.hasOwnProperty.call(message, "statistic")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.statistic); - if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.minValue); - if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxValue); - if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMinEnabled); - if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.strictMaxEnabled); - return writer; - }; - - /** - * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatisticRangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatisticRangeExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticRangeExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.statistic = reader.int32(); - break; - } - case 2: { - message.minValue = reader.string(); - break; - } - case 3: { - message.maxValue = reader.string(); - break; - } - case 4: { - message.strictMinEnabled = reader.bool(); - break; - } - case 5: { - message.strictMaxEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatisticRangeExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatisticRangeExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatisticRangeExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.statistic != null && message.hasOwnProperty("statistic")) - switch (message.statistic) { - default: - return "statistic: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.minValue != null && message.hasOwnProperty("minValue")) - if (!$util.isString(message.minValue)) - return "minValue: string expected"; - if (message.maxValue != null && message.hasOwnProperty("maxValue")) - if (!$util.isString(message.maxValue)) - return "maxValue: string expected"; - if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) - if (typeof message.strictMinEnabled !== "boolean") - return "strictMinEnabled: boolean expected"; - if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) - if (typeof message.strictMaxEnabled !== "boolean") - return "strictMaxEnabled: boolean expected"; - return null; - }; - - /** - * Creates a StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation - */ - StatisticRangeExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); - switch (object.statistic) { - default: - if (typeof object.statistic === "number") { - message.statistic = object.statistic; - break; - } - break; - case "STATISTIC_UNDEFINED": - case 0: - message.statistic = 0; - break; - case "MEAN": - case 1: - message.statistic = 1; - break; - case "MIN": - case 2: - message.statistic = 2; - break; - case "MAX": - case 3: - message.statistic = 3; - break; - } - if (object.minValue != null) - message.minValue = String(object.minValue); - if (object.maxValue != null) - message.maxValue = String(object.maxValue); - if (object.strictMinEnabled != null) - message.strictMinEnabled = Boolean(object.strictMinEnabled); - if (object.strictMaxEnabled != null) - message.strictMaxEnabled = Boolean(object.strictMaxEnabled); - return message; - }; - - /** - * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} message StatisticRangeExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatisticRangeExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.statistic = options.enums === String ? "STATISTIC_UNDEFINED" : 0; - object.minValue = ""; - object.maxValue = ""; - object.strictMinEnabled = false; - object.strictMaxEnabled = false; - } - if (message.statistic != null && message.hasOwnProperty("statistic")) - object.statistic = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] === undefined ? message.statistic : $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] : message.statistic; - if (message.minValue != null && message.hasOwnProperty("minValue")) - object.minValue = message.minValue; - if (message.maxValue != null && message.hasOwnProperty("maxValue")) - object.maxValue = message.maxValue; - if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) - object.strictMinEnabled = message.strictMinEnabled; - if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) - object.strictMaxEnabled = message.strictMaxEnabled; - return object; - }; - - /** - * Converts this StatisticRangeExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @instance - * @returns {Object.} JSON object - */ - StatisticRangeExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StatisticRangeExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StatisticRangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"; - }; - - /** - * ColumnStatistic enum. - * @name google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic - * @enum {number} - * @property {number} STATISTIC_UNDEFINED=0 STATISTIC_UNDEFINED value - * @property {number} MEAN=1 MEAN value - * @property {number} MIN=2 MIN value - * @property {number} MAX=3 MAX value - */ - StatisticRangeExpectation.ColumnStatistic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATISTIC_UNDEFINED"] = 0; - values[valuesById[1] = "MEAN"] = 1; - values[valuesById[2] = "MIN"] = 2; - values[valuesById[3] = "MAX"] = 3; - return values; - })(); - - return StatisticRangeExpectation; - })(); - - DataQualityRule.RowConditionExpectation = (function() { - - /** - * Properties of a RowConditionExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface IRowConditionExpectation - * @property {string|null} [sqlExpression] RowConditionExpectation sqlExpression - */ - - /** - * Constructs a new RowConditionExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a RowConditionExpectation. - * @implements IRowConditionExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set - */ - function RowConditionExpectation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RowConditionExpectation sqlExpression. - * @member {string} sqlExpression - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @instance - */ - RowConditionExpectation.prototype.sqlExpression = ""; - - /** - * Creates a new RowConditionExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation instance - */ - RowConditionExpectation.create = function create(properties) { - return new RowConditionExpectation(properties); - }; - - /** - * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowConditionExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); - return writer; - }; - - /** - * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RowConditionExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowConditionExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sqlExpression = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowConditionExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RowConditionExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RowConditionExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) - if (!$util.isString(message.sqlExpression)) - return "sqlExpression: string expected"; - return null; - }; - - /** - * Creates a RowConditionExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation - */ - RowConditionExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); - if (object.sqlExpression != null) - message.sqlExpression = String(object.sqlExpression); - return message; - }; - - /** - * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} message RowConditionExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RowConditionExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sqlExpression = ""; - if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) - object.sqlExpression = message.sqlExpression; - return object; - }; - - /** - * Converts this RowConditionExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @instance - * @returns {Object.} JSON object - */ - RowConditionExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RowConditionExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RowConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"; - }; - - return RowConditionExpectation; - })(); - - DataQualityRule.TableConditionExpectation = (function() { - - /** - * Properties of a TableConditionExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface ITableConditionExpectation - * @property {string|null} [sqlExpression] TableConditionExpectation sqlExpression - */ - - /** - * Constructs a new TableConditionExpectation. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a TableConditionExpectation. - * @implements ITableConditionExpectation - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set - */ - function TableConditionExpectation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableConditionExpectation sqlExpression. - * @member {string} sqlExpression - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @instance - */ - TableConditionExpectation.prototype.sqlExpression = ""; - - /** - * Creates a new TableConditionExpectation instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation instance - */ - TableConditionExpectation.create = function create(properties) { - return new TableConditionExpectation(properties); - }; - - /** - * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableConditionExpectation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); - return writer; - }; - - /** - * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableConditionExpectation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableConditionExpectation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sqlExpression = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableConditionExpectation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableConditionExpectation message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableConditionExpectation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) - if (!$util.isString(message.sqlExpression)) - return "sqlExpression: string expected"; - return null; - }; - - /** - * Creates a TableConditionExpectation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation - */ - TableConditionExpectation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); - if (object.sqlExpression != null) - message.sqlExpression = String(object.sqlExpression); - return message; - }; - - /** - * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} message TableConditionExpectation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableConditionExpectation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sqlExpression = ""; - if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) - object.sqlExpression = message.sqlExpression; - return object; - }; - - /** - * Converts this TableConditionExpectation to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @instance - * @returns {Object.} JSON object - */ - TableConditionExpectation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TableConditionExpectation - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TableConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"; - }; - - return TableConditionExpectation; - })(); - - DataQualityRule.SqlAssertion = (function() { - - /** - * Properties of a SqlAssertion. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @interface ISqlAssertion - * @property {string|null} [sqlStatement] SqlAssertion sqlStatement - */ - - /** - * Constructs a new SqlAssertion. - * @memberof google.cloud.dataplex.v1.DataQualityRule - * @classdesc Represents a SqlAssertion. - * @implements ISqlAssertion - * @constructor - * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion=} [properties] Properties to set - */ - function SqlAssertion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SqlAssertion sqlStatement. - * @member {string} sqlStatement - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @instance - */ - SqlAssertion.prototype.sqlStatement = ""; - - /** - * Creates a new SqlAssertion instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion instance - */ - SqlAssertion.create = function create(properties) { - return new SqlAssertion(properties); - }; - - /** - * Encodes the specified SqlAssertion message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion} message SqlAssertion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlAssertion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sqlStatement != null && Object.hasOwnProperty.call(message, "sqlStatement")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlStatement); - return writer; - }; - - /** - * Encodes the specified SqlAssertion message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SqlAssertion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.ISqlAssertion} message SqlAssertion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlAssertion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlAssertion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlAssertion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sqlStatement = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlAssertion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlAssertion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlAssertion message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlAssertion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sqlStatement != null && message.hasOwnProperty("sqlStatement")) - if (!$util.isString(message.sqlStatement)) - return "sqlStatement: string expected"; - return null; - }; - - /** - * Creates a SqlAssertion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} SqlAssertion - */ - SqlAssertion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityRule.SqlAssertion(); - if (object.sqlStatement != null) - message.sqlStatement = String(object.sqlStatement); - return message; - }; - - /** - * Creates a plain object from a SqlAssertion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {google.cloud.dataplex.v1.DataQualityRule.SqlAssertion} message SqlAssertion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlAssertion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.sqlStatement = ""; - if (message.sqlStatement != null && message.hasOwnProperty("sqlStatement")) - object.sqlStatement = message.sqlStatement; - return object; - }; - - /** - * Converts this SqlAssertion to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @instance - * @returns {Object.} JSON object - */ - SqlAssertion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlAssertion - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityRule.SqlAssertion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlAssertion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"; - }; - - return SqlAssertion; - })(); - - return DataQualityRule; - })(); - - v1.DataQualityColumnResult = (function() { - - /** - * Properties of a DataQualityColumnResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityColumnResult - * @property {string|null} [column] DataQualityColumnResult column - * @property {number|null} [score] DataQualityColumnResult score - */ - - /** - * Constructs a new DataQualityColumnResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityColumnResult. - * @implements IDataQualityColumnResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityColumnResult=} [properties] Properties to set - */ - function DataQualityColumnResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityColumnResult column. - * @member {string} column - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @instance - */ - DataQualityColumnResult.prototype.column = ""; - - /** - * DataQualityColumnResult score. - * @member {number|null|undefined} score - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @instance - */ - DataQualityColumnResult.prototype.score = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataQualityColumnResult _score. - * @member {"score"|undefined} _score - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @instance - */ - Object.defineProperty(DataQualityColumnResult.prototype, "_score", { - get: $util.oneOfGetter($oneOfFields = ["score"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataQualityColumnResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityColumnResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult instance - */ - DataQualityColumnResult.create = function create(properties) { - return new DataQualityColumnResult(properties); - }; - - /** - * Encodes the specified DataQualityColumnResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityColumnResult} message DataQualityColumnResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityColumnResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); - return writer; - }; - - /** - * Encodes the specified DataQualityColumnResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityColumnResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityColumnResult} message DataQualityColumnResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityColumnResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityColumnResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityColumnResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityColumnResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.score = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityColumnResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityColumnResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityColumnResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityColumnResult.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.score != null && message.hasOwnProperty("score")) { - properties._score = 1; - if (typeof message.score !== "number") - return "score: number expected"; - } - return null; - }; - - /** - * Creates a DataQualityColumnResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityColumnResult} DataQualityColumnResult - */ - DataQualityColumnResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityColumnResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityColumnResult(); - if (object.column != null) - message.column = String(object.column); - if (object.score != null) - message.score = Number(object.score); - return message; - }; - - /** - * Creates a plain object from a DataQualityColumnResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityColumnResult} message DataQualityColumnResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityColumnResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.column = ""; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.score != null && message.hasOwnProperty("score")) { - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (options.oneofs) - object._score = "score"; - } - return object; - }; - - /** - * Converts this DataQualityColumnResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityColumnResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityColumnResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityColumnResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityColumnResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityColumnResult"; - }; - - return DataQualityColumnResult; - })(); - - v1.DataTaxonomyService = (function() { - - /** - * Constructs a new DataTaxonomyService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataTaxonomyService - * @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 DataTaxonomyService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataTaxonomyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataTaxonomyService; - - /** - * Creates new DataTaxonomyService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @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 {DataTaxonomyService} RPC service. Useful where requests and/or responses are streamed. - */ - DataTaxonomyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataTaxonomy}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef CreateDataTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDataTaxonomy. - * @function createDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} request CreateDataTaxonomyRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.createDataTaxonomy = function createDataTaxonomy(request, callback) { - return this.rpcCall(createDataTaxonomy, $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDataTaxonomy" }); - - /** - * Calls CreateDataTaxonomy. - * @function createDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} request CreateDataTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataTaxonomy}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef UpdateDataTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataTaxonomy. - * @function updateDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} request UpdateDataTaxonomyRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.updateDataTaxonomy = function updateDataTaxonomy(request, callback) { - return this.rpcCall(updateDataTaxonomy, $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataTaxonomy" }); - - /** - * Calls UpdateDataTaxonomy. - * @function updateDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} request UpdateDataTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataTaxonomy}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef DeleteDataTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteDataTaxonomy. - * @function deleteDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} request DeleteDataTaxonomyRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.deleteDataTaxonomy = function deleteDataTaxonomy(request, callback) { - return this.rpcCall(deleteDataTaxonomy, $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDataTaxonomy" }); - - /** - * Calls DeleteDataTaxonomy. - * @function deleteDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} request DeleteDataTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataTaxonomies}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef ListDataTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} [response] ListDataTaxonomiesResponse - */ - - /** - * Calls ListDataTaxonomies. - * @function listDataTaxonomies - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} request ListDataTaxonomiesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomiesCallback} callback Node-style callback called with the error, if any, and ListDataTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.listDataTaxonomies = function listDataTaxonomies(request, callback) { - return this.rpcCall(listDataTaxonomies, $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse, request, callback); - }, "name", { value: "ListDataTaxonomies" }); - - /** - * Calls ListDataTaxonomies. - * @function listDataTaxonomies - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} request ListDataTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataTaxonomy}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef GetDataTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.DataTaxonomy} [response] DataTaxonomy - */ - - /** - * Calls GetDataTaxonomy. - * @function getDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} request GetDataTaxonomyRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomyCallback} callback Node-style callback called with the error, if any, and DataTaxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.getDataTaxonomy = function getDataTaxonomy(request, callback) { - return this.rpcCall(getDataTaxonomy, $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest, $root.google.cloud.dataplex.v1.DataTaxonomy, request, callback); - }, "name", { value: "GetDataTaxonomy" }); - - /** - * Calls GetDataTaxonomy. - * @function getDataTaxonomy - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} request GetDataTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttributeBinding}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef CreateDataAttributeBindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDataAttributeBinding. - * @function createDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} request CreateDataAttributeBindingRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.createDataAttributeBinding = function createDataAttributeBinding(request, callback) { - return this.rpcCall(createDataAttributeBinding, $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDataAttributeBinding" }); - - /** - * Calls CreateDataAttributeBinding. - * @function createDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} request CreateDataAttributeBindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttributeBinding}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef UpdateDataAttributeBindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataAttributeBinding. - * @function updateDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} request UpdateDataAttributeBindingRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.updateDataAttributeBinding = function updateDataAttributeBinding(request, callback) { - return this.rpcCall(updateDataAttributeBinding, $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataAttributeBinding" }); - - /** - * Calls UpdateDataAttributeBinding. - * @function updateDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} request UpdateDataAttributeBindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttributeBinding}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef DeleteDataAttributeBindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteDataAttributeBinding. - * @function deleteDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} request DeleteDataAttributeBindingRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.deleteDataAttributeBinding = function deleteDataAttributeBinding(request, callback) { - return this.rpcCall(deleteDataAttributeBinding, $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDataAttributeBinding" }); - - /** - * Calls DeleteDataAttributeBinding. - * @function deleteDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} request DeleteDataAttributeBindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributeBindings}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef ListDataAttributeBindingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} [response] ListDataAttributeBindingsResponse - */ - - /** - * Calls ListDataAttributeBindings. - * @function listDataAttributeBindings - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} request ListDataAttributeBindingsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindingsCallback} callback Node-style callback called with the error, if any, and ListDataAttributeBindingsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.listDataAttributeBindings = function listDataAttributeBindings(request, callback) { - return this.rpcCall(listDataAttributeBindings, $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse, request, callback); - }, "name", { value: "ListDataAttributeBindings" }); - - /** - * Calls ListDataAttributeBindings. - * @function listDataAttributeBindings - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} request ListDataAttributeBindingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttributeBinding}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef GetDataAttributeBindingCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.DataAttributeBinding} [response] DataAttributeBinding - */ - - /** - * Calls GetDataAttributeBinding. - * @function getDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} request GetDataAttributeBindingRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBindingCallback} callback Node-style callback called with the error, if any, and DataAttributeBinding - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.getDataAttributeBinding = function getDataAttributeBinding(request, callback) { - return this.rpcCall(getDataAttributeBinding, $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, $root.google.cloud.dataplex.v1.DataAttributeBinding, request, callback); - }, "name", { value: "GetDataAttributeBinding" }); - - /** - * Calls GetDataAttributeBinding. - * @function getDataAttributeBinding - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} request GetDataAttributeBindingRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|createDataAttribute}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef CreateDataAttributeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDataAttribute. - * @function createDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} request CreateDataAttributeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.createDataAttribute = function createDataAttribute(request, callback) { - return this.rpcCall(createDataAttribute, $root.google.cloud.dataplex.v1.CreateDataAttributeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDataAttribute" }); - - /** - * Calls CreateDataAttribute. - * @function createDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} request CreateDataAttributeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|updateDataAttribute}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef UpdateDataAttributeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataAttribute. - * @function updateDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} request UpdateDataAttributeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.updateDataAttribute = function updateDataAttribute(request, callback) { - return this.rpcCall(updateDataAttribute, $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataAttribute" }); - - /** - * Calls UpdateDataAttribute. - * @function updateDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} request UpdateDataAttributeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|deleteDataAttribute}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef DeleteDataAttributeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteDataAttribute. - * @function deleteDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} request DeleteDataAttributeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.deleteDataAttribute = function deleteDataAttribute(request, callback) { - return this.rpcCall(deleteDataAttribute, $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDataAttribute" }); - - /** - * Calls DeleteDataAttribute. - * @function deleteDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} request DeleteDataAttributeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|listDataAttributes}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef ListDataAttributesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListDataAttributesResponse} [response] ListDataAttributesResponse - */ - - /** - * Calls ListDataAttributes. - * @function listDataAttributes - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} request ListDataAttributesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributesCallback} callback Node-style callback called with the error, if any, and ListDataAttributesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.listDataAttributes = function listDataAttributes(request, callback) { - return this.rpcCall(listDataAttributes, $root.google.cloud.dataplex.v1.ListDataAttributesRequest, $root.google.cloud.dataplex.v1.ListDataAttributesResponse, request, callback); - }, "name", { value: "ListDataAttributes" }); - - /** - * Calls ListDataAttributes. - * @function listDataAttributes - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} request ListDataAttributesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataTaxonomyService|getDataAttribute}. - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @typedef GetDataAttributeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.DataAttribute} [response] DataAttribute - */ - - /** - * Calls GetDataAttribute. - * @function getDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} request GetDataAttributeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeCallback} callback Node-style callback called with the error, if any, and DataAttribute - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataTaxonomyService.prototype.getDataAttribute = function getDataAttribute(request, callback) { - return this.rpcCall(getDataAttribute, $root.google.cloud.dataplex.v1.GetDataAttributeRequest, $root.google.cloud.dataplex.v1.DataAttribute, request, callback); - }, "name", { value: "GetDataAttribute" }); - - /** - * Calls GetDataAttribute. - * @function getDataAttribute - * @memberof google.cloud.dataplex.v1.DataTaxonomyService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} request GetDataAttributeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataTaxonomyService; - })(); - - v1.DataTaxonomy = (function() { - - /** - * Properties of a DataTaxonomy. - * @memberof google.cloud.dataplex.v1 - * @interface IDataTaxonomy - * @property {string|null} [name] DataTaxonomy name - * @property {string|null} [uid] DataTaxonomy uid - * @property {google.protobuf.ITimestamp|null} [createTime] DataTaxonomy createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataTaxonomy updateTime - * @property {string|null} [description] DataTaxonomy description - * @property {string|null} [displayName] DataTaxonomy displayName - * @property {Object.|null} [labels] DataTaxonomy labels - * @property {number|null} [attributeCount] DataTaxonomy attributeCount - * @property {string|null} [etag] DataTaxonomy etag - * @property {number|null} [classCount] DataTaxonomy classCount - */ - - /** - * Constructs a new DataTaxonomy. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataTaxonomy. - * @implements IDataTaxonomy - * @constructor - * @param {google.cloud.dataplex.v1.IDataTaxonomy=} [properties] Properties to set - */ - function DataTaxonomy(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]]; - } - - /** - * DataTaxonomy name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.name = ""; - - /** - * DataTaxonomy uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.uid = ""; - - /** - * DataTaxonomy createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.createTime = null; - - /** - * DataTaxonomy updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.updateTime = null; - - /** - * DataTaxonomy description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.description = ""; - - /** - * DataTaxonomy displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.displayName = ""; - - /** - * DataTaxonomy labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.labels = $util.emptyObject; - - /** - * DataTaxonomy attributeCount. - * @member {number} attributeCount - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.attributeCount = 0; - - /** - * DataTaxonomy etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.etag = ""; - - /** - * DataTaxonomy classCount. - * @member {number} classCount - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - */ - DataTaxonomy.prototype.classCount = 0; - - /** - * Creates a new DataTaxonomy instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {google.cloud.dataplex.v1.IDataTaxonomy=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy instance - */ - DataTaxonomy.create = function create(properties) { - return new DataTaxonomy(properties); - }; - - /** - * Encodes the specified DataTaxonomy message. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {google.cloud.dataplex.v1.IDataTaxonomy} message DataTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataTaxonomy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.attributeCount != null && Object.hasOwnProperty.call(message, "attributeCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.attributeCount); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); - if (message.classCount != null && Object.hasOwnProperty.call(message, "classCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.classCount); - return writer; - }; - - /** - * Encodes the specified DataTaxonomy message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataTaxonomy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {google.cloud.dataplex.v1.IDataTaxonomy} message DataTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataTaxonomy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataTaxonomy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataTaxonomy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataTaxonomy(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 9: { - message.attributeCount = reader.int32(); - break; - } - case 10: { - message.etag = reader.string(); - break; - } - case 11: { - message.classCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataTaxonomy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataTaxonomy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataTaxonomy message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataTaxonomy.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) - if (!$util.isInteger(message.attributeCount)) - return "attributeCount: integer expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.classCount != null && message.hasOwnProperty("classCount")) - if (!$util.isInteger(message.classCount)) - return "classCount: integer expected"; - return null; - }; - - /** - * Creates a DataTaxonomy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataTaxonomy} DataTaxonomy - */ - DataTaxonomy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataTaxonomy) - return object; - var message = new $root.google.cloud.dataplex.v1.DataTaxonomy(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataTaxonomy.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.dataplex.v1.DataTaxonomy.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataTaxonomy.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.attributeCount != null) - message.attributeCount = object.attributeCount | 0; - if (object.etag != null) - message.etag = String(object.etag); - if (object.classCount != null) - message.classCount = object.classCount | 0; - return message; - }; - - /** - * Creates a plain object from a DataTaxonomy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {google.cloud.dataplex.v1.DataTaxonomy} message DataTaxonomy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataTaxonomy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.attributeCount = 0; - object.etag = ""; - object.classCount = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.attributeCount != null && message.hasOwnProperty("attributeCount")) - object.attributeCount = message.attributeCount; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.classCount != null && message.hasOwnProperty("classCount")) - object.classCount = message.classCount; - return object; - }; - - /** - * Converts this DataTaxonomy to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @instance - * @returns {Object.} JSON object - */ - DataTaxonomy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataTaxonomy - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataTaxonomy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataTaxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataTaxonomy"; - }; - - return DataTaxonomy; - })(); - - v1.DataAttribute = (function() { - - /** - * Properties of a DataAttribute. - * @memberof google.cloud.dataplex.v1 - * @interface IDataAttribute - * @property {string|null} [name] DataAttribute name - * @property {string|null} [uid] DataAttribute uid - * @property {google.protobuf.ITimestamp|null} [createTime] DataAttribute createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataAttribute updateTime - * @property {string|null} [description] DataAttribute description - * @property {string|null} [displayName] DataAttribute displayName - * @property {Object.|null} [labels] DataAttribute labels - * @property {string|null} [parentId] DataAttribute parentId - * @property {number|null} [attributeCount] DataAttribute attributeCount - * @property {string|null} [etag] DataAttribute etag - * @property {google.cloud.dataplex.v1.IResourceAccessSpec|null} [resourceAccessSpec] DataAttribute resourceAccessSpec - * @property {google.cloud.dataplex.v1.IDataAccessSpec|null} [dataAccessSpec] DataAttribute dataAccessSpec - */ - - /** - * Constructs a new DataAttribute. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataAttribute. - * @implements IDataAttribute - * @constructor - * @param {google.cloud.dataplex.v1.IDataAttribute=} [properties] Properties to set - */ - function DataAttribute(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]]; - } - - /** - * DataAttribute name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.name = ""; - - /** - * DataAttribute uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.uid = ""; - - /** - * DataAttribute createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.createTime = null; - - /** - * DataAttribute updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.updateTime = null; - - /** - * DataAttribute description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.description = ""; - - /** - * DataAttribute displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.displayName = ""; - - /** - * DataAttribute labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.labels = $util.emptyObject; - - /** - * DataAttribute parentId. - * @member {string} parentId - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.parentId = ""; - - /** - * DataAttribute attributeCount. - * @member {number} attributeCount - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.attributeCount = 0; - - /** - * DataAttribute etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.etag = ""; - - /** - * DataAttribute resourceAccessSpec. - * @member {google.cloud.dataplex.v1.IResourceAccessSpec|null|undefined} resourceAccessSpec - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.resourceAccessSpec = null; - - /** - * DataAttribute dataAccessSpec. - * @member {google.cloud.dataplex.v1.IDataAccessSpec|null|undefined} dataAccessSpec - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - */ - DataAttribute.prototype.dataAccessSpec = null; - - /** - * Creates a new DataAttribute instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {google.cloud.dataplex.v1.IDataAttribute=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute instance - */ - DataAttribute.create = function create(properties) { - return new DataAttribute(properties); - }; - - /** - * Encodes the specified DataAttribute message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {google.cloud.dataplex.v1.IDataAttribute} message DataAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAttribute.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.parentId != null && Object.hasOwnProperty.call(message, "parentId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.parentId); - if (message.attributeCount != null && Object.hasOwnProperty.call(message, "attributeCount")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.attributeCount); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.etag); - if (message.resourceAccessSpec != null && Object.hasOwnProperty.call(message, "resourceAccessSpec")) - $root.google.cloud.dataplex.v1.ResourceAccessSpec.encode(message.resourceAccessSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.dataAccessSpec != null && Object.hasOwnProperty.call(message, "dataAccessSpec")) - $root.google.cloud.dataplex.v1.DataAccessSpec.encode(message.dataAccessSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataAttribute message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttribute.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {google.cloud.dataplex.v1.IDataAttribute} message DataAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataAttribute message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAttribute.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttribute(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.parentId = reader.string(); - break; - } - case 9: { - message.attributeCount = reader.int32(); - break; - } - case 10: { - message.etag = reader.string(); - break; - } - case 100: { - message.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataAttribute message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAttribute.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataAttribute message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataAttribute.verify = function verify(message) { - if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.parentId != null && message.hasOwnProperty("parentId")) - if (!$util.isString(message.parentId)) - return "parentId: string expected"; - if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) - if (!$util.isInteger(message.attributeCount)) - return "attributeCount: integer expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.resourceAccessSpec != null && message.hasOwnProperty("resourceAccessSpec")) { - var error = $root.google.cloud.dataplex.v1.ResourceAccessSpec.verify(message.resourceAccessSpec); - if (error) - return "resourceAccessSpec." + error; - } - if (message.dataAccessSpec != null && message.hasOwnProperty("dataAccessSpec")) { - var error = $root.google.cloud.dataplex.v1.DataAccessSpec.verify(message.dataAccessSpec); - if (error) - return "dataAccessSpec." + error; - } - return null; - }; - - /** - * Creates a DataAttribute message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataAttribute} DataAttribute - */ - DataAttribute.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataAttribute) - return object; - var message = new $root.google.cloud.dataplex.v1.DataAttribute(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttribute.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.dataplex.v1.DataAttribute.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttribute.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.parentId != null) - message.parentId = String(object.parentId); - if (object.attributeCount != null) - message.attributeCount = object.attributeCount | 0; - if (object.etag != null) - message.etag = String(object.etag); - if (object.resourceAccessSpec != null) { - if (typeof object.resourceAccessSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttribute.resourceAccessSpec: object expected"); - message.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.fromObject(object.resourceAccessSpec); - } - if (object.dataAccessSpec != null) { - if (typeof object.dataAccessSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttribute.dataAccessSpec: object expected"); - message.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.fromObject(object.dataAccessSpec); - } - return message; - }; - - /** - * Creates a plain object from a DataAttribute message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {google.cloud.dataplex.v1.DataAttribute} message DataAttribute - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataAttribute.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.parentId = ""; - object.attributeCount = 0; - object.etag = ""; - object.resourceAccessSpec = null; - object.dataAccessSpec = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.parentId != null && message.hasOwnProperty("parentId")) - object.parentId = message.parentId; - if (message.attributeCount != null && message.hasOwnProperty("attributeCount")) - object.attributeCount = message.attributeCount; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.resourceAccessSpec != null && message.hasOwnProperty("resourceAccessSpec")) - object.resourceAccessSpec = $root.google.cloud.dataplex.v1.ResourceAccessSpec.toObject(message.resourceAccessSpec, options); - if (message.dataAccessSpec != null && message.hasOwnProperty("dataAccessSpec")) - object.dataAccessSpec = $root.google.cloud.dataplex.v1.DataAccessSpec.toObject(message.dataAccessSpec, options); - return object; - }; - - /** - * Converts this DataAttribute to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataAttribute - * @instance - * @returns {Object.} JSON object - */ - DataAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataAttribute - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataAttribute - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttribute"; - }; - - return DataAttribute; - })(); - - v1.DataAttributeBinding = (function() { - - /** - * Properties of a DataAttributeBinding. - * @memberof google.cloud.dataplex.v1 - * @interface IDataAttributeBinding - * @property {string|null} [name] DataAttributeBinding name - * @property {string|null} [uid] DataAttributeBinding uid - * @property {google.protobuf.ITimestamp|null} [createTime] DataAttributeBinding createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataAttributeBinding updateTime - * @property {string|null} [description] DataAttributeBinding description - * @property {string|null} [displayName] DataAttributeBinding displayName - * @property {Object.|null} [labels] DataAttributeBinding labels - * @property {string|null} [etag] DataAttributeBinding etag - * @property {string|null} [resource] DataAttributeBinding resource - * @property {Array.|null} [attributes] DataAttributeBinding attributes - * @property {Array.|null} [paths] DataAttributeBinding paths - */ - - /** - * Constructs a new DataAttributeBinding. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataAttributeBinding. - * @implements IDataAttributeBinding - * @constructor - * @param {google.cloud.dataplex.v1.IDataAttributeBinding=} [properties] Properties to set - */ - function DataAttributeBinding(properties) { - this.labels = {}; - this.attributes = []; - 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]]; - } - - /** - * DataAttributeBinding name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.name = ""; - - /** - * DataAttributeBinding uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.uid = ""; - - /** - * DataAttributeBinding createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.createTime = null; - - /** - * DataAttributeBinding updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.updateTime = null; - - /** - * DataAttributeBinding description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.description = ""; - - /** - * DataAttributeBinding displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.displayName = ""; - - /** - * DataAttributeBinding labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.labels = $util.emptyObject; - - /** - * DataAttributeBinding etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.etag = ""; - - /** - * DataAttributeBinding resource. - * @member {string|null|undefined} resource - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.resource = null; - - /** - * DataAttributeBinding attributes. - * @member {Array.} attributes - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.attributes = $util.emptyArray; - - /** - * DataAttributeBinding paths. - * @member {Array.} paths - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - DataAttributeBinding.prototype.paths = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataAttributeBinding resourceReference. - * @member {"resource"|undefined} resourceReference - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - */ - Object.defineProperty(DataAttributeBinding.prototype, "resourceReference", { - get: $util.oneOfGetter($oneOfFields = ["resource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataAttributeBinding instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {google.cloud.dataplex.v1.IDataAttributeBinding=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding instance - */ - DataAttributeBinding.create = function create(properties) { - return new DataAttributeBinding(properties); - }; - - /** - * Encodes the specified DataAttributeBinding message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {google.cloud.dataplex.v1.IDataAttributeBinding} message DataAttributeBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAttributeBinding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.resource); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.attributes[i]); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.encode(message.paths[i], writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataAttributeBinding message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {google.cloud.dataplex.v1.IDataAttributeBinding} message DataAttributeBinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAttributeBinding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataAttributeBinding message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAttributeBinding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttributeBinding(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 100: { - message.resource = reader.string(); - break; - } - case 110: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push(reader.string()); - break; - } - case 120: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push($root.google.cloud.dataplex.v1.DataAttributeBinding.Path.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataAttributeBinding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAttributeBinding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataAttributeBinding message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataAttributeBinding.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - properties.resourceReference = 1; - if (!$util.isString(message.resource)) - return "resource: string expected"; - } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) - if (!$util.isString(message.attributes[i])) - return "attributes: string[] 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) { - var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.verify(message.paths[i]); - if (error) - return "paths." + error; - } - } - return null; - }; - - /** - * Creates a DataAttributeBinding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataAttributeBinding} DataAttributeBinding - */ - DataAttributeBinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataAttributeBinding) - return object; - var message = new $root.google.cloud.dataplex.v1.DataAttributeBinding(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.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.dataplex.v1.DataAttributeBinding.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.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.etag != null) - message.etag = String(object.etag); - if (object.resource != null) - message.resource = String(object.resource); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) - message.attributes[i] = String(object.attributes[i]); - } - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) { - if (typeof object.paths[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.paths: object expected"); - message.paths[i] = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.fromObject(object.paths[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DataAttributeBinding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {google.cloud.dataplex.v1.DataAttributeBinding} message DataAttributeBinding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataAttributeBinding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.attributes = []; - object.paths = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.resource != null && message.hasOwnProperty("resource")) { - object.resource = message.resource; - if (options.oneofs) - object.resourceReference = "resource"; - } - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = message.attributes[j]; - } - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = $root.google.cloud.dataplex.v1.DataAttributeBinding.Path.toObject(message.paths[j], options); - } - return object; - }; - - /** - * Converts this DataAttributeBinding to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @instance - * @returns {Object.} JSON object - */ - DataAttributeBinding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataAttributeBinding - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataAttributeBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttributeBinding"; - }; - - DataAttributeBinding.Path = (function() { - - /** - * Properties of a Path. - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @interface IPath - * @property {string|null} [name] Path name - * @property {Array.|null} [attributes] Path attributes - */ - - /** - * Constructs a new Path. - * @memberof google.cloud.dataplex.v1.DataAttributeBinding - * @classdesc Represents a Path. - * @implements IPath - * @constructor - * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath=} [properties] Properties to set - */ - function Path(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Path name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @instance - */ - Path.prototype.name = ""; - - /** - * Path attributes. - * @member {Array.} attributes - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @instance - */ - Path.prototype.attributes = $util.emptyArray; - - /** - * Creates a new Path instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path instance - */ - Path.create = function create(properties) { - return new Path(properties); - }; - - /** - * Encodes the specified Path message. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath} message Path message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Path.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributes[i]); - return writer; - }; - - /** - * Encodes the specified Path message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAttributeBinding.Path.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {google.cloud.dataplex.v1.DataAttributeBinding.IPath} message Path message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Path.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Path message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Path.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAttributeBinding.Path(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Path message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Path.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Path message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Path.verify = function verify(message) { - if (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.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) - if (!$util.isString(message.attributes[i])) - return "attributes: string[] expected"; - } - return null; - }; - - /** - * Creates a Path message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataAttributeBinding.Path} Path - */ - Path.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataAttributeBinding.Path) - return object; - var message = new $root.google.cloud.dataplex.v1.DataAttributeBinding.Path(); - if (object.name != null) - message.name = String(object.name); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".google.cloud.dataplex.v1.DataAttributeBinding.Path.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) - message.attributes[i] = String(object.attributes[i]); - } - return message; - }; - - /** - * Creates a plain object from a Path message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {google.cloud.dataplex.v1.DataAttributeBinding.Path} message Path - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Path.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = message.attributes[j]; - } - return object; - }; - - /** - * Converts this Path to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @instance - * @returns {Object.} JSON object - */ - Path.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Path - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataAttributeBinding.Path - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Path.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAttributeBinding.Path"; - }; - - return Path; - })(); - - return DataAttributeBinding; - })(); - - v1.CreateDataTaxonomyRequest = (function() { - - /** - * Properties of a CreateDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateDataTaxonomyRequest - * @property {string|null} [parent] CreateDataTaxonomyRequest parent - * @property {string|null} [dataTaxonomyId] CreateDataTaxonomyRequest dataTaxonomyId - * @property {google.cloud.dataplex.v1.IDataTaxonomy|null} [dataTaxonomy] CreateDataTaxonomyRequest dataTaxonomy - * @property {boolean|null} [validateOnly] CreateDataTaxonomyRequest validateOnly - */ - - /** - * Constructs a new CreateDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateDataTaxonomyRequest. - * @implements ICreateDataTaxonomyRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest=} [properties] Properties to set - */ - function CreateDataTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateDataTaxonomyRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @instance - */ - CreateDataTaxonomyRequest.prototype.parent = ""; - - /** - * CreateDataTaxonomyRequest dataTaxonomyId. - * @member {string} dataTaxonomyId - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @instance - */ - CreateDataTaxonomyRequest.prototype.dataTaxonomyId = ""; - - /** - * CreateDataTaxonomyRequest dataTaxonomy. - * @member {google.cloud.dataplex.v1.IDataTaxonomy|null|undefined} dataTaxonomy - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @instance - */ - CreateDataTaxonomyRequest.prototype.dataTaxonomy = null; - - /** - * CreateDataTaxonomyRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @instance - */ - CreateDataTaxonomyRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateDataTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest instance - */ - CreateDataTaxonomyRequest.create = function create(properties) { - return new CreateDataTaxonomyRequest(properties); - }; - - /** - * Encodes the specified CreateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} message CreateDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataTaxonomyRequest.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.dataTaxonomyId != null && Object.hasOwnProperty.call(message, "dataTaxonomyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataTaxonomyId); - if (message.dataTaxonomy != null && Object.hasOwnProperty.call(message, "dataTaxonomy")) - $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataTaxonomyRequest} message CreateDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.dataTaxonomyId = reader.string(); - break; - } - case 3: { - message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateDataTaxonomyRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDataTaxonomyRequest.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.dataTaxonomyId != null && message.hasOwnProperty("dataTaxonomyId")) - if (!$util.isString(message.dataTaxonomyId)) - return "dataTaxonomyId: string expected"; - if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) { - var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomy); - if (error) - return "dataTaxonomy." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} CreateDataTaxonomyRequest - */ - CreateDataTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dataTaxonomyId != null) - message.dataTaxonomyId = String(object.dataTaxonomyId); - if (object.dataTaxonomy != null) { - if (typeof object.dataTaxonomy !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateDataTaxonomyRequest.dataTaxonomy: object expected"); - message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomy); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateDataTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.CreateDataTaxonomyRequest} message CreateDataTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDataTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dataTaxonomyId = ""; - object.dataTaxonomy = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dataTaxonomyId != null && message.hasOwnProperty("dataTaxonomyId")) - object.dataTaxonomyId = message.dataTaxonomyId; - if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) - object.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomy, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateDataTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDataTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateDataTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateDataTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"; - }; - - return CreateDataTaxonomyRequest; - })(); - - v1.UpdateDataTaxonomyRequest = (function() { - - /** - * Properties of an UpdateDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateDataTaxonomyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataTaxonomyRequest updateMask - * @property {google.cloud.dataplex.v1.IDataTaxonomy|null} [dataTaxonomy] UpdateDataTaxonomyRequest dataTaxonomy - * @property {boolean|null} [validateOnly] UpdateDataTaxonomyRequest validateOnly - */ - - /** - * Constructs a new UpdateDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateDataTaxonomyRequest. - * @implements IUpdateDataTaxonomyRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest=} [properties] Properties to set - */ - function UpdateDataTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataTaxonomyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @instance - */ - UpdateDataTaxonomyRequest.prototype.updateMask = null; - - /** - * UpdateDataTaxonomyRequest dataTaxonomy. - * @member {google.cloud.dataplex.v1.IDataTaxonomy|null|undefined} dataTaxonomy - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @instance - */ - UpdateDataTaxonomyRequest.prototype.dataTaxonomy = null; - - /** - * UpdateDataTaxonomyRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @instance - */ - UpdateDataTaxonomyRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateDataTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest instance - */ - UpdateDataTaxonomyRequest.create = function create(properties) { - return new UpdateDataTaxonomyRequest(properties); - }; - - /** - * Encodes the specified UpdateDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataTaxonomyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataTaxonomy != null && Object.hasOwnProperty.call(message, "dataTaxonomy")) - $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataTaxonomyRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataTaxonomyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) { - var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomy); - if (error) - return "dataTaxonomy." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} UpdateDataTaxonomyRequest - */ - UpdateDataTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataTaxonomy != null) { - if (typeof object.dataTaxonomy !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.dataTaxonomy: object expected"); - message.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomy); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateDataTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} message UpdateDataTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataTaxonomy = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataTaxonomy != null && message.hasOwnProperty("dataTaxonomy")) - object.dataTaxonomy = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomy, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateDataTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"; - }; - - return UpdateDataTaxonomyRequest; - })(); - - v1.GetDataTaxonomyRequest = (function() { - - /** - * Properties of a GetDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetDataTaxonomyRequest - * @property {string|null} [name] GetDataTaxonomyRequest name - */ - - /** - * Constructs a new GetDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetDataTaxonomyRequest. - * @implements IGetDataTaxonomyRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest=} [properties] Properties to set - */ - function GetDataTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @instance - */ - GetDataTaxonomyRequest.prototype.name = ""; - - /** - * Creates a new GetDataTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest instance - */ - GetDataTaxonomyRequest.create = function create(properties) { - return new GetDataTaxonomyRequest(properties); - }; - - /** - * Encodes the specified GetDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} message GetDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataTaxonomyRequest.encode = function encode(message, writer) { - 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 GetDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataTaxonomyRequest} message GetDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest(); - 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 GetDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataTaxonomyRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataTaxonomyRequest.verify = function verify(message) { - if (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 GetDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetDataTaxonomyRequest} GetDataTaxonomyRequest - */ - GetDataTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetDataTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.GetDataTaxonomyRequest} message GetDataTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataTaxonomyRequest.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 GetDataTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetDataTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataTaxonomyRequest"; - }; - - return GetDataTaxonomyRequest; - })(); - - v1.ListDataTaxonomiesRequest = (function() { - - /** - * Properties of a ListDataTaxonomiesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataTaxonomiesRequest - * @property {string|null} [parent] ListDataTaxonomiesRequest parent - * @property {number|null} [pageSize] ListDataTaxonomiesRequest pageSize - * @property {string|null} [pageToken] ListDataTaxonomiesRequest pageToken - * @property {string|null} [filter] ListDataTaxonomiesRequest filter - * @property {string|null} [orderBy] ListDataTaxonomiesRequest orderBy - */ - - /** - * Constructs a new ListDataTaxonomiesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataTaxonomiesRequest. - * @implements IListDataTaxonomiesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest=} [properties] Properties to set - */ - function ListDataTaxonomiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - */ - ListDataTaxonomiesRequest.prototype.parent = ""; - - /** - * ListDataTaxonomiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - */ - ListDataTaxonomiesRequest.prototype.pageSize = 0; - - /** - * ListDataTaxonomiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - */ - ListDataTaxonomiesRequest.prototype.pageToken = ""; - - /** - * ListDataTaxonomiesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - */ - ListDataTaxonomiesRequest.prototype.filter = ""; - - /** - * ListDataTaxonomiesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - */ - ListDataTaxonomiesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest instance - */ - ListDataTaxonomiesRequest.create = function create(properties) { - return new ListDataTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ListDataTaxonomiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} message ListDataTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataTaxonomiesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDataTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesRequest} message ListDataTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataTaxonomiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDataTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} ListDataTaxonomiesRequest - */ - ListDataTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDataTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {google.cloud.dataplex.v1.ListDataTaxonomiesRequest} message ListDataTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataTaxonomiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDataTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"; - }; - - return ListDataTaxonomiesRequest; - })(); - - v1.ListDataTaxonomiesResponse = (function() { - - /** - * Properties of a ListDataTaxonomiesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataTaxonomiesResponse - * @property {Array.|null} [dataTaxonomies] ListDataTaxonomiesResponse dataTaxonomies - * @property {string|null} [nextPageToken] ListDataTaxonomiesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListDataTaxonomiesResponse unreachableLocations - */ - - /** - * Constructs a new ListDataTaxonomiesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataTaxonomiesResponse. - * @implements IListDataTaxonomiesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse=} [properties] Properties to set - */ - function ListDataTaxonomiesResponse(properties) { - this.dataTaxonomies = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataTaxonomiesResponse dataTaxonomies. - * @member {Array.} dataTaxonomies - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @instance - */ - ListDataTaxonomiesResponse.prototype.dataTaxonomies = $util.emptyArray; - - /** - * ListDataTaxonomiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @instance - */ - ListDataTaxonomiesResponse.prototype.nextPageToken = ""; - - /** - * ListDataTaxonomiesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @instance - */ - ListDataTaxonomiesResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListDataTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse instance - */ - ListDataTaxonomiesResponse.create = function create(properties) { - return new ListDataTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ListDataTaxonomiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse} message ListDataTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataTaxonomies != null && message.dataTaxonomies.length) - for (var i = 0; i < message.dataTaxonomies.length; ++i) - $root.google.cloud.dataplex.v1.DataTaxonomy.encode(message.dataTaxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListDataTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataTaxonomiesResponse} message ListDataTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataTaxonomies && message.dataTaxonomies.length)) - message.dataTaxonomies = []; - message.dataTaxonomies.push($root.google.cloud.dataplex.v1.DataTaxonomy.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataTaxonomies != null && message.hasOwnProperty("dataTaxonomies")) { - if (!Array.isArray(message.dataTaxonomies)) - return "dataTaxonomies: array expected"; - for (var i = 0; i < message.dataTaxonomies.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataTaxonomy.verify(message.dataTaxonomies[i]); - if (error) - return "dataTaxonomies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListDataTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} ListDataTaxonomiesResponse - */ - ListDataTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(); - if (object.dataTaxonomies) { - if (!Array.isArray(object.dataTaxonomies)) - throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.dataTaxonomies: array expected"); - message.dataTaxonomies = []; - for (var i = 0; i < object.dataTaxonomies.length; ++i) { - if (typeof object.dataTaxonomies[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.dataTaxonomies: object expected"); - message.dataTaxonomies[i] = $root.google.cloud.dataplex.v1.DataTaxonomy.fromObject(object.dataTaxonomies[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListDataTaxonomiesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListDataTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {google.cloud.dataplex.v1.ListDataTaxonomiesResponse} message ListDataTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataTaxonomies = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataTaxonomies && message.dataTaxonomies.length) { - object.dataTaxonomies = []; - for (var j = 0; j < message.dataTaxonomies.length; ++j) - object.dataTaxonomies[j] = $root.google.cloud.dataplex.v1.DataTaxonomy.toObject(message.dataTaxonomies[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListDataTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"; - }; - - return ListDataTaxonomiesResponse; - })(); - - v1.DeleteDataTaxonomyRequest = (function() { - - /** - * Properties of a DeleteDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteDataTaxonomyRequest - * @property {string|null} [name] DeleteDataTaxonomyRequest name - * @property {string|null} [etag] DeleteDataTaxonomyRequest etag - */ - - /** - * Constructs a new DeleteDataTaxonomyRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteDataTaxonomyRequest. - * @implements IDeleteDataTaxonomyRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest=} [properties] Properties to set - */ - function DeleteDataTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteDataTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @instance - */ - DeleteDataTaxonomyRequest.prototype.name = ""; - - /** - * DeleteDataTaxonomyRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @instance - */ - DeleteDataTaxonomyRequest.prototype.etag = ""; - - /** - * Creates a new DeleteDataTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest instance - */ - DeleteDataTaxonomyRequest.create = function create(properties) { - return new DeleteDataTaxonomyRequest(properties); - }; - - /** - * Encodes the specified DeleteDataTaxonomyRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataTaxonomyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteDataTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteDataTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteDataTaxonomyRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDataTaxonomyRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteDataTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} DeleteDataTaxonomyRequest - */ - DeleteDataTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteDataTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} message DeleteDataTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDataTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteDataTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDataTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteDataTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteDataTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"; - }; - - return DeleteDataTaxonomyRequest; - })(); - - v1.CreateDataAttributeRequest = (function() { - - /** - * Properties of a CreateDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateDataAttributeRequest - * @property {string|null} [parent] CreateDataAttributeRequest parent - * @property {string|null} [dataAttributeId] CreateDataAttributeRequest dataAttributeId - * @property {google.cloud.dataplex.v1.IDataAttribute|null} [dataAttribute] CreateDataAttributeRequest dataAttribute - * @property {boolean|null} [validateOnly] CreateDataAttributeRequest validateOnly - */ - - /** - * Constructs a new CreateDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateDataAttributeRequest. - * @implements ICreateDataAttributeRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest=} [properties] Properties to set - */ - function CreateDataAttributeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateDataAttributeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @instance - */ - CreateDataAttributeRequest.prototype.parent = ""; - - /** - * CreateDataAttributeRequest dataAttributeId. - * @member {string} dataAttributeId - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @instance - */ - CreateDataAttributeRequest.prototype.dataAttributeId = ""; - - /** - * CreateDataAttributeRequest dataAttribute. - * @member {google.cloud.dataplex.v1.IDataAttribute|null|undefined} dataAttribute - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @instance - */ - CreateDataAttributeRequest.prototype.dataAttribute = null; - - /** - * CreateDataAttributeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @instance - */ - CreateDataAttributeRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateDataAttributeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest instance - */ - CreateDataAttributeRequest.create = function create(properties) { - return new CreateDataAttributeRequest(properties); - }; - - /** - * Encodes the specified CreateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} message CreateDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataAttributeRequest.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.dataAttributeId != null && Object.hasOwnProperty.call(message, "dataAttributeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAttributeId); - if (message.dataAttribute != null && Object.hasOwnProperty.call(message, "dataAttribute")) - $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttribute, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeRequest} message CreateDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateDataAttributeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataAttributeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataAttributeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.dataAttributeId = reader.string(); - break; - } - case 3: { - message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateDataAttributeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateDataAttributeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDataAttributeRequest.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.dataAttributeId != null && message.hasOwnProperty("dataAttributeId")) - if (!$util.isString(message.dataAttributeId)) - return "dataAttributeId: string expected"; - if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) { - var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttribute); - if (error) - return "dataAttribute." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateDataAttributeRequest} CreateDataAttributeRequest - */ - CreateDataAttributeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateDataAttributeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateDataAttributeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dataAttributeId != null) - message.dataAttributeId = String(object.dataAttributeId); - if (object.dataAttribute != null) { - if (typeof object.dataAttribute !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateDataAttributeRequest.dataAttribute: object expected"); - message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttribute); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateDataAttributeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.CreateDataAttributeRequest} message CreateDataAttributeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDataAttributeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dataAttributeId = ""; - object.dataAttribute = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dataAttributeId != null && message.hasOwnProperty("dataAttributeId")) - object.dataAttributeId = message.dataAttributeId; - if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) - object.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttribute, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateDataAttributeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDataAttributeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateDataAttributeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateDataAttributeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataAttributeRequest"; - }; - - return CreateDataAttributeRequest; - })(); - - v1.UpdateDataAttributeRequest = (function() { - - /** - * Properties of an UpdateDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateDataAttributeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAttributeRequest updateMask - * @property {google.cloud.dataplex.v1.IDataAttribute|null} [dataAttribute] UpdateDataAttributeRequest dataAttribute - * @property {boolean|null} [validateOnly] UpdateDataAttributeRequest validateOnly - */ - - /** - * Constructs a new UpdateDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateDataAttributeRequest. - * @implements IUpdateDataAttributeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest=} [properties] Properties to set - */ - function UpdateDataAttributeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataAttributeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @instance - */ - UpdateDataAttributeRequest.prototype.updateMask = null; - - /** - * UpdateDataAttributeRequest dataAttribute. - * @member {google.cloud.dataplex.v1.IDataAttribute|null|undefined} dataAttribute - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @instance - */ - UpdateDataAttributeRequest.prototype.dataAttribute = null; - - /** - * UpdateDataAttributeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @instance - */ - UpdateDataAttributeRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateDataAttributeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest instance - */ - UpdateDataAttributeRequest.create = function create(properties) { - return new UpdateDataAttributeRequest(properties); - }; - - /** - * Encodes the specified UpdateDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} message UpdateDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataAttributeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataAttribute != null && Object.hasOwnProperty.call(message, "dataAttribute")) - $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttribute, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeRequest} message UpdateDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataAttributeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataAttributeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataAttributeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataAttributeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) { - var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttribute); - if (error) - return "dataAttribute." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeRequest} UpdateDataAttributeRequest - */ - UpdateDataAttributeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataAttribute != null) { - if (typeof object.dataAttribute !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeRequest.dataAttribute: object expected"); - message.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttribute); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateDataAttributeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateDataAttributeRequest} message UpdateDataAttributeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataAttributeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataAttribute = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataAttribute != null && message.hasOwnProperty("dataAttribute")) - object.dataAttribute = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttribute, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateDataAttributeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataAttributeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataAttributeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataAttributeRequest"; - }; - - return UpdateDataAttributeRequest; - })(); - - v1.GetDataAttributeRequest = (function() { - - /** - * Properties of a GetDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetDataAttributeRequest - * @property {string|null} [name] GetDataAttributeRequest name - */ - - /** - * Constructs a new GetDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetDataAttributeRequest. - * @implements IGetDataAttributeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest=} [properties] Properties to set - */ - function GetDataAttributeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataAttributeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @instance - */ - GetDataAttributeRequest.prototype.name = ""; - - /** - * Creates a new GetDataAttributeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest instance - */ - GetDataAttributeRequest.create = function create(properties) { - return new GetDataAttributeRequest(properties); - }; - - /** - * Encodes the specified GetDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} message GetDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataAttributeRequest.encode = function encode(message, writer) { - 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 GetDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeRequest} message GetDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataAttributeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataAttributeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataAttributeRequest(); - 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 GetDataAttributeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataAttributeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataAttributeRequest.verify = function verify(message) { - if (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 GetDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetDataAttributeRequest} GetDataAttributeRequest - */ - GetDataAttributeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetDataAttributeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetDataAttributeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataAttributeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.GetDataAttributeRequest} message GetDataAttributeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataAttributeRequest.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 GetDataAttributeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataAttributeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataAttributeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetDataAttributeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataAttributeRequest"; - }; - - return GetDataAttributeRequest; - })(); - - v1.ListDataAttributesRequest = (function() { - - /** - * Properties of a ListDataAttributesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataAttributesRequest - * @property {string|null} [parent] ListDataAttributesRequest parent - * @property {number|null} [pageSize] ListDataAttributesRequest pageSize - * @property {string|null} [pageToken] ListDataAttributesRequest pageToken - * @property {string|null} [filter] ListDataAttributesRequest filter - * @property {string|null} [orderBy] ListDataAttributesRequest orderBy - */ - - /** - * Constructs a new ListDataAttributesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataAttributesRequest. - * @implements IListDataAttributesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest=} [properties] Properties to set - */ - function ListDataAttributesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataAttributesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - */ - ListDataAttributesRequest.prototype.parent = ""; - - /** - * ListDataAttributesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - */ - ListDataAttributesRequest.prototype.pageSize = 0; - - /** - * ListDataAttributesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - */ - ListDataAttributesRequest.prototype.pageToken = ""; - - /** - * ListDataAttributesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - */ - ListDataAttributesRequest.prototype.filter = ""; - - /** - * ListDataAttributesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - */ - ListDataAttributesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataAttributesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest instance - */ - ListDataAttributesRequest.create = function create(properties) { - return new ListDataAttributesRequest(properties); - }; - - /** - * Encodes the specified ListDataAttributesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} message ListDataAttributesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDataAttributesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesRequest} message ListDataAttributesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataAttributesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributesRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataAttributesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataAttributesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataAttributesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDataAttributesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataAttributesRequest} ListDataAttributesRequest - */ - ListDataAttributesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataAttributesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDataAttributesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {google.cloud.dataplex.v1.ListDataAttributesRequest} message ListDataAttributesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataAttributesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDataAttributesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataAttributesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataAttributesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataAttributesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataAttributesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributesRequest"; - }; - - return ListDataAttributesRequest; - })(); - - v1.ListDataAttributesResponse = (function() { - - /** - * Properties of a ListDataAttributesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataAttributesResponse - * @property {Array.|null} [dataAttributes] ListDataAttributesResponse dataAttributes - * @property {string|null} [nextPageToken] ListDataAttributesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListDataAttributesResponse unreachableLocations - */ - - /** - * Constructs a new ListDataAttributesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataAttributesResponse. - * @implements IListDataAttributesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListDataAttributesResponse=} [properties] Properties to set - */ - function ListDataAttributesResponse(properties) { - this.dataAttributes = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataAttributesResponse dataAttributes. - * @member {Array.} dataAttributes - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @instance - */ - ListDataAttributesResponse.prototype.dataAttributes = $util.emptyArray; - - /** - * ListDataAttributesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @instance - */ - ListDataAttributesResponse.prototype.nextPageToken = ""; - - /** - * ListDataAttributesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @instance - */ - ListDataAttributesResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListDataAttributesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse instance - */ - ListDataAttributesResponse.create = function create(properties) { - return new ListDataAttributesResponse(properties); - }; - - /** - * Encodes the specified ListDataAttributesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesResponse} message ListDataAttributesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataAttributes != null && message.dataAttributes.length) - for (var i = 0; i < message.dataAttributes.length; ++i) - $root.google.cloud.dataplex.v1.DataAttribute.encode(message.dataAttributes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListDataAttributesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributesResponse} message ListDataAttributesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataAttributesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataAttributes && message.dataAttributes.length)) - message.dataAttributes = []; - message.dataAttributes.push($root.google.cloud.dataplex.v1.DataAttribute.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataAttributesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataAttributesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataAttributesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataAttributes != null && message.hasOwnProperty("dataAttributes")) { - if (!Array.isArray(message.dataAttributes)) - return "dataAttributes: array expected"; - for (var i = 0; i < message.dataAttributes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataAttribute.verify(message.dataAttributes[i]); - if (error) - return "dataAttributes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListDataAttributesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataAttributesResponse} ListDataAttributesResponse - */ - ListDataAttributesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataAttributesResponse(); - if (object.dataAttributes) { - if (!Array.isArray(object.dataAttributes)) - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.dataAttributes: array expected"); - message.dataAttributes = []; - for (var i = 0; i < object.dataAttributes.length; ++i) { - if (typeof object.dataAttributes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.dataAttributes: object expected"); - message.dataAttributes[i] = $root.google.cloud.dataplex.v1.DataAttribute.fromObject(object.dataAttributes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListDataAttributesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {google.cloud.dataplex.v1.ListDataAttributesResponse} message ListDataAttributesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataAttributesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataAttributes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataAttributes && message.dataAttributes.length) { - object.dataAttributes = []; - for (var j = 0; j < message.dataAttributes.length; ++j) - object.dataAttributes[j] = $root.google.cloud.dataplex.v1.DataAttribute.toObject(message.dataAttributes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListDataAttributesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataAttributesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataAttributesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataAttributesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataAttributesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributesResponse"; - }; - - return ListDataAttributesResponse; - })(); - - v1.DeleteDataAttributeRequest = (function() { - - /** - * Properties of a DeleteDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteDataAttributeRequest - * @property {string|null} [name] DeleteDataAttributeRequest name - * @property {string|null} [etag] DeleteDataAttributeRequest etag - */ - - /** - * Constructs a new DeleteDataAttributeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteDataAttributeRequest. - * @implements IDeleteDataAttributeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest=} [properties] Properties to set - */ - function DeleteDataAttributeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteDataAttributeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @instance - */ - DeleteDataAttributeRequest.prototype.name = ""; - - /** - * DeleteDataAttributeRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @instance - */ - DeleteDataAttributeRequest.prototype.etag = ""; - - /** - * Creates a new DeleteDataAttributeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest instance - */ - DeleteDataAttributeRequest.create = function create(properties) { - return new DeleteDataAttributeRequest(properties); - }; - - /** - * Encodes the specified DeleteDataAttributeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} message DeleteDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataAttributeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteDataAttributeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeRequest} message DeleteDataAttributeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataAttributeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataAttributeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteDataAttributeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataAttributeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteDataAttributeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDataAttributeRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteDataAttributeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeRequest} DeleteDataAttributeRequest - */ - DeleteDataAttributeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteDataAttributeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteDataAttributeRequest} message DeleteDataAttributeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDataAttributeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteDataAttributeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDataAttributeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteDataAttributeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteDataAttributeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataAttributeRequest"; - }; - - return DeleteDataAttributeRequest; - })(); - - v1.CreateDataAttributeBindingRequest = (function() { - - /** - * Properties of a CreateDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateDataAttributeBindingRequest - * @property {string|null} [parent] CreateDataAttributeBindingRequest parent - * @property {string|null} [dataAttributeBindingId] CreateDataAttributeBindingRequest dataAttributeBindingId - * @property {google.cloud.dataplex.v1.IDataAttributeBinding|null} [dataAttributeBinding] CreateDataAttributeBindingRequest dataAttributeBinding - * @property {boolean|null} [validateOnly] CreateDataAttributeBindingRequest validateOnly - */ - - /** - * Constructs a new CreateDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateDataAttributeBindingRequest. - * @implements ICreateDataAttributeBindingRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest=} [properties] Properties to set - */ - function CreateDataAttributeBindingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateDataAttributeBindingRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @instance - */ - CreateDataAttributeBindingRequest.prototype.parent = ""; - - /** - * CreateDataAttributeBindingRequest dataAttributeBindingId. - * @member {string} dataAttributeBindingId - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @instance - */ - CreateDataAttributeBindingRequest.prototype.dataAttributeBindingId = ""; - - /** - * CreateDataAttributeBindingRequest dataAttributeBinding. - * @member {google.cloud.dataplex.v1.IDataAttributeBinding|null|undefined} dataAttributeBinding - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @instance - */ - CreateDataAttributeBindingRequest.prototype.dataAttributeBinding = null; - - /** - * CreateDataAttributeBindingRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @instance - */ - CreateDataAttributeBindingRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateDataAttributeBindingRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest instance - */ - CreateDataAttributeBindingRequest.create = function create(properties) { - return new CreateDataAttributeBindingRequest(properties); - }; - - /** - * Encodes the specified CreateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataAttributeBindingRequest.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.dataAttributeBindingId != null && Object.hasOwnProperty.call(message, "dataAttributeBindingId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataAttributeBindingId); - if (message.dataAttributeBinding != null && Object.hasOwnProperty.call(message, "dataAttributeBinding")) - $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataAttributeBindingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.dataAttributeBindingId = reader.string(); - break; - } - case 3: { - message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateDataAttributeBindingRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDataAttributeBindingRequest.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.dataAttributeBindingId != null && message.hasOwnProperty("dataAttributeBindingId")) - if (!$util.isString(message.dataAttributeBindingId)) - return "dataAttributeBindingId: string expected"; - if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) { - var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBinding); - if (error) - return "dataAttributeBinding." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} CreateDataAttributeBindingRequest - */ - CreateDataAttributeBindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dataAttributeBindingId != null) - message.dataAttributeBindingId = String(object.dataAttributeBindingId); - if (object.dataAttributeBinding != null) { - if (typeof object.dataAttributeBinding !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.dataAttributeBinding: object expected"); - message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBinding); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateDataAttributeBindingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} message CreateDataAttributeBindingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDataAttributeBindingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dataAttributeBindingId = ""; - object.dataAttributeBinding = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dataAttributeBindingId != null && message.hasOwnProperty("dataAttributeBindingId")) - object.dataAttributeBindingId = message.dataAttributeBindingId; - if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) - object.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBinding, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateDataAttributeBindingRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDataAttributeBindingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateDataAttributeBindingRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"; - }; - - return CreateDataAttributeBindingRequest; - })(); - - v1.UpdateDataAttributeBindingRequest = (function() { - - /** - * Properties of an UpdateDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateDataAttributeBindingRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataAttributeBindingRequest updateMask - * @property {google.cloud.dataplex.v1.IDataAttributeBinding|null} [dataAttributeBinding] UpdateDataAttributeBindingRequest dataAttributeBinding - * @property {boolean|null} [validateOnly] UpdateDataAttributeBindingRequest validateOnly - */ - - /** - * Constructs a new UpdateDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateDataAttributeBindingRequest. - * @implements IUpdateDataAttributeBindingRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest=} [properties] Properties to set - */ - function UpdateDataAttributeBindingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataAttributeBindingRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @instance - */ - UpdateDataAttributeBindingRequest.prototype.updateMask = null; - - /** - * UpdateDataAttributeBindingRequest dataAttributeBinding. - * @member {google.cloud.dataplex.v1.IDataAttributeBinding|null|undefined} dataAttributeBinding - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @instance - */ - UpdateDataAttributeBindingRequest.prototype.dataAttributeBinding = null; - - /** - * UpdateDataAttributeBindingRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @instance - */ - UpdateDataAttributeBindingRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateDataAttributeBindingRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest instance - */ - UpdateDataAttributeBindingRequest.create = function create(properties) { - return new UpdateDataAttributeBindingRequest(properties); - }; - - /** - * Encodes the specified UpdateDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataAttributeBindingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataAttributeBinding != null && Object.hasOwnProperty.call(message, "dataAttributeBinding")) - $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBinding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataAttributeBindingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataAttributeBindingRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataAttributeBindingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) { - var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBinding); - if (error) - return "dataAttributeBinding." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} UpdateDataAttributeBindingRequest - */ - UpdateDataAttributeBindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataAttributeBinding != null) { - if (typeof object.dataAttributeBinding !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.dataAttributeBinding: object expected"); - message.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBinding); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateDataAttributeBindingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} message UpdateDataAttributeBindingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataAttributeBindingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataAttributeBinding = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataAttributeBinding != null && message.hasOwnProperty("dataAttributeBinding")) - object.dataAttributeBinding = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBinding, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateDataAttributeBindingRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataAttributeBindingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataAttributeBindingRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"; - }; - - return UpdateDataAttributeBindingRequest; - })(); - - v1.GetDataAttributeBindingRequest = (function() { - - /** - * Properties of a GetDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetDataAttributeBindingRequest - * @property {string|null} [name] GetDataAttributeBindingRequest name - */ - - /** - * Constructs a new GetDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetDataAttributeBindingRequest. - * @implements IGetDataAttributeBindingRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest=} [properties] Properties to set - */ - function GetDataAttributeBindingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataAttributeBindingRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @instance - */ - GetDataAttributeBindingRequest.prototype.name = ""; - - /** - * Creates a new GetDataAttributeBindingRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest instance - */ - GetDataAttributeBindingRequest.create = function create(properties) { - return new GetDataAttributeBindingRequest(properties); - }; - - /** - * Encodes the specified GetDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} message GetDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataAttributeBindingRequest.encode = function encode(message, writer) { - 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 GetDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataAttributeBindingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataAttributeBindingRequest} message GetDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataAttributeBindingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataAttributeBindingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(); - 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 GetDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataAttributeBindingRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataAttributeBindingRequest.verify = function verify(message) { - if (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 GetDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} GetDataAttributeBindingRequest - */ - GetDataAttributeBindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataAttributeBindingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.GetDataAttributeBindingRequest} message GetDataAttributeBindingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataAttributeBindingRequest.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 GetDataAttributeBindingRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataAttributeBindingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataAttributeBindingRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetDataAttributeBindingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"; - }; - - return GetDataAttributeBindingRequest; - })(); - - v1.ListDataAttributeBindingsRequest = (function() { - - /** - * Properties of a ListDataAttributeBindingsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataAttributeBindingsRequest - * @property {string|null} [parent] ListDataAttributeBindingsRequest parent - * @property {number|null} [pageSize] ListDataAttributeBindingsRequest pageSize - * @property {string|null} [pageToken] ListDataAttributeBindingsRequest pageToken - * @property {string|null} [filter] ListDataAttributeBindingsRequest filter - * @property {string|null} [orderBy] ListDataAttributeBindingsRequest orderBy - */ - - /** - * Constructs a new ListDataAttributeBindingsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataAttributeBindingsRequest. - * @implements IListDataAttributeBindingsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest=} [properties] Properties to set - */ - function ListDataAttributeBindingsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataAttributeBindingsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - */ - ListDataAttributeBindingsRequest.prototype.parent = ""; - - /** - * ListDataAttributeBindingsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - */ - ListDataAttributeBindingsRequest.prototype.pageSize = 0; - - /** - * ListDataAttributeBindingsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - */ - ListDataAttributeBindingsRequest.prototype.pageToken = ""; - - /** - * ListDataAttributeBindingsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - */ - ListDataAttributeBindingsRequest.prototype.filter = ""; - - /** - * ListDataAttributeBindingsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - */ - ListDataAttributeBindingsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataAttributeBindingsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest instance - */ - ListDataAttributeBindingsRequest.create = function create(properties) { - return new ListDataAttributeBindingsRequest(properties); - }; - - /** - * Encodes the specified ListDataAttributeBindingsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributeBindingsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDataAttributeBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributeBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributeBindingsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataAttributeBindingsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributeBindingsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataAttributeBindingsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataAttributeBindingsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDataAttributeBindingsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} ListDataAttributeBindingsRequest - */ - ListDataAttributeBindingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDataAttributeBindingsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} message ListDataAttributeBindingsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataAttributeBindingsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDataAttributeBindingsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataAttributeBindingsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataAttributeBindingsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataAttributeBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"; - }; - - return ListDataAttributeBindingsRequest; - })(); - - v1.ListDataAttributeBindingsResponse = (function() { - - /** - * Properties of a ListDataAttributeBindingsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataAttributeBindingsResponse - * @property {Array.|null} [dataAttributeBindings] ListDataAttributeBindingsResponse dataAttributeBindings - * @property {string|null} [nextPageToken] ListDataAttributeBindingsResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListDataAttributeBindingsResponse unreachableLocations - */ - - /** - * Constructs a new ListDataAttributeBindingsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataAttributeBindingsResponse. - * @implements IListDataAttributeBindingsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse=} [properties] Properties to set - */ - function ListDataAttributeBindingsResponse(properties) { - this.dataAttributeBindings = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataAttributeBindingsResponse dataAttributeBindings. - * @member {Array.} dataAttributeBindings - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @instance - */ - ListDataAttributeBindingsResponse.prototype.dataAttributeBindings = $util.emptyArray; - - /** - * ListDataAttributeBindingsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @instance - */ - ListDataAttributeBindingsResponse.prototype.nextPageToken = ""; - - /** - * ListDataAttributeBindingsResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @instance - */ - ListDataAttributeBindingsResponse.prototype.unreachableLocations = $util.emptyArray; - - /** - * Creates a new ListDataAttributeBindingsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse instance - */ - ListDataAttributeBindingsResponse.create = function create(properties) { - return new ListDataAttributeBindingsResponse(properties); - }; - - /** - * Encodes the specified ListDataAttributeBindingsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributeBindingsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataAttributeBindings != null && message.dataAttributeBindings.length) - for (var i = 0; i < message.dataAttributeBindings.length; ++i) - $root.google.cloud.dataplex.v1.DataAttributeBinding.encode(message.dataAttributeBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; - - /** - * Encodes the specified ListDataAttributeBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataAttributeBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributeBindingsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataAttributeBindings && message.dataAttributeBindings.length)) - message.dataAttributeBindings = []; - message.dataAttributeBindings.push($root.google.cloud.dataplex.v1.DataAttributeBinding.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataAttributeBindingsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataAttributeBindingsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataAttributeBindingsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataAttributeBindingsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataAttributeBindings != null && message.hasOwnProperty("dataAttributeBindings")) { - if (!Array.isArray(message.dataAttributeBindings)) - return "dataAttributeBindings: array expected"; - for (var i = 0; i < message.dataAttributeBindings.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataAttributeBinding.verify(message.dataAttributeBindings[i]); - if (error) - return "dataAttributeBindings." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a ListDataAttributeBindingsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} ListDataAttributeBindingsResponse - */ - ListDataAttributeBindingsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(); - if (object.dataAttributeBindings) { - if (!Array.isArray(object.dataAttributeBindings)) - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.dataAttributeBindings: array expected"); - message.dataAttributeBindings = []; - for (var i = 0; i < object.dataAttributeBindings.length; ++i) { - if (typeof object.dataAttributeBindings[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.dataAttributeBindings: object expected"); - message.dataAttributeBindings[i] = $root.google.cloud.dataplex.v1.DataAttributeBinding.fromObject(object.dataAttributeBindings[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListDataAttributeBindingsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} message ListDataAttributeBindingsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataAttributeBindingsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataAttributeBindings = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataAttributeBindings && message.dataAttributeBindings.length) { - object.dataAttributeBindings = []; - for (var j = 0; j < message.dataAttributeBindings.length; ++j) - object.dataAttributeBindings[j] = $root.google.cloud.dataplex.v1.DataAttributeBinding.toObject(message.dataAttributeBindings[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; - - /** - * Converts this ListDataAttributeBindingsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataAttributeBindingsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataAttributeBindingsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataAttributeBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"; - }; - - return ListDataAttributeBindingsResponse; - })(); - - v1.DeleteDataAttributeBindingRequest = (function() { - - /** - * Properties of a DeleteDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteDataAttributeBindingRequest - * @property {string|null} [name] DeleteDataAttributeBindingRequest name - * @property {string|null} [etag] DeleteDataAttributeBindingRequest etag - */ - - /** - * Constructs a new DeleteDataAttributeBindingRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteDataAttributeBindingRequest. - * @implements IDeleteDataAttributeBindingRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest=} [properties] Properties to set - */ - function DeleteDataAttributeBindingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteDataAttributeBindingRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @instance - */ - DeleteDataAttributeBindingRequest.prototype.name = ""; - - /** - * DeleteDataAttributeBindingRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @instance - */ - DeleteDataAttributeBindingRequest.prototype.etag = ""; - - /** - * Creates a new DeleteDataAttributeBindingRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest instance - */ - DeleteDataAttributeBindingRequest.create = function create(properties) { - return new DeleteDataAttributeBindingRequest(properties); - }; - - /** - * Encodes the specified DeleteDataAttributeBindingRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataAttributeBindingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteDataAttributeBindingRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataAttributeBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataAttributeBindingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteDataAttributeBindingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataAttributeBindingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteDataAttributeBindingRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDataAttributeBindingRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteDataAttributeBindingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} DeleteDataAttributeBindingRequest - */ - DeleteDataAttributeBindingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteDataAttributeBindingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} message DeleteDataAttributeBindingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDataAttributeBindingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteDataAttributeBindingRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDataAttributeBindingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteDataAttributeBindingRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteDataAttributeBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"; - }; - - return DeleteDataAttributeBindingRequest; - })(); - - v1.ResourceAccessSpec = (function() { - - /** - * Properties of a ResourceAccessSpec. - * @memberof google.cloud.dataplex.v1 - * @interface IResourceAccessSpec - * @property {Array.|null} [readers] ResourceAccessSpec readers - * @property {Array.|null} [writers] ResourceAccessSpec writers - * @property {Array.|null} [owners] ResourceAccessSpec owners - */ - - /** - * Constructs a new ResourceAccessSpec. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ResourceAccessSpec. - * @implements IResourceAccessSpec - * @constructor - * @param {google.cloud.dataplex.v1.IResourceAccessSpec=} [properties] Properties to set - */ - function ResourceAccessSpec(properties) { - this.readers = []; - this.writers = []; - this.owners = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceAccessSpec readers. - * @member {Array.} readers - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @instance - */ - ResourceAccessSpec.prototype.readers = $util.emptyArray; - - /** - * ResourceAccessSpec writers. - * @member {Array.} writers - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @instance - */ - ResourceAccessSpec.prototype.writers = $util.emptyArray; - - /** - * ResourceAccessSpec owners. - * @member {Array.} owners - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @instance - */ - ResourceAccessSpec.prototype.owners = $util.emptyArray; - - /** - * Creates a new ResourceAccessSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IResourceAccessSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec instance - */ - ResourceAccessSpec.create = function create(properties) { - return new ResourceAccessSpec(properties); - }; - - /** - * Encodes the specified ResourceAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IResourceAccessSpec} message ResourceAccessSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceAccessSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.readers != null && message.readers.length) - for (var i = 0; i < message.readers.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.readers[i]); - if (message.writers != null && message.writers.length) - for (var i = 0; i < message.writers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.writers[i]); - if (message.owners != null && message.owners.length) - for (var i = 0; i < message.owners.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.owners[i]); - return writer; - }; - - /** - * Encodes the specified ResourceAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ResourceAccessSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IResourceAccessSpec} message ResourceAccessSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceAccessSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceAccessSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceAccessSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ResourceAccessSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.readers && message.readers.length)) - message.readers = []; - message.readers.push(reader.string()); - break; - } - case 2: { - if (!(message.writers && message.writers.length)) - message.writers = []; - message.writers.push(reader.string()); - break; - } - case 3: { - if (!(message.owners && message.owners.length)) - message.owners = []; - message.owners.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceAccessSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceAccessSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceAccessSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceAccessSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readers != null && message.hasOwnProperty("readers")) { - if (!Array.isArray(message.readers)) - return "readers: array expected"; - for (var i = 0; i < message.readers.length; ++i) - if (!$util.isString(message.readers[i])) - return "readers: string[] expected"; - } - if (message.writers != null && message.hasOwnProperty("writers")) { - if (!Array.isArray(message.writers)) - return "writers: array expected"; - for (var i = 0; i < message.writers.length; ++i) - if (!$util.isString(message.writers[i])) - return "writers: string[] expected"; - } - if (message.owners != null && message.hasOwnProperty("owners")) { - if (!Array.isArray(message.owners)) - return "owners: array expected"; - for (var i = 0; i < message.owners.length; ++i) - if (!$util.isString(message.owners[i])) - return "owners: string[] expected"; - } - return null; - }; - - /** - * Creates a ResourceAccessSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ResourceAccessSpec} ResourceAccessSpec - */ - ResourceAccessSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ResourceAccessSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.ResourceAccessSpec(); - if (object.readers) { - if (!Array.isArray(object.readers)) - throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.readers: array expected"); - message.readers = []; - for (var i = 0; i < object.readers.length; ++i) - message.readers[i] = String(object.readers[i]); - } - if (object.writers) { - if (!Array.isArray(object.writers)) - throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.writers: array expected"); - message.writers = []; - for (var i = 0; i < object.writers.length; ++i) - message.writers[i] = String(object.writers[i]); - } - if (object.owners) { - if (!Array.isArray(object.owners)) - throw TypeError(".google.cloud.dataplex.v1.ResourceAccessSpec.owners: array expected"); - message.owners = []; - for (var i = 0; i < object.owners.length; ++i) - message.owners[i] = String(object.owners[i]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceAccessSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {google.cloud.dataplex.v1.ResourceAccessSpec} message ResourceAccessSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceAccessSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.readers = []; - object.writers = []; - object.owners = []; - } - if (message.readers && message.readers.length) { - object.readers = []; - for (var j = 0; j < message.readers.length; ++j) - object.readers[j] = message.readers[j]; - } - if (message.writers && message.writers.length) { - object.writers = []; - for (var j = 0; j < message.writers.length; ++j) - object.writers[j] = message.writers[j]; - } - if (message.owners && message.owners.length) { - object.owners = []; - for (var j = 0; j < message.owners.length; ++j) - object.owners[j] = message.owners[j]; - } - return object; - }; - - /** - * Converts this ResourceAccessSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @instance - * @returns {Object.} JSON object - */ - ResourceAccessSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceAccessSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ResourceAccessSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceAccessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ResourceAccessSpec"; - }; - - return ResourceAccessSpec; - })(); - - v1.DataAccessSpec = (function() { - - /** - * Properties of a DataAccessSpec. - * @memberof google.cloud.dataplex.v1 - * @interface IDataAccessSpec - * @property {Array.|null} [readers] DataAccessSpec readers - */ - - /** - * Constructs a new DataAccessSpec. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataAccessSpec. - * @implements IDataAccessSpec - * @constructor - * @param {google.cloud.dataplex.v1.IDataAccessSpec=} [properties] Properties to set - */ - function DataAccessSpec(properties) { - this.readers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataAccessSpec readers. - * @member {Array.} readers - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @instance - */ - DataAccessSpec.prototype.readers = $util.emptyArray; - - /** - * Creates a new DataAccessSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IDataAccessSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec instance - */ - DataAccessSpec.create = function create(properties) { - return new DataAccessSpec(properties); - }; - - /** - * Encodes the specified DataAccessSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IDataAccessSpec} message DataAccessSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAccessSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.readers != null && message.readers.length) - for (var i = 0; i < message.readers.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.readers[i]); - return writer; - }; - - /** - * Encodes the specified DataAccessSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataAccessSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {google.cloud.dataplex.v1.IDataAccessSpec} message DataAccessSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataAccessSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataAccessSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAccessSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataAccessSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.readers && message.readers.length)) - message.readers = []; - message.readers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataAccessSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataAccessSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataAccessSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataAccessSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readers != null && message.hasOwnProperty("readers")) { - if (!Array.isArray(message.readers)) - return "readers: array expected"; - for (var i = 0; i < message.readers.length; ++i) - if (!$util.isString(message.readers[i])) - return "readers: string[] expected"; - } - return null; - }; - - /** - * Creates a DataAccessSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataAccessSpec} DataAccessSpec - */ - DataAccessSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataAccessSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.DataAccessSpec(); - if (object.readers) { - if (!Array.isArray(object.readers)) - throw TypeError(".google.cloud.dataplex.v1.DataAccessSpec.readers: array expected"); - message.readers = []; - for (var i = 0; i < object.readers.length; ++i) - message.readers[i] = String(object.readers[i]); - } - return message; - }; - - /** - * Creates a plain object from a DataAccessSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {google.cloud.dataplex.v1.DataAccessSpec} message DataAccessSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataAccessSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.readers = []; - if (message.readers && message.readers.length) { - object.readers = []; - for (var j = 0; j < message.readers.length; ++j) - object.readers[j] = message.readers[j]; - } - return object; - }; - - /** - * Converts this DataAccessSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @instance - * @returns {Object.} JSON object - */ - DataAccessSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataAccessSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataAccessSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataAccessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataAccessSpec"; - }; - - return DataAccessSpec; - })(); - - v1.DataScanService = (function() { - - /** - * Constructs a new DataScanService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataScanService - * @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 DataScanService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataScanService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataScanService; - - /** - * Creates new DataScanService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanService - * @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 {DataScanService} RPC service. Useful where requests and/or responses are streamed. - */ - DataScanService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef CreateDataScanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDataScan. - * @function createDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.createDataScan = function createDataScan(request, callback) { - return this.rpcCall(createDataScan, $root.google.cloud.dataplex.v1.CreateDataScanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDataScan" }); - - /** - * Calls CreateDataScan. - * @function createDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef UpdateDataScanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataScan. - * @function updateDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.updateDataScan = function updateDataScan(request, callback) { - return this.rpcCall(updateDataScan, $root.google.cloud.dataplex.v1.UpdateDataScanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataScan" }); - - /** - * Calls UpdateDataScan. - * @function updateDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef DeleteDataScanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteDataScan. - * @function deleteDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.deleteDataScan = function deleteDataScan(request, callback) { - return this.rpcCall(deleteDataScan, $root.google.cloud.dataplex.v1.DeleteDataScanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDataScan" }); - - /** - * Calls DeleteDataScan. - * @function deleteDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef GetDataScanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.DataScan} [response] DataScan - */ - - /** - * Calls GetDataScan. - * @function getDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanCallback} callback Node-style callback called with the error, if any, and DataScan - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.getDataScan = function getDataScan(request, callback) { - return this.rpcCall(getDataScan, $root.google.cloud.dataplex.v1.GetDataScanRequest, $root.google.cloud.dataplex.v1.DataScan, request, callback); - }, "name", { value: "GetDataScan" }); - - /** - * Calls GetDataScan. - * @function getDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef ListDataScansCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListDataScansResponse} [response] ListDataScansResponse - */ - - /** - * Calls ListDataScans. - * @function listDataScans - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.ListDataScansCallback} callback Node-style callback called with the error, if any, and ListDataScansResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.listDataScans = function listDataScans(request, callback) { - return this.rpcCall(listDataScans, $root.google.cloud.dataplex.v1.ListDataScansRequest, $root.google.cloud.dataplex.v1.ListDataScansResponse, request, callback); - }, "name", { value: "ListDataScans" }); - - /** - * Calls ListDataScans. - * @function listDataScans - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef RunDataScanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.RunDataScanResponse} [response] RunDataScanResponse - */ - - /** - * Calls RunDataScan. - * @function runDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.RunDataScanCallback} callback Node-style callback called with the error, if any, and RunDataScanResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.runDataScan = function runDataScan(request, callback) { - return this.rpcCall(runDataScan, $root.google.cloud.dataplex.v1.RunDataScanRequest, $root.google.cloud.dataplex.v1.RunDataScanResponse, request, callback); - }, "name", { value: "RunDataScan" }); - - /** - * Calls RunDataScan. - * @function runDataScan - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef GetDataScanJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.DataScanJob} [response] DataScanJob - */ - - /** - * Calls GetDataScanJob. - * @function getDataScanJob - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback} callback Node-style callback called with the error, if any, and DataScanJob - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.getDataScanJob = function getDataScanJob(request, callback) { - return this.rpcCall(getDataScanJob, $root.google.cloud.dataplex.v1.GetDataScanJobRequest, $root.google.cloud.dataplex.v1.DataScanJob, request, callback); - }, "name", { value: "GetDataScanJob" }); - - /** - * Calls GetDataScanJob. - * @function getDataScanJob - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef ListDataScanJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} [response] ListDataScanJobsResponse - */ - - /** - * Calls ListDataScanJobs. - * @function listDataScanJobs - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback} callback Node-style callback called with the error, if any, and ListDataScanJobsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.listDataScanJobs = function listDataScanJobs(request, callback) { - return this.rpcCall(listDataScanJobs, $root.google.cloud.dataplex.v1.ListDataScanJobsRequest, $root.google.cloud.dataplex.v1.ListDataScanJobsResponse, request, callback); - }, "name", { value: "ListDataScanJobs" }); - - /** - * Calls ListDataScanJobs. - * @function listDataScanJobs - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|generateDataQualityRules}. - * @memberof google.cloud.dataplex.v1.DataScanService - * @typedef GenerateDataQualityRulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} [response] GenerateDataQualityRulesResponse - */ - - /** - * Calls GenerateDataQualityRules. - * @function generateDataQualityRules - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} request GenerateDataQualityRulesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRulesCallback} callback Node-style callback called with the error, if any, and GenerateDataQualityRulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataScanService.prototype.generateDataQualityRules = function generateDataQualityRules(request, callback) { - return this.rpcCall(generateDataQualityRules, $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest, $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse, request, callback); - }, "name", { value: "GenerateDataQualityRules" }); - - /** - * Calls GenerateDataQualityRules. - * @function generateDataQualityRules - * @memberof google.cloud.dataplex.v1.DataScanService - * @instance - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} request GenerateDataQualityRulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataScanService; - })(); - - v1.CreateDataScanRequest = (function() { - - /** - * Properties of a CreateDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateDataScanRequest - * @property {string|null} [parent] CreateDataScanRequest parent - * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] CreateDataScanRequest dataScan - * @property {string|null} [dataScanId] CreateDataScanRequest dataScanId - * @property {boolean|null} [validateOnly] CreateDataScanRequest validateOnly - */ - - /** - * Constructs a new CreateDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateDataScanRequest. - * @implements ICreateDataScanRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set - */ - function CreateDataScanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateDataScanRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @instance - */ - CreateDataScanRequest.prototype.parent = ""; - - /** - * CreateDataScanRequest dataScan. - * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @instance - */ - CreateDataScanRequest.prototype.dataScan = null; - - /** - * CreateDataScanRequest dataScanId. - * @member {string} dataScanId - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @instance - */ - CreateDataScanRequest.prototype.dataScanId = ""; - - /** - * CreateDataScanRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @instance - */ - CreateDataScanRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateDataScanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest instance - */ - CreateDataScanRequest.create = function create(properties) { - return new CreateDataScanRequest(properties); - }; - - /** - * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataScanRequest.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.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) - $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dataScanId != null && Object.hasOwnProperty.call(message, "dataScanId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataScanId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateDataScanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataScanRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); - break; - } - case 3: { - message.dataScanId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateDataScanRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateDataScanRequest.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.dataScan != null && message.hasOwnProperty("dataScan")) { - var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); - if (error) - return "dataScan." + error; - } - if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) - if (!$util.isString(message.dataScanId)) - return "dataScanId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest - */ - CreateDataScanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateDataScanRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.dataScan != null) { - if (typeof object.dataScan !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateDataScanRequest.dataScan: object expected"); - message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); - } - if (object.dataScanId != null) - message.dataScanId = String(object.dataScanId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.CreateDataScanRequest} message CreateDataScanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateDataScanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.dataScan = null; - object.dataScanId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.dataScan != null && message.hasOwnProperty("dataScan")) - object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); - if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) - object.dataScanId = message.dataScanId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateDataScanRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @instance - * @returns {Object.} JSON object - */ - CreateDataScanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateDataScanRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateDataScanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataScanRequest"; - }; - - return CreateDataScanRequest; - })(); - - v1.UpdateDataScanRequest = (function() { - - /** - * Properties of an UpdateDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateDataScanRequest - * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] UpdateDataScanRequest dataScan - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataScanRequest updateMask - * @property {boolean|null} [validateOnly] UpdateDataScanRequest validateOnly - */ - - /** - * Constructs a new UpdateDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateDataScanRequest. - * @implements IUpdateDataScanRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set - */ - function UpdateDataScanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataScanRequest dataScan. - * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @instance - */ - UpdateDataScanRequest.prototype.dataScan = null; - - /** - * UpdateDataScanRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @instance - */ - UpdateDataScanRequest.prototype.updateMask = null; - - /** - * UpdateDataScanRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @instance - */ - UpdateDataScanRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateDataScanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest instance - */ - UpdateDataScanRequest.create = function create(properties) { - return new UpdateDataScanRequest(properties); - }; - - /** - * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataScanRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) - $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, 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(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataScanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataScanRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataScanRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataScanRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataScan != null && message.hasOwnProperty("dataScan")) { - var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); - if (error) - return "dataScan." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest - */ - UpdateDataScanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataScanRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); - if (object.dataScan != null) { - if (typeof object.dataScan !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.dataScan: object expected"); - message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateDataScanRequest} message UpdateDataScanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataScanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataScan = null; - object.updateMask = null; - object.validateOnly = false; - } - if (message.dataScan != null && message.hasOwnProperty("dataScan")) - object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateDataScanRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataScanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataScanRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataScanRequest"; - }; - - return UpdateDataScanRequest; - })(); - - v1.DeleteDataScanRequest = (function() { - - /** - * Properties of a DeleteDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteDataScanRequest - * @property {string|null} [name] DeleteDataScanRequest name - */ - - /** - * Constructs a new DeleteDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteDataScanRequest. - * @implements IDeleteDataScanRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set - */ - function DeleteDataScanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteDataScanRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @instance - */ - DeleteDataScanRequest.prototype.name = ""; - - /** - * Creates a new DeleteDataScanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest instance - */ - DeleteDataScanRequest.create = function create(properties) { - return new DeleteDataScanRequest(properties); - }; - - /** - * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataScanRequest.encode = function encode(message, writer) { - 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 DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteDataScanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataScanRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); - 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 DeleteDataScanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteDataScanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteDataScanRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteDataScanRequest.verify = function verify(message) { - if (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 DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest - */ - DeleteDataScanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataScanRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteDataScanRequest} message DeleteDataScanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteDataScanRequest.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 DeleteDataScanRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteDataScanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteDataScanRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataScanRequest"; - }; - - return DeleteDataScanRequest; - })(); - - v1.GetDataScanRequest = (function() { - - /** - * Properties of a GetDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetDataScanRequest - * @property {string|null} [name] GetDataScanRequest name - * @property {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null} [view] GetDataScanRequest view - */ - - /** - * Constructs a new GetDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetDataScanRequest. - * @implements IGetDataScanRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set - */ - function GetDataScanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataScanRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @instance - */ - GetDataScanRequest.prototype.name = ""; - - /** - * GetDataScanRequest view. - * @member {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} view - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @instance - */ - GetDataScanRequest.prototype.view = 0; - - /** - * Creates a new GetDataScanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest instance - */ - GetDataScanRequest.create = function create(properties) { - return new GetDataScanRequest(properties); - }; - - /** - * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataScanRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataScanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataScanRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataScanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataScanRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataScanRequest.verify = function verify(message) { - if (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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 10: - break; - } - return null; - }; - - /** - * Creates a GetDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest - */ - GetDataScanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "DATA_SCAN_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 10: - message.view = 10; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.GetDataScanRequest} message GetDataScanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataScanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "DATA_SCAN_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetDataScanRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataScanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataScanRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetDataScanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanRequest"; - }; - - /** - * DataScanView enum. - * @name google.cloud.dataplex.v1.GetDataScanRequest.DataScanView - * @enum {number} - * @property {number} DATA_SCAN_VIEW_UNSPECIFIED=0 DATA_SCAN_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=10 FULL value - */ - GetDataScanRequest.DataScanView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_SCAN_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[10] = "FULL"] = 10; - return values; - })(); - - return GetDataScanRequest; - })(); - - v1.ListDataScansRequest = (function() { - - /** - * Properties of a ListDataScansRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataScansRequest - * @property {string|null} [parent] ListDataScansRequest parent - * @property {number|null} [pageSize] ListDataScansRequest pageSize - * @property {string|null} [pageToken] ListDataScansRequest pageToken - * @property {string|null} [filter] ListDataScansRequest filter - * @property {string|null} [orderBy] ListDataScansRequest orderBy - */ - - /** - * Constructs a new ListDataScansRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataScansRequest. - * @implements IListDataScansRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set - */ - function ListDataScansRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataScansRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - */ - ListDataScansRequest.prototype.parent = ""; - - /** - * ListDataScansRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - */ - ListDataScansRequest.prototype.pageSize = 0; - - /** - * ListDataScansRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - */ - ListDataScansRequest.prototype.pageToken = ""; - - /** - * ListDataScansRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - */ - ListDataScansRequest.prototype.filter = ""; - - /** - * ListDataScansRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - */ - ListDataScansRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataScansRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest instance - */ - ListDataScansRequest.create = function create(properties) { - return new ListDataScansRequest(properties); - }; - - /** - * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScansRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScansRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataScansRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScansRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); - 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; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScansRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataScansRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataScansRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListDataScansRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest - */ - ListDataScansRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {google.cloud.dataplex.v1.ListDataScansRequest} message ListDataScansRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataScansRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListDataScansRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataScansRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataScansRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataScansRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataScansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansRequest"; - }; - - return ListDataScansRequest; - })(); - - v1.ListDataScansResponse = (function() { - - /** - * Properties of a ListDataScansResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataScansResponse - * @property {Array.|null} [dataScans] ListDataScansResponse dataScans - * @property {string|null} [nextPageToken] ListDataScansResponse nextPageToken - * @property {Array.|null} [unreachable] ListDataScansResponse unreachable - */ - - /** - * Constructs a new ListDataScansResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataScansResponse. - * @implements IListDataScansResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set - */ - function ListDataScansResponse(properties) { - this.dataScans = []; - 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]]; - } - - /** - * ListDataScansResponse dataScans. - * @member {Array.} dataScans - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @instance - */ - ListDataScansResponse.prototype.dataScans = $util.emptyArray; - - /** - * ListDataScansResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @instance - */ - ListDataScansResponse.prototype.nextPageToken = ""; - - /** - * ListDataScansResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @instance - */ - ListDataScansResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListDataScansResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse instance - */ - ListDataScansResponse.create = function create(properties) { - return new ListDataScansResponse(properties); - }; - - /** - * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScansResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataScans != null && message.dataScans.length) - for (var i = 0; i < message.dataScans.length; ++i) - $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScans[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScansResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataScansResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScansResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataScans && message.dataScans.length)) - message.dataScans = []; - message.dataScans.push($root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScansResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataScansResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataScansResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataScans != null && message.hasOwnProperty("dataScans")) { - if (!Array.isArray(message.dataScans)) - return "dataScans: array expected"; - for (var i = 0; i < message.dataScans.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScans[i]); - if (error) - return "dataScans." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListDataScansResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse - */ - ListDataScansResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); - if (object.dataScans) { - if (!Array.isArray(object.dataScans)) - throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: array expected"); - message.dataScans = []; - for (var i = 0; i < object.dataScans.length; ++i) { - if (typeof object.dataScans[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: object expected"); - message.dataScans[i] = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScans[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.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 ListDataScansResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {google.cloud.dataplex.v1.ListDataScansResponse} message ListDataScansResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataScansResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataScans = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataScans && message.dataScans.length) { - object.dataScans = []; - for (var j = 0; j < message.dataScans.length; ++j) - object.dataScans[j] = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScans[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListDataScansResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataScansResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataScansResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataScansResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataScansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansResponse"; - }; - - return ListDataScansResponse; - })(); - - v1.RunDataScanRequest = (function() { - - /** - * Properties of a RunDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IRunDataScanRequest - * @property {string|null} [name] RunDataScanRequest name - */ - - /** - * Constructs a new RunDataScanRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunDataScanRequest. - * @implements IRunDataScanRequest - * @constructor - * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set - */ - function RunDataScanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunDataScanRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @instance - */ - RunDataScanRequest.prototype.name = ""; - - /** - * Creates a new RunDataScanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest instance - */ - RunDataScanRequest.create = function create(properties) { - return new RunDataScanRequest(properties); - }; - - /** - * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunDataScanRequest.encode = function encode(message, writer) { - 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 RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunDataScanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunDataScanRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); - 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 RunDataScanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunDataScanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunDataScanRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunDataScanRequest.verify = function verify(message) { - if (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 RunDataScanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest - */ - RunDataScanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {google.cloud.dataplex.v1.RunDataScanRequest} message RunDataScanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunDataScanRequest.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 RunDataScanRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @instance - * @returns {Object.} JSON object - */ - RunDataScanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunDataScanRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunDataScanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanRequest"; - }; - - return RunDataScanRequest; - })(); - - v1.RunDataScanResponse = (function() { - - /** - * Properties of a RunDataScanResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IRunDataScanResponse - * @property {google.cloud.dataplex.v1.IDataScanJob|null} [job] RunDataScanResponse job - */ - - /** - * Constructs a new RunDataScanResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunDataScanResponse. - * @implements IRunDataScanResponse - * @constructor - * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set - */ - function RunDataScanResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RunDataScanResponse job. - * @member {google.cloud.dataplex.v1.IDataScanJob|null|undefined} job - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @instance - */ - RunDataScanResponse.prototype.job = null; - - /** - * Creates a new RunDataScanResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse instance - */ - RunDataScanResponse.create = function create(properties) { - return new RunDataScanResponse(properties); - }; - - /** - * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunDataScanResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.job != null && Object.hasOwnProperty.call(message, "job")) - $root.google.cloud.dataplex.v1.DataScanJob.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunDataScanResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunDataScanResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunDataScanResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.job = $root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunDataScanResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunDataScanResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunDataScanResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.job != null && message.hasOwnProperty("job")) { - var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.job); - if (error) - return "job." + error; - } - return null; - }; - - /** - * Creates a RunDataScanResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse - */ - RunDataScanResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); - if (object.job != null) { - if (typeof object.job !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunDataScanResponse.job: object expected"); - message.job = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.job); - } - return message; - }; - - /** - * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {google.cloud.dataplex.v1.RunDataScanResponse} message RunDataScanResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunDataScanResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.job = null; - if (message.job != null && message.hasOwnProperty("job")) - object.job = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.job, options); - return object; - }; - - /** - * Converts this RunDataScanResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @instance - * @returns {Object.} JSON object - */ - RunDataScanResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RunDataScanResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunDataScanResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RunDataScanResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanResponse"; - }; - - return RunDataScanResponse; - })(); - - v1.GetDataScanJobRequest = (function() { - - /** - * Properties of a GetDataScanJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetDataScanJobRequest - * @property {string|null} [name] GetDataScanJobRequest name - * @property {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null} [view] GetDataScanJobRequest view - */ - - /** - * Constructs a new GetDataScanJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetDataScanJobRequest. - * @implements IGetDataScanJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set - */ - function GetDataScanJobRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataScanJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @instance - */ - GetDataScanJobRequest.prototype.name = ""; - - /** - * GetDataScanJobRequest view. - * @member {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} view - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @instance - */ - GetDataScanJobRequest.prototype.view = 0; - - /** - * Creates a new GetDataScanJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest instance - */ - GetDataScanJobRequest.create = function create(properties) { - return new GetDataScanJobRequest(properties); - }; - - /** - * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataScanJobRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataScanJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataScanJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataScanJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataScanJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataScanJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataScanJobRequest.verify = function verify(message) { - if (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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 10: - break; - } - return null; - }; - - /** - * Creates a GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest - */ - GetDataScanJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "DATA_SCAN_JOB_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 10: - message.view = 10; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {google.cloud.dataplex.v1.GetDataScanJobRequest} message GetDataScanJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataScanJobRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "DATA_SCAN_JOB_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetDataScanJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataScanJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataScanJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataScanJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanJobRequest"; - }; - - /** - * DataScanJobView enum. - * @name google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView - * @enum {number} - * @property {number} DATA_SCAN_JOB_VIEW_UNSPECIFIED=0 DATA_SCAN_JOB_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=10 FULL value - */ - GetDataScanJobRequest.DataScanJobView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_SCAN_JOB_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[10] = "FULL"] = 10; - return values; - })(); - - return GetDataScanJobRequest; - })(); - - v1.ListDataScanJobsRequest = (function() { - - /** - * Properties of a ListDataScanJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataScanJobsRequest - * @property {string|null} [parent] ListDataScanJobsRequest parent - * @property {number|null} [pageSize] ListDataScanJobsRequest pageSize - * @property {string|null} [pageToken] ListDataScanJobsRequest pageToken - * @property {string|null} [filter] ListDataScanJobsRequest filter - */ - - /** - * Constructs a new ListDataScanJobsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataScanJobsRequest. - * @implements IListDataScanJobsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set - */ - function ListDataScanJobsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataScanJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @instance - */ - ListDataScanJobsRequest.prototype.parent = ""; - - /** - * ListDataScanJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @instance - */ - ListDataScanJobsRequest.prototype.pageSize = 0; - - /** - * ListDataScanJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @instance - */ - ListDataScanJobsRequest.prototype.pageToken = ""; - - /** - * ListDataScanJobsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @instance - */ - ListDataScanJobsRequest.prototype.filter = ""; - - /** - * Creates a new ListDataScanJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest instance - */ - ListDataScanJobsRequest.create = function create(properties) { - return new ListDataScanJobsRequest(properties); - }; - - /** - * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScanJobsRequest.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 ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScanJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScanJobsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); - 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 ListDataScanJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScanJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataScanJobsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataScanJobsRequest.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 ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest - */ - ListDataScanJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); - 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 ListDataScanJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {google.cloud.dataplex.v1.ListDataScanJobsRequest} message ListDataScanJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataScanJobsRequest.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 ListDataScanJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataScanJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataScanJobsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataScanJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsRequest"; - }; - - return ListDataScanJobsRequest; - })(); - - v1.ListDataScanJobsResponse = (function() { - - /** - * Properties of a ListDataScanJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListDataScanJobsResponse - * @property {Array.|null} [dataScanJobs] ListDataScanJobsResponse dataScanJobs - * @property {string|null} [nextPageToken] ListDataScanJobsResponse nextPageToken - */ - - /** - * Constructs a new ListDataScanJobsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListDataScanJobsResponse. - * @implements IListDataScanJobsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set - */ - function ListDataScanJobsResponse(properties) { - this.dataScanJobs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataScanJobsResponse dataScanJobs. - * @member {Array.} dataScanJobs - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @instance - */ - ListDataScanJobsResponse.prototype.dataScanJobs = $util.emptyArray; - - /** - * ListDataScanJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @instance - */ - ListDataScanJobsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListDataScanJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse instance - */ - ListDataScanJobsResponse.create = function create(properties) { - return new ListDataScanJobsResponse(properties); - }; - - /** - * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScanJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataScanJobs != null && message.dataScanJobs.length) - for (var i = 0; i < message.dataScanJobs.length; ++i) - $root.google.cloud.dataplex.v1.DataScanJob.encode(message.dataScanJobs[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 ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataScanJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScanJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataScanJobs && message.dataScanJobs.length)) - message.dataScanJobs = []; - message.dataScanJobs.push($root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataScanJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataScanJobsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataScanJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataScanJobs != null && message.hasOwnProperty("dataScanJobs")) { - if (!Array.isArray(message.dataScanJobs)) - return "dataScanJobs: array expected"; - for (var i = 0; i < message.dataScanJobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.dataScanJobs[i]); - if (error) - return "dataScanJobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse - */ - ListDataScanJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); - if (object.dataScanJobs) { - if (!Array.isArray(object.dataScanJobs)) - throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: array expected"); - message.dataScanJobs = []; - for (var i = 0; i < object.dataScanJobs.length; ++i) { - if (typeof object.dataScanJobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: object expected"); - message.dataScanJobs[i] = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.dataScanJobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} message ListDataScanJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataScanJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataScanJobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.dataScanJobs && message.dataScanJobs.length) { - object.dataScanJobs = []; - for (var j = 0; j < message.dataScanJobs.length; ++j) - object.dataScanJobs[j] = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.dataScanJobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListDataScanJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataScanJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataScanJobsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataScanJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsResponse"; - }; - - return ListDataScanJobsResponse; - })(); - - v1.GenerateDataQualityRulesRequest = (function() { - - /** - * Properties of a GenerateDataQualityRulesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGenerateDataQualityRulesRequest - * @property {string|null} [name] GenerateDataQualityRulesRequest name - */ - - /** - * Constructs a new GenerateDataQualityRulesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GenerateDataQualityRulesRequest. - * @implements IGenerateDataQualityRulesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest=} [properties] Properties to set - */ - function GenerateDataQualityRulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenerateDataQualityRulesRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @instance - */ - GenerateDataQualityRulesRequest.prototype.name = ""; - - /** - * Creates a new GenerateDataQualityRulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest instance - */ - GenerateDataQualityRulesRequest.create = function create(properties) { - return new GenerateDataQualityRulesRequest(properties); - }; - - /** - * Encodes the specified GenerateDataQualityRulesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateDataQualityRulesRequest.encode = function encode(message, writer) { - 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 GenerateDataQualityRulesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateDataQualityRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerateDataQualityRulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateDataQualityRulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest(); - 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 GenerateDataQualityRulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateDataQualityRulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerateDataQualityRulesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerateDataQualityRulesRequest.verify = function verify(message) { - if (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 GenerateDataQualityRulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} GenerateDataQualityRulesRequest - */ - GenerateDataQualityRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GenerateDataQualityRulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesRequest} message GenerateDataQualityRulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerateDataQualityRulesRequest.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 GenerateDataQualityRulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @instance - * @returns {Object.} JSON object - */ - GenerateDataQualityRulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerateDataQualityRulesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerateDataQualityRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"; - }; - - return GenerateDataQualityRulesRequest; - })(); - - v1.GenerateDataQualityRulesResponse = (function() { - - /** - * Properties of a GenerateDataQualityRulesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IGenerateDataQualityRulesResponse - * @property {Array.|null} [rule] GenerateDataQualityRulesResponse rule - */ - - /** - * Constructs a new GenerateDataQualityRulesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GenerateDataQualityRulesResponse. - * @implements IGenerateDataQualityRulesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse=} [properties] Properties to set - */ - function GenerateDataQualityRulesResponse(properties) { - this.rule = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenerateDataQualityRulesResponse rule. - * @member {Array.} rule - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @instance - */ - GenerateDataQualityRulesResponse.prototype.rule = $util.emptyArray; - - /** - * Creates a new GenerateDataQualityRulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse instance - */ - GenerateDataQualityRulesResponse.create = function create(properties) { - return new GenerateDataQualityRulesResponse(properties); - }; - - /** - * Encodes the specified GenerateDataQualityRulesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateDataQualityRulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rule != null && message.rule.length) - for (var i = 0; i < message.rule.length; ++i) - $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rule[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenerateDataQualityRulesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerateDataQualityRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateDataQualityRulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rule && message.rule.length)) - message.rule = []; - message.rule.push($root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenerateDataQualityRulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateDataQualityRulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerateDataQualityRulesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerateDataQualityRulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rule != null && message.hasOwnProperty("rule")) { - if (!Array.isArray(message.rule)) - return "rule: array expected"; - for (var i = 0; i < message.rule.length; ++i) { - var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rule[i]); - if (error) - return "rule." + error; - } - } - return null; - }; - - /** - * Creates a GenerateDataQualityRulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} GenerateDataQualityRulesResponse - */ - GenerateDataQualityRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse(); - if (object.rule) { - if (!Array.isArray(object.rule)) - throw TypeError(".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.rule: array expected"); - message.rule = []; - for (var i = 0; i < object.rule.length; ++i) { - if (typeof object.rule[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse.rule: object expected"); - message.rule[i] = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rule[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenerateDataQualityRulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {google.cloud.dataplex.v1.GenerateDataQualityRulesResponse} message GenerateDataQualityRulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerateDataQualityRulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rule = []; - if (message.rule && message.rule.length) { - object.rule = []; - for (var j = 0; j < message.rule.length; ++j) - object.rule[j] = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rule[j], options); - } - return object; - }; - - /** - * Converts this GenerateDataQualityRulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @instance - * @returns {Object.} JSON object - */ - GenerateDataQualityRulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerateDataQualityRulesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerateDataQualityRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"; - }; - - return GenerateDataQualityRulesResponse; - })(); - - v1.DataScan = (function() { - - /** - * Properties of a DataScan. - * @memberof google.cloud.dataplex.v1 - * @interface IDataScan - * @property {string|null} [name] DataScan name - * @property {string|null} [uid] DataScan uid - * @property {string|null} [description] DataScan description - * @property {string|null} [displayName] DataScan displayName - * @property {Object.|null} [labels] DataScan labels - * @property {google.cloud.dataplex.v1.State|null} [state] DataScan state - * @property {google.protobuf.ITimestamp|null} [createTime] DataScan createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataScan updateTime - * @property {google.cloud.dataplex.v1.IDataSource|null} [data] DataScan data - * @property {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null} [executionSpec] DataScan executionSpec - * @property {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null} [executionStatus] DataScan executionStatus - * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScan type - * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScan dataQualitySpec - * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScan dataProfileSpec - * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScan dataDiscoverySpec - * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScan dataQualityResult - * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScan dataProfileResult - * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScan dataDiscoveryResult - */ - - /** - * Constructs a new DataScan. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataScan. - * @implements IDataScan - * @constructor - * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set - */ - function DataScan(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]]; - } - - /** - * DataScan name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.name = ""; - - /** - * DataScan uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.uid = ""; - - /** - * DataScan description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.description = ""; - - /** - * DataScan displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.displayName = ""; - - /** - * DataScan labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.labels = $util.emptyObject; - - /** - * DataScan state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.state = 0; - - /** - * DataScan createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.createTime = null; - - /** - * DataScan updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.updateTime = null; - - /** - * DataScan data. - * @member {google.cloud.dataplex.v1.IDataSource|null|undefined} data - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.data = null; - - /** - * DataScan executionSpec. - * @member {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.executionSpec = null; - - /** - * DataScan executionStatus. - * @member {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null|undefined} executionStatus - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.executionStatus = null; - - /** - * DataScan type. - * @member {google.cloud.dataplex.v1.DataScanType} type - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.type = 0; - - /** - * DataScan dataQualitySpec. - * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataQualitySpec = null; - - /** - * DataScan dataProfileSpec. - * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataProfileSpec = null; - - /** - * DataScan dataDiscoverySpec. - * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataDiscoverySpec = null; - - /** - * DataScan dataQualityResult. - * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataQualityResult = null; - - /** - * DataScan dataProfileResult. - * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataProfileResult = null; - - /** - * DataScan dataDiscoveryResult. - * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - DataScan.prototype.dataDiscoveryResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataScan spec. - * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - Object.defineProperty(DataScan.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataScan result. - * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - */ - Object.defineProperty(DataScan.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataScan instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScan} DataScan instance - */ - DataScan.create = function create(properties) { - return new DataScan(properties); - }; - - /** - * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScan.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - $root.google.cloud.dataplex.v1.DataSource.encode(message.data, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) - $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.type); - if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) - $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) - $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) - $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) - $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) - $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataScan message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScan} DataScan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScan.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.displayName = reader.string(); - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.data = $root.google.cloud.dataplex.v1.DataSource.decode(reader, reader.uint32()); - break; - } - case 10: { - message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.decode(reader, reader.uint32()); - break; - } - case 11: { - message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.decode(reader, reader.uint32()); - break; - } - case 12: { - message.type = reader.int32(); - break; - } - case 100: { - message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); - break; - } - case 102: { - message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); - break; - } - case 200: { - message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); - break; - } - case 201: { - message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); - break; - } - case 202: { - message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataScan message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScan} DataScan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScan.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataScan message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataScan.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.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.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.data != null && message.hasOwnProperty("data")) { - var error = $root.google.cloud.dataplex.v1.DataSource.verify(message.data); - if (error) - return "data." + error; - } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify(message.executionSpec); - if (error) - return "executionSpec." + error; - } - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { - var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify(message.executionStatus); - if (error) - return "executionStatus." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); - if (error) - return "dataQualitySpec." + error; - } - } - if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); - if (error) - return "dataProfileSpec." + error; - } - } - if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); - if (error) - return "dataDiscoverySpec." + error; - } - } - if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); - if (error) - return "dataQualityResult." + error; - } - } - if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); - if (error) - return "dataProfileResult." + error; - } - } - if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); - if (error) - return "dataDiscoveryResult." + error; - } - } - return null; - }; - - /** - * Creates a DataScan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScan} DataScan - */ - DataScan.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScan) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScan(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.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.dataplex.v1.DataScan.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.data: object expected"); - message.data = $root.google.cloud.dataplex.v1.DataSource.fromObject(object.data); - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.fromObject(object.executionSpec); - } - if (object.executionStatus != null) { - if (typeof object.executionStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.executionStatus: object expected"); - message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.fromObject(object.executionStatus); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DATA_SCAN_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATA_QUALITY": - case 1: - message.type = 1; - break; - case "DATA_PROFILE": - case 2: - message.type = 2; - break; - case "DATA_DISCOVERY": - case 3: - message.type = 3; - break; - } - if (object.dataQualitySpec != null) { - if (typeof object.dataQualitySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualitySpec: object expected"); - message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); - } - if (object.dataProfileSpec != null) { - if (typeof object.dataProfileSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileSpec: object expected"); - message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); - } - if (object.dataDiscoverySpec != null) { - if (typeof object.dataDiscoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoverySpec: object expected"); - message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); - } - if (object.dataQualityResult != null) { - if (typeof object.dataQualityResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualityResult: object expected"); - message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); - } - if (object.dataProfileResult != null) { - if (typeof object.dataProfileResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileResult: object expected"); - message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); - } - if (object.dataDiscoveryResult != null) { - if (typeof object.dataDiscoveryResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoveryResult: object expected"); - message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); - } - return message; - }; - - /** - * Creates a plain object from a DataScan message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {google.cloud.dataplex.v1.DataScan} message DataScan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataScan.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.description = ""; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - object.data = null; - object.executionSpec = null; - object.executionStatus = null; - object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.google.cloud.dataplex.v1.DataSource.toObject(message.data, options); - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.toObject(message.executionSpec, options); - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) - object.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.toObject(message.executionStatus, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; - if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { - object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); - if (options.oneofs) - object.spec = "dataQualitySpec"; - } - if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { - object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); - if (options.oneofs) - object.spec = "dataProfileSpec"; - } - if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { - object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); - if (options.oneofs) - object.spec = "dataDiscoverySpec"; - } - if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { - object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); - if (options.oneofs) - object.result = "dataQualityResult"; - } - if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { - object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); - if (options.oneofs) - object.result = "dataProfileResult"; - } - if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { - object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); - if (options.oneofs) - object.result = "dataDiscoveryResult"; - } - return object; - }; - - /** - * Converts this DataScan to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScan - * @instance - * @returns {Object.} JSON object - */ - DataScan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataScan - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScan - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataScan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan"; - }; - - DataScan.ExecutionSpec = (function() { - - /** - * Properties of an ExecutionSpec. - * @memberof google.cloud.dataplex.v1.DataScan - * @interface IExecutionSpec - * @property {google.cloud.dataplex.v1.ITrigger|null} [trigger] ExecutionSpec trigger - * @property {string|null} [field] ExecutionSpec field - */ - - /** - * Constructs a new ExecutionSpec. - * @memberof google.cloud.dataplex.v1.DataScan - * @classdesc Represents an ExecutionSpec. - * @implements IExecutionSpec - * @constructor - * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set - */ - function ExecutionSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecutionSpec trigger. - * @member {google.cloud.dataplex.v1.ITrigger|null|undefined} trigger - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.trigger = null; - - /** - * ExecutionSpec field. - * @member {string|null|undefined} field - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.field = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExecutionSpec incremental. - * @member {"field"|undefined} incremental - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @instance - */ - Object.defineProperty(ExecutionSpec.prototype, "incremental", { - get: $util.oneOfGetter($oneOfFields = ["field"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExecutionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec instance - */ - ExecutionSpec.create = function create(properties) { - return new ExecutionSpec(properties); - }; - - /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - $root.google.cloud.dataplex.v1.Trigger.encode(message.trigger, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.field); - return writer; - }; - - /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.trigger = $root.google.cloud.dataplex.v1.Trigger.decode(reader, reader.uint32()); - break; - } - case 100: { - message.field = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecutionSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.cloud.dataplex.v1.Trigger.verify(message.trigger); - if (error) - return "trigger." + error; - } - if (message.field != null && message.hasOwnProperty("field")) { - properties.incremental = 1; - if (!$util.isString(message.field)) - return "field: string expected"; - } - return null; - }; - - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec - */ - ExecutionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionSpec.trigger: object expected"); - message.trigger = $root.google.cloud.dataplex.v1.Trigger.fromObject(object.trigger); - } - if (object.field != null) - message.field = String(object.field); - return message; - }; - - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.DataScan.ExecutionSpec} message ExecutionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.trigger = null; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.cloud.dataplex.v1.Trigger.toObject(message.trigger, options); - if (message.field != null && message.hasOwnProperty("field")) { - object.field = message.field; - if (options.oneofs) - object.incremental = "field"; - } - return object; - }; - - /** - * Converts this ExecutionSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @instance - * @returns {Object.} JSON object - */ - ExecutionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionSpec"; - }; - - return ExecutionSpec; - })(); - - DataScan.ExecutionStatus = (function() { - - /** - * Properties of an ExecutionStatus. - * @memberof google.cloud.dataplex.v1.DataScan - * @interface IExecutionStatus - * @property {google.protobuf.ITimestamp|null} [latestJobStartTime] ExecutionStatus latestJobStartTime - * @property {google.protobuf.ITimestamp|null} [latestJobEndTime] ExecutionStatus latestJobEndTime - * @property {google.protobuf.ITimestamp|null} [latestJobCreateTime] ExecutionStatus latestJobCreateTime - */ - - /** - * Constructs a new ExecutionStatus. - * @memberof google.cloud.dataplex.v1.DataScan - * @classdesc Represents an ExecutionStatus. - * @implements IExecutionStatus - * @constructor - * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set - */ - function ExecutionStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecutionStatus latestJobStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} latestJobStartTime - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.latestJobStartTime = null; - - /** - * ExecutionStatus latestJobEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} latestJobEndTime - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.latestJobEndTime = null; - - /** - * ExecutionStatus latestJobCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} latestJobCreateTime - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.latestJobCreateTime = null; - - /** - * Creates a new ExecutionStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus instance - */ - ExecutionStatus.create = function create(properties) { - return new ExecutionStatus(properties); - }; - - /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latestJobStartTime != null && Object.hasOwnProperty.call(message, "latestJobStartTime")) - $root.google.protobuf.Timestamp.encode(message.latestJobStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.latestJobEndTime != null && Object.hasOwnProperty.call(message, "latestJobEndTime")) - $root.google.protobuf.Timestamp.encode(message.latestJobEndTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.latestJobCreateTime != null && Object.hasOwnProperty.call(message, "latestJobCreateTime")) - $root.google.protobuf.Timestamp.encode(message.latestJobCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.latestJobStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.latestJobEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.latestJobCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecutionStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.latestJobStartTime); - if (error) - return "latestJobStartTime." + error; - } - if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.latestJobEndTime); - if (error) - return "latestJobEndTime." + error; - } - if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.latestJobCreateTime); - if (error) - return "latestJobCreateTime." + error; - } - return null; - }; - - /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus - */ - ExecutionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); - if (object.latestJobStartTime != null) { - if (typeof object.latestJobStartTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobStartTime: object expected"); - message.latestJobStartTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobStartTime); - } - if (object.latestJobEndTime != null) { - if (typeof object.latestJobEndTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobEndTime: object expected"); - message.latestJobEndTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobEndTime); - } - if (object.latestJobCreateTime != null) { - if (typeof object.latestJobCreateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobCreateTime: object expected"); - message.latestJobCreateTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobCreateTime); - } - return message; - }; - - /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.DataScan.ExecutionStatus} message ExecutionStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.latestJobStartTime = null; - object.latestJobEndTime = null; - object.latestJobCreateTime = null; - } - if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) - object.latestJobStartTime = $root.google.protobuf.Timestamp.toObject(message.latestJobStartTime, options); - if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) - object.latestJobEndTime = $root.google.protobuf.Timestamp.toObject(message.latestJobEndTime, options); - if (message.latestJobCreateTime != null && message.hasOwnProperty("latestJobCreateTime")) - object.latestJobCreateTime = $root.google.protobuf.Timestamp.toObject(message.latestJobCreateTime, options); - return object; - }; - - /** - * Converts this ExecutionStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @instance - * @returns {Object.} JSON object - */ - ExecutionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionStatus"; - }; - - return ExecutionStatus; - })(); - - return DataScan; - })(); - - v1.DataScanJob = (function() { - - /** - * Properties of a DataScanJob. - * @memberof google.cloud.dataplex.v1 - * @interface IDataScanJob - * @property {string|null} [name] DataScanJob name - * @property {string|null} [uid] DataScanJob uid - * @property {google.protobuf.ITimestamp|null} [createTime] DataScanJob createTime - * @property {google.protobuf.ITimestamp|null} [startTime] DataScanJob startTime - * @property {google.protobuf.ITimestamp|null} [endTime] DataScanJob endTime - * @property {google.cloud.dataplex.v1.DataScanJob.State|null} [state] DataScanJob state - * @property {string|null} [message] DataScanJob message - * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScanJob type - * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScanJob dataQualitySpec - * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScanJob dataProfileSpec - * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScanJob dataDiscoverySpec - * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScanJob dataQualityResult - * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScanJob dataProfileResult - * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScanJob dataDiscoveryResult - */ - - /** - * Constructs a new DataScanJob. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataScanJob. - * @implements IDataScanJob - * @constructor - * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set - */ - function DataScanJob(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataScanJob name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.name = ""; - - /** - * DataScanJob uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.uid = ""; - - /** - * DataScanJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.createTime = null; - - /** - * DataScanJob startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.startTime = null; - - /** - * DataScanJob endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.endTime = null; - - /** - * DataScanJob state. - * @member {google.cloud.dataplex.v1.DataScanJob.State} state - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.state = 0; - - /** - * DataScanJob message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.message = ""; - - /** - * DataScanJob type. - * @member {google.cloud.dataplex.v1.DataScanType} type - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.type = 0; - - /** - * DataScanJob dataQualitySpec. - * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataQualitySpec = null; - - /** - * DataScanJob dataProfileSpec. - * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataProfileSpec = null; - - /** - * DataScanJob dataDiscoverySpec. - * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataDiscoverySpec = null; - - /** - * DataScanJob dataQualityResult. - * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataQualityResult = null; - - /** - * DataScanJob dataProfileResult. - * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataProfileResult = null; - - /** - * DataScanJob dataDiscoveryResult. - * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - DataScanJob.prototype.dataDiscoveryResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataScanJob spec. - * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - Object.defineProperty(DataScanJob.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataScanJob result. - * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - */ - Object.defineProperty(DataScanJob.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataScanJob instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob instance - */ - DataScanJob.create = function create(properties) { - return new DataScanJob(properties); - }; - - /** - * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScanJob.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) - $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) - $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) - $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) - $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) - $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) - $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScanJob.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataScanJob message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScanJob.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanJob(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.message = reader.string(); - break; - } - case 7: { - message.type = reader.int32(); - break; - } - case 100: { - message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); - break; - } - case 102: { - message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); - break; - } - case 200: { - message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); - break; - } - case 201: { - message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); - break; - } - case 202: { - message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataScanJob message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScanJob.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataScanJob message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataScanJob.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 7: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); - if (error) - return "dataQualitySpec." + error; - } - } - if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); - if (error) - return "dataProfileSpec." + error; - } - } - if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); - if (error) - return "dataDiscoverySpec." + error; - } - } - if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); - if (error) - return "dataQualityResult." + error; - } - } - if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); - if (error) - return "dataProfileResult." + error; - } - } - if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); - if (error) - return "dataDiscoveryResult." + error; - } - } - return null; - }; - - /** - * Creates a DataScanJob message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob - */ - DataScanJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanJob) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanJob(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "CANCELING": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "PENDING": - case 7: - message.state = 7; - break; - } - if (object.message != null) - message.message = String(object.message); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DATA_SCAN_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATA_QUALITY": - case 1: - message.type = 1; - break; - case "DATA_PROFILE": - case 2: - message.type = 2; - break; - case "DATA_DISCOVERY": - case 3: - message.type = 3; - break; - } - if (object.dataQualitySpec != null) { - if (typeof object.dataQualitySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualitySpec: object expected"); - message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); - } - if (object.dataProfileSpec != null) { - if (typeof object.dataProfileSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileSpec: object expected"); - message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); - } - if (object.dataDiscoverySpec != null) { - if (typeof object.dataDiscoverySpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoverySpec: object expected"); - message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); - } - if (object.dataQualityResult != null) { - if (typeof object.dataQualityResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualityResult: object expected"); - message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); - } - if (object.dataProfileResult != null) { - if (typeof object.dataProfileResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileResult: object expected"); - message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); - } - if (object.dataDiscoveryResult != null) { - if (typeof object.dataDiscoveryResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoveryResult: object expected"); - message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); - } - return message; - }; - - /** - * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {google.cloud.dataplex.v1.DataScanJob} message DataScanJob - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataScanJob.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { - object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); - if (options.oneofs) - object.spec = "dataQualitySpec"; - } - if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { - object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); - if (options.oneofs) - object.spec = "dataProfileSpec"; - } - if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { - object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); - if (options.oneofs) - object.spec = "dataDiscoverySpec"; - } - if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { - object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); - if (options.oneofs) - object.result = "dataQualityResult"; - } - if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { - object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); - if (options.oneofs) - object.result = "dataProfileResult"; - } - if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { - object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); - if (options.oneofs) - object.result = "dataDiscoveryResult"; - } - return object; - }; - - /** - * Converts this DataScanJob to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanJob - * @instance - * @returns {Object.} JSON object - */ - DataScanJob.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataScanJob - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanJob - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataScanJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanJob"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.DataScanJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} CANCELING=2 CANCELING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} PENDING=7 PENDING value - */ - DataScanJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "CANCELING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[7] = "PENDING"] = 7; - return values; - })(); - - return DataScanJob; - })(); - - /** - * DataScanType enum. - * @name google.cloud.dataplex.v1.DataScanType - * @enum {number} - * @property {number} DATA_SCAN_TYPE_UNSPECIFIED=0 DATA_SCAN_TYPE_UNSPECIFIED value - * @property {number} DATA_QUALITY=1 DATA_QUALITY value - * @property {number} DATA_PROFILE=2 DATA_PROFILE value - * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value - */ - v1.DataScanType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_SCAN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_QUALITY"] = 1; - values[valuesById[2] = "DATA_PROFILE"] = 2; - values[valuesById[3] = "DATA_DISCOVERY"] = 3; - return values; - })(); - - v1.DiscoveryEvent = (function() { - - /** - * Properties of a DiscoveryEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IDiscoveryEvent - * @property {string|null} [message] DiscoveryEvent message - * @property {string|null} [lakeId] DiscoveryEvent lakeId - * @property {string|null} [zoneId] DiscoveryEvent zoneId - * @property {string|null} [assetId] DiscoveryEvent assetId - * @property {string|null} [dataLocation] DiscoveryEvent dataLocation - * @property {string|null} [datascanId] DiscoveryEvent datascanId - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action - * @property {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null} [table] DiscoveryEvent table - */ - - /** - * Constructs a new DiscoveryEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DiscoveryEvent. - * @implements IDiscoveryEvent - * @constructor - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set - */ - function DiscoveryEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DiscoveryEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.message = ""; - - /** - * DiscoveryEvent lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.lakeId = ""; - - /** - * DiscoveryEvent zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.zoneId = ""; - - /** - * DiscoveryEvent assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.assetId = ""; - - /** - * DiscoveryEvent dataLocation. - * @member {string} dataLocation - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.dataLocation = ""; - - /** - * DiscoveryEvent datascanId. - * @member {string} datascanId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.datascanId = ""; - - /** - * DiscoveryEvent type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.type = 0; - - /** - * DiscoveryEvent config. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.config = null; - - /** - * DiscoveryEvent entity. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.entity = null; - - /** - * DiscoveryEvent partition. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.partition = null; - - /** - * DiscoveryEvent action. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.action = null; - - /** - * DiscoveryEvent table. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null|undefined} table - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - DiscoveryEvent.prototype.table = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoveryEvent details. - * @member {"config"|"entity"|"partition"|"action"|"table"|undefined} details - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - */ - Object.defineProperty(DiscoveryEvent.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action", "table"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DiscoveryEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance - */ - DiscoveryEvent.create = function create(properties) { - return new DiscoveryEvent(properties); - }; - - /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); - if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); - if (message.datascanId != null && Object.hasOwnProperty.call(message, "datascanId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.datascanId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.encode(message.table, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.lakeId = reader.string(); - break; - } - case 3: { - message.zoneId = reader.string(); - break; - } - case 4: { - message.assetId = reader.string(); - break; - } - case 5: { - message.dataLocation = reader.string(); - break; - } - case 6: { - message.datascanId = reader.string(); - break; - } - case 10: { - message.type = reader.int32(); - break; - } - case 20: { - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); - break; - } - case 21: { - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); - break; - } - case 22: { - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); - break; - } - case 23: { - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); - break; - } - case 24: { - message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DiscoveryEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DiscoveryEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - if (!$util.isString(message.dataLocation)) - return "dataLocation: string expected"; - if (message.datascanId != null && message.hasOwnProperty("datascanId")) - if (!$util.isString(message.datascanId)) - return "datascanId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.config != null && message.hasOwnProperty("config")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); - if (error) - return "config." + error; - } - } - if (message.entity != null && message.hasOwnProperty("entity")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); - if (error) - return "entity." + error; - } - } - if (message.partition != null && message.hasOwnProperty("partition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); - if (error) - return "partition." + error; - } - } - if (message.action != null && message.hasOwnProperty("action")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); - if (error) - return "action." + error; - } - } - if (message.table != null && message.hasOwnProperty("table")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify(message.table); - if (error) - return "table." + error; - } - } - return null; - }; - - /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent - */ - DiscoveryEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.dataLocation != null) - message.dataLocation = String(object.dataLocation); - if (object.datascanId != null) - message.datascanId = String(object.datascanId); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONFIG": - case 1: - message.type = 1; - break; - case "ENTITY_CREATED": - case 2: - message.type = 2; - break; - case "ENTITY_UPDATED": - case 3: - message.type = 3; - break; - case "ENTITY_DELETED": - case 4: - message.type = 4; - break; - case "PARTITION_CREATED": - case 5: - message.type = 5; - break; - case "PARTITION_UPDATED": - case 6: - message.type = 6; - break; - case "PARTITION_DELETED": - case 7: - message.type = 7; - break; - case "TABLE_PUBLISHED": - case 10: - message.type = 10; - break; - case "TABLE_UPDATED": - case 11: - message.type = 11; - break; - case "TABLE_IGNORED": - case 12: - message.type = 12; - break; - case "TABLE_DELETED": - case 13: - message.type = 13; - break; - } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); - } - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); - } - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); - } - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); - } - if (object.table != null) { - if (typeof object.table !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.table: object expected"); - message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.fromObject(object.table); - } - return message; - }; - - /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DiscoveryEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.lakeId = ""; - object.zoneId = ""; - object.assetId = ""; - object.dataLocation = ""; - object.datascanId = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - object.dataLocation = message.dataLocation; - if (message.datascanId != null && message.hasOwnProperty("datascanId")) - object.datascanId = message.datascanId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); - if (options.oneofs) - object.details = "config"; - } - if (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); - if (options.oneofs) - object.details = "entity"; - } - if (message.partition != null && message.hasOwnProperty("partition")) { - object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); - if (options.oneofs) - object.details = "partition"; - } - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); - if (options.oneofs) - object.details = "action"; - } - if (message.table != null && message.hasOwnProperty("table")) { - object.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.toObject(message.table, options); - if (options.oneofs) - object.details = "table"; - } - return object; - }; - - /** - * Converts this DiscoveryEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance - * @returns {Object.} JSON object - */ - DiscoveryEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoveryEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; - }; - - /** - * EventType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} CONFIG=1 CONFIG value - * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value - * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value - * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value - * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value - * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value - * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value - * @property {number} TABLE_PUBLISHED=10 TABLE_PUBLISHED value - * @property {number} TABLE_UPDATED=11 TABLE_UPDATED value - * @property {number} TABLE_IGNORED=12 TABLE_IGNORED value - * @property {number} TABLE_DELETED=13 TABLE_DELETED value - */ - DiscoveryEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIG"] = 1; - values[valuesById[2] = "ENTITY_CREATED"] = 2; - values[valuesById[3] = "ENTITY_UPDATED"] = 3; - values[valuesById[4] = "ENTITY_DELETED"] = 4; - values[valuesById[5] = "PARTITION_CREATED"] = 5; - values[valuesById[6] = "PARTITION_UPDATED"] = 6; - values[valuesById[7] = "PARTITION_DELETED"] = 7; - values[valuesById[10] = "TABLE_PUBLISHED"] = 10; - values[valuesById[11] = "TABLE_UPDATED"] = 11; - values[valuesById[12] = "TABLE_IGNORED"] = 12; - values[valuesById[13] = "TABLE_DELETED"] = 13; - return values; - })(); - - /** - * EntityType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType - * @enum {number} - * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value - */ - DiscoveryEvent.EntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - /** - * TableType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.TableType - * @enum {number} - * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value - * @property {number} EXTERNAL_TABLE=1 EXTERNAL_TABLE value - * @property {number} BIGLAKE_TABLE=2 BIGLAKE_TABLE value - * @property {number} OBJECT_TABLE=3 OBJECT_TABLE value - */ - DiscoveryEvent.TableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXTERNAL_TABLE"] = 1; - values[valuesById[2] = "BIGLAKE_TABLE"] = 2; - values[valuesById[3] = "OBJECT_TABLE"] = 3; - return values; - })(); - - DiscoveryEvent.ConfigDetails = (function() { - - /** - * Properties of a ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IConfigDetails - * @property {Object.|null} [parameters] ConfigDetails parameters - */ - - /** - * Constructs a new ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a ConfigDetails. - * @implements IConfigDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - */ - function ConfigDetails(properties) { - this.parameters = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfigDetails parameters. - * @member {Object.} parameters - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @instance - */ - ConfigDetails.prototype.parameters = $util.emptyObject; - - /** - * Creates a new ConfigDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance - */ - ConfigDetails.create = function create(properties) { - return new ConfigDetails(properties); - }; - - /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfigDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.parameters === $util.emptyObject) - message.parameters = {}; - 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.parameters[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfigDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfigDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.parameters[key[i]])) - return "parameters: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - */ - ConfigDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) - message.parameters[keys[i]] = String(object.parameters[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfigDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = message.parameters[keys2[j]]; - } - return object; - }; - - /** - * Converts this ConfigDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @instance - * @returns {Object.} JSON object - */ - ConfigDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfigDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; - }; - - return ConfigDetails; - })(); - - DiscoveryEvent.EntityDetails = (function() { - - /** - * Properties of an EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IEntityDetails - * @property {string|null} [entity] EntityDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type - */ - - /** - * Constructs a new EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an EntityDetails. - * @implements IEntityDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - */ - function EntityDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntityDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.entity = ""; - - /** - * EntityDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.type = 0; - - /** - * Creates a new EntityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance - */ - EntityDetails.create = function create(properties) { - return new EntityDetails(properties); - }; - - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entity = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntityDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: 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 an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - */ - EntityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - return object; - }; - - /** - * Converts this EntityDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - * @returns {Object.} JSON object - */ - EntityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntityDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; - }; - - return EntityDetails; - })(); - - DiscoveryEvent.TableDetails = (function() { - - /** - * Properties of a TableDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface ITableDetails - * @property {string|null} [table] TableDetails table - * @property {google.cloud.dataplex.v1.DiscoveryEvent.TableType|null} [type] TableDetails type - */ - - /** - * Constructs a new TableDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a TableDetails. - * @implements ITableDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set - */ - function TableDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableDetails table. - * @member {string} table - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @instance - */ - TableDetails.prototype.table = ""; - - /** - * TableDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.TableType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @instance - */ - TableDetails.prototype.type = 0; - - /** - * Creates a new TableDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails instance - */ - TableDetails.create = function create(properties) { - return new TableDetails(properties); - }; - - /** - * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails - */ - TableDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); - if (object.table != null) - message.table = String(object.table); - 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 "EXTERNAL_TABLE": - case 1: - message.type = 1; - break; - case "BIGLAKE_TABLE": - case 2: - message.type = 2; - break; - case "OBJECT_TABLE": - case 3: - message.type = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a TableDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} message TableDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.table = ""; - object.type = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] : message.type; - return object; - }; - - /** - * Converts this TableDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @instance - * @returns {Object.} JSON object - */ - TableDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TableDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TableDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"; - }; - - return TableDetails; - })(); - - DiscoveryEvent.PartitionDetails = (function() { - - /** - * Properties of a PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IPartitionDetails - * @property {string|null} [partition] PartitionDetails partition - * @property {string|null} [entity] PartitionDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type - * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations - */ - - /** - * Constructs a new PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a PartitionDetails. - * @implements IPartitionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - */ - function PartitionDetails(properties) { - this.sampledDataLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PartitionDetails partition. - * @member {string} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.partition = ""; - - /** - * PartitionDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.entity = ""; - - /** - * PartitionDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.type = 0; - - /** - * PartitionDetails sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; - - /** - * Creates a new PartitionDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance - */ - PartitionDetails.create = function create(properties) { - return new PartitionDetails(properties); - }; - - /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); - return writer; - }; - - /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PartitionDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = reader.string(); - break; - } - case 2: { - message.entity = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartitionDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartitionDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) - if (!$util.isString(message.partition)) - return "partition: string expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: 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; - } - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - return null; - }; - - /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - */ - PartitionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - if (object.partition != null) - message.partition = String(object.partition); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - return message; - }; - - /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartitionDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.partition = ""; - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = message.partition; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; - } - return object; - }; - - /** - * Converts this PartitionDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - * @returns {Object.} JSON object - */ - PartitionDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PartitionDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; - }; - - return PartitionDetails; - })(); - - DiscoveryEvent.ActionDetails = (function() { - - /** - * Properties of an ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IActionDetails - * @property {string|null} [type] ActionDetails type - * @property {string|null} [issue] ActionDetails issue - */ - - /** - * Constructs a new ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an ActionDetails. - * @implements IActionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - */ - function ActionDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActionDetails type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @instance - */ - ActionDetails.prototype.type = ""; - - /** - * ActionDetails issue. - * @member {string} issue - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @instance - */ - ActionDetails.prototype.issue = ""; - - /** - * Creates a new ActionDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance - */ - ActionDetails.create = function create(properties) { - return new ActionDetails(properties); - }; - - /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionDetails.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.issue != null && Object.hasOwnProperty.call(message, "issue")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); - return writer; - }; - - /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActionDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.issue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActionDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActionDetails.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.issue != null && message.hasOwnProperty("issue")) - if (!$util.isString(message.issue)) - return "issue: string expected"; - return null; - }; - - /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - */ - ActionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - if (object.type != null) - message.type = String(object.type); - if (object.issue != null) - message.issue = String(object.issue); - return message; - }; - - /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActionDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.issue = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = message.issue; - return object; - }; - - /** - * Converts this ActionDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @instance - * @returns {Object.} JSON object - */ - ActionDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActionDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; - }; - - return ActionDetails; - })(); - - return DiscoveryEvent; - })(); - - v1.JobEvent = (function() { - - /** - * Properties of a JobEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IJobEvent - * @property {string|null} [message] JobEvent message - * @property {string|null} [jobId] JobEvent jobId - * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime - * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state - * @property {number|null} [retries] JobEvent retries - * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type - * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service - * @property {string|null} [serviceJob] JobEvent serviceJob - * @property {google.cloud.dataplex.v1.JobEvent.ExecutionTrigger|null} [executionTrigger] JobEvent executionTrigger - */ - - /** - * Constructs a new JobEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a JobEvent. - * @implements IJobEvent - * @constructor - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - */ - function JobEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JobEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.message = ""; - - /** - * JobEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.jobId = ""; - - /** - * JobEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.startTime = null; - - /** - * JobEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.endTime = null; - - /** - * JobEvent state. - * @member {google.cloud.dataplex.v1.JobEvent.State} state - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.state = 0; - - /** - * JobEvent retries. - * @member {number} retries - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.retries = 0; - - /** - * JobEvent type. - * @member {google.cloud.dataplex.v1.JobEvent.Type} type - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.type = 0; - - /** - * JobEvent service. - * @member {google.cloud.dataplex.v1.JobEvent.Service} service - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.service = 0; - - /** - * JobEvent serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.serviceJob = ""; - - /** - * JobEvent executionTrigger. - * @member {google.cloud.dataplex.v1.JobEvent.ExecutionTrigger} executionTrigger - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.executionTrigger = 0; - - /** - * Creates a new JobEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance - */ - JobEvent.create = function create(properties) { - return new JobEvent(properties); - }; - - /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); - if (message.executionTrigger != null && Object.hasOwnProperty.call(message, "executionTrigger")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.executionTrigger); - return writer; - }; - - /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JobEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JobEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.jobId = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retries = reader.int32(); - break; - } - case 7: { - message.type = reader.int32(); - break; - } - case 8: { - message.service = reader.int32(); - break; - } - case 9: { - message.serviceJob = reader.string(); - break; - } - case 11: { - message.executionTrigger = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JobEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JobEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.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.retries != null && message.hasOwnProperty("retries")) - if (!$util.isInteger(message.retries)) - return "retries: integer 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.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; - } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; - if (message.executionTrigger != null && message.hasOwnProperty("executionTrigger")) - switch (message.executionTrigger) { - default: - return "executionTrigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent - */ - JobEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.JobEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "ABORTED": - case 4: - message.state = 4; - break; - } - if (object.retries != null) - message.retries = object.retries | 0; - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SPARK": - case 1: - message.type = 1; - break; - case "NOTEBOOK": - case 2: - message.type = 2; - break; - } - 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 "DATAPROC": - case 1: - message.service = 1; - break; - } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); - switch (object.executionTrigger) { - default: - if (typeof object.executionTrigger === "number") { - message.executionTrigger = object.executionTrigger; - break; - } - break; - case "EXECUTION_TRIGGER_UNSPECIFIED": - case 0: - message.executionTrigger = 0; - break; - case "TASK_CONFIG": - case 1: - message.executionTrigger = 1; - break; - case "RUN_REQUEST": - case 2: - message.executionTrigger = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JobEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retries = 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; - object.executionTrigger = options.enums === String ? "EXECUTION_TRIGGER_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; - if (message.retries != null && message.hasOwnProperty("retries")) - object.retries = message.retries; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; - if (message.executionTrigger != null && message.hasOwnProperty("executionTrigger")) - object.executionTrigger = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger[message.executionTrigger] === undefined ? message.executionTrigger : $root.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger[message.executionTrigger] : message.executionTrigger; - return object; - }; - - /** - * Converts this JobEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - * @returns {Object.} JSON object - */ - JobEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JobEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.JobEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.JobEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SPARK=1 SPARK value - * @property {number} NOTEBOOK=2 NOTEBOOK value - */ - JobEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK"] = 1; - values[valuesById[2] = "NOTEBOOK"] = 2; - return values; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.JobEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} ABORTED=4 ABORTED value - */ - JobEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "ABORTED"] = 4; - return values; - })(); - - /** - * Service enum. - * @name google.cloud.dataplex.v1.JobEvent.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value - */ - JobEvent.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; - })(); - - /** - * ExecutionTrigger enum. - * @name google.cloud.dataplex.v1.JobEvent.ExecutionTrigger - * @enum {number} - * @property {number} EXECUTION_TRIGGER_UNSPECIFIED=0 EXECUTION_TRIGGER_UNSPECIFIED value - * @property {number} TASK_CONFIG=1 TASK_CONFIG value - * @property {number} RUN_REQUEST=2 RUN_REQUEST value - */ - JobEvent.ExecutionTrigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EXECUTION_TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TASK_CONFIG"] = 1; - values[valuesById[2] = "RUN_REQUEST"] = 2; - return values; - })(); - - return JobEvent; - })(); - - v1.SessionEvent = (function() { - - /** - * Properties of a SessionEvent. - * @memberof google.cloud.dataplex.v1 - * @interface ISessionEvent - * @property {string|null} [message] SessionEvent message - * @property {string|null} [userId] SessionEvent userId - * @property {string|null} [sessionId] SessionEvent sessionId - * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type - * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query - * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded - * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled - * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration - */ - - /** - * Constructs a new SessionEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SessionEvent. - * @implements ISessionEvent - * @constructor - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - */ - function SessionEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SessionEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.message = ""; - - /** - * SessionEvent userId. - * @member {string} userId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.userId = ""; - - /** - * SessionEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.sessionId = ""; - - /** - * SessionEvent type. - * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.type = 0; - - /** - * SessionEvent query. - * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.query = null; - - /** - * SessionEvent eventSucceeded. - * @member {boolean} eventSucceeded - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.eventSucceeded = false; - - /** - * SessionEvent fastStartupEnabled. - * @member {boolean} fastStartupEnabled - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.fastStartupEnabled = false; - - /** - * SessionEvent unassignedDuration. - * @member {google.protobuf.IDuration|null|undefined} unassignedDuration - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.unassignedDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SessionEvent detail. - * @member {"query"|undefined} detail - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - Object.defineProperty(SessionEvent.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["query"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SessionEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance - */ - SessionEvent.create = function create(properties) { - return new SessionEvent(properties); - }; - - /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); - if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); - if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) - $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SessionEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.userId = reader.string(); - break; - } - case 3: { - message.sessionId = reader.string(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - case 5: { - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); - break; - } - case 6: { - message.eventSucceeded = reader.bool(); - break; - } - case 7: { - message.fastStartupEnabled = reader.bool(); - break; - } - case 8: { - message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SessionEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SessionEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SessionEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.query != null && message.hasOwnProperty("query")) { - properties.detail = 1; - { - var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - if (typeof message.eventSucceeded !== "boolean") - return "eventSucceeded: boolean expected"; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - if (typeof message.fastStartupEnabled !== "boolean") - return "fastStartupEnabled: boolean expected"; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { - var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); - if (error) - return "unassignedDuration." + error; - } - return null; - }; - - /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent - */ - SessionEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.userId != null) - message.userId = String(object.userId); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "START": - case 1: - message.type = 1; - break; - case "STOP": - case 2: - message.type = 2; - break; - case "QUERY": - case 3: - message.type = 3; - break; - case "CREATE": - case 4: - message.type = 4; - break; - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); - } - if (object.eventSucceeded != null) - message.eventSucceeded = Boolean(object.eventSucceeded); - if (object.fastStartupEnabled != null) - message.fastStartupEnabled = Boolean(object.fastStartupEnabled); - if (object.unassignedDuration != null) { - if (typeof object.unassignedDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); - message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); - } - return message; - }; - - /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SessionEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.userId = ""; - object.sessionId = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - object.eventSucceeded = false; - object.fastStartupEnabled = false; - object.unassignedDuration = null; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); - if (options.oneofs) - object.detail = "query"; - } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - object.eventSucceeded = message.eventSucceeded; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - object.fastStartupEnabled = message.fastStartupEnabled; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) - object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); - return object; - }; - - /** - * Converts this SessionEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - * @returns {Object.} JSON object - */ - SessionEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SessionEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; - }; - - /** - * EventType enum. - * @name google.cloud.dataplex.v1.SessionEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} START=1 START value - * @property {number} STOP=2 STOP value - * @property {number} QUERY=3 QUERY value - * @property {number} CREATE=4 CREATE value - */ - SessionEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START"] = 1; - values[valuesById[2] = "STOP"] = 2; - values[valuesById[3] = "QUERY"] = 3; - values[valuesById[4] = "CREATE"] = 4; - return values; - })(); - - SessionEvent.QueryDetail = (function() { - - /** - * Properties of a QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @interface IQueryDetail - * @property {string|null} [queryId] QueryDetail queryId - * @property {string|null} [queryText] QueryDetail queryText - * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine - * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration - * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes - * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes - */ - - /** - * Constructs a new QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @classdesc Represents a QueryDetail. - * @implements IQueryDetail - * @constructor - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - */ - function QueryDetail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDetail queryId. - * @member {string} queryId - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryId = ""; - - /** - * QueryDetail queryText. - * @member {string} queryText - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryText = ""; - - /** - * QueryDetail engine. - * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.engine = 0; - - /** - * QueryDetail duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.duration = null; - - /** - * QueryDetail resultSizeBytes. - * @member {number|Long} resultSizeBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * QueryDetail dataProcessedBytes. - * @member {number|Long} dataProcessedBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new QueryDetail instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance - */ - QueryDetail.create = function create(properties) { - return new QueryDetail(properties); - }; - - /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); - if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); - if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); - return writer; - }; - - /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.queryId = reader.string(); - break; - } - case 2: { - message.queryText = reader.string(); - break; - } - case 3: { - message.engine = reader.int32(); - break; - } - case 4: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.resultSizeBytes = reader.int64(); - break; - } - case 6: { - message.dataProcessedBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDetail message. - * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.queryId != null && message.hasOwnProperty("queryId")) - if (!$util.isString(message.queryId)) - return "queryId: string expected"; - if (message.queryText != null && message.hasOwnProperty("queryText")) - if (!$util.isString(message.queryText)) - return "queryText: string expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - switch (message.engine) { - default: - return "engine: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) - return "resultSizeBytes: integer|Long expected"; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) - return "dataProcessedBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - */ - QueryDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) - return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - if (object.queryId != null) - message.queryId = String(object.queryId); - if (object.queryText != null) - message.queryText = String(object.queryText); - switch (object.engine) { - default: - if (typeof object.engine === "number") { - message.engine = object.engine; - break; - } - break; - case "ENGINE_UNSPECIFIED": - case 0: - message.engine = 0; - break; - case "SPARK_SQL": - case 1: - message.engine = 1; - break; - case "BIGQUERY": - case 2: - message.engine = 2; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.resultSizeBytes != null) - if ($util.Long) - (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; - else if (typeof object.resultSizeBytes === "string") - message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); - else if (typeof object.resultSizeBytes === "number") - message.resultSizeBytes = object.resultSizeBytes; - else if (typeof object.resultSizeBytes === "object") - message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); - if (object.dataProcessedBytes != null) - if ($util.Long) - (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; - else if (typeof object.dataProcessedBytes === "string") - message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); - else if (typeof object.dataProcessedBytes === "number") - message.dataProcessedBytes = object.dataProcessedBytes; - else if (typeof object.dataProcessedBytes === "object") - message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.queryId = ""; - object.queryText = ""; - object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; - object.duration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resultSizeBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataProcessedBytes = options.longs === String ? "0" : 0; - } - if (message.queryId != null && message.hasOwnProperty("queryId")) - object.queryId = message.queryId; - if (message.queryText != null && message.hasOwnProperty("queryText")) - object.queryText = message.queryText; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (typeof message.resultSizeBytes === "number") - object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; - else - object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (typeof message.dataProcessedBytes === "number") - object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; - else - object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; - return object; - }; - - /** - * Converts this QueryDetail to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - * @returns {Object.} JSON object - */ - QueryDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryDetail - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; - }; - - /** - * Engine enum. - * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - * @enum {number} - * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value - * @property {number} SPARK_SQL=1 SPARK_SQL value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - QueryDetail.Engine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_SQL"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); - - return QueryDetail; - })(); - - return SessionEvent; - })(); - - v1.GovernanceEvent = (function() { - - /** - * Properties of a GovernanceEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IGovernanceEvent - * @property {string|null} [message] GovernanceEvent message - * @property {google.cloud.dataplex.v1.GovernanceEvent.EventType|null} [eventType] GovernanceEvent eventType - * @property {google.cloud.dataplex.v1.GovernanceEvent.IEntity|null} [entity] GovernanceEvent entity - */ - - /** - * Constructs a new GovernanceEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GovernanceEvent. - * @implements IGovernanceEvent - * @constructor - * @param {google.cloud.dataplex.v1.IGovernanceEvent=} [properties] Properties to set - */ - function GovernanceEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GovernanceEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @instance - */ - GovernanceEvent.prototype.message = ""; - - /** - * GovernanceEvent eventType. - * @member {google.cloud.dataplex.v1.GovernanceEvent.EventType} eventType - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @instance - */ - GovernanceEvent.prototype.eventType = 0; - - /** - * GovernanceEvent entity. - * @member {google.cloud.dataplex.v1.GovernanceEvent.IEntity|null|undefined} entity - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @instance - */ - GovernanceEvent.prototype.entity = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GovernanceEvent _entity. - * @member {"entity"|undefined} _entity - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @instance - */ - Object.defineProperty(GovernanceEvent.prototype, "_entity", { - get: $util.oneOfGetter($oneOfFields = ["entity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {google.cloud.dataplex.v1.IGovernanceEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent instance - */ - GovernanceEvent.create = function create(properties) { - return new GovernanceEvent(properties); - }; - - /** - * Encodes the specified GovernanceEvent message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {google.cloud.dataplex.v1.IGovernanceEvent} message GovernanceEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventType); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GovernanceEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {google.cloud.dataplex.v1.IGovernanceEvent} message GovernanceEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GovernanceEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.eventType = reader.int32(); - break; - } - case 3: { - message.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) - switch (message.eventType) { - default: - return "eventType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.entity != null && message.hasOwnProperty("entity")) { - properties._entity = 1; - { - var error = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.verify(message.entity); - if (error) - return "entity." + error; - } - } - return null; - }; - - /** - * Creates a GovernanceEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GovernanceEvent} GovernanceEvent - */ - GovernanceEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GovernanceEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.GovernanceEvent(); - if (object.message != null) - message.message = String(object.message); - switch (object.eventType) { - default: - if (typeof object.eventType === "number") { - message.eventType = object.eventType; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.eventType = 0; - break; - case "RESOURCE_IAM_POLICY_UPDATE": - case 1: - message.eventType = 1; - break; - case "BIGQUERY_TABLE_CREATE": - case 2: - message.eventType = 2; - break; - case "BIGQUERY_TABLE_UPDATE": - case 3: - message.eventType = 3; - break; - case "BIGQUERY_TABLE_DELETE": - case 4: - message.eventType = 4; - break; - case "BIGQUERY_CONNECTION_CREATE": - case 5: - message.eventType = 5; - break; - case "BIGQUERY_CONNECTION_UPDATE": - case 6: - message.eventType = 6; - break; - case "BIGQUERY_CONNECTION_DELETE": - case 7: - message.eventType = 7; - break; - case "BIGQUERY_TAXONOMY_CREATE": - case 10: - message.eventType = 10; - break; - case "BIGQUERY_POLICY_TAG_CREATE": - case 11: - message.eventType = 11; - break; - case "BIGQUERY_POLICY_TAG_DELETE": - case 12: - message.eventType = 12; - break; - case "BIGQUERY_POLICY_TAG_SET_IAM_POLICY": - case 13: - message.eventType = 13; - break; - case "ACCESS_POLICY_UPDATE": - case 14: - message.eventType = 14; - break; - case "GOVERNANCE_RULE_MATCHED_RESOURCES": - case 15: - message.eventType = 15; - break; - case "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS": - case 16: - message.eventType = 16; - break; - case "GOVERNANCE_RULE_ERRORS": - case 17: - message.eventType = 17; - break; - case "GOVERNANCE_RULE_PROCESSING": - case 18: - message.eventType = 18; - break; - } - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.GovernanceEvent.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.fromObject(object.entity); - } - return message; - }; - - /** - * Creates a plain object from a GovernanceEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {google.cloud.dataplex.v1.GovernanceEvent} message GovernanceEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.eventType = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.eventType != null && message.hasOwnProperty("eventType")) - object.eventType = options.enums === String ? $root.google.cloud.dataplex.v1.GovernanceEvent.EventType[message.eventType] === undefined ? message.eventType : $root.google.cloud.dataplex.v1.GovernanceEvent.EventType[message.eventType] : message.eventType; - if (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.toObject(message.entity, options); - if (options.oneofs) - object._entity = "entity"; - } - return object; - }; - - /** - * Converts this GovernanceEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @instance - * @returns {Object.} JSON object - */ - GovernanceEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GovernanceEvent"; - }; - - GovernanceEvent.Entity = (function() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @interface IEntity - * @property {string|null} [entity] Entity entity - * @property {google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType|null} [entityType] Entity entityType - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dataplex.v1.GovernanceEvent - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entity entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @instance - */ - Entity.prototype.entity = ""; - - /** - * Entity entityType. - * @member {google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType} entityType - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @instance - */ - Entity.prototype.entityType = 0; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.entityType); - return writer; - }; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GovernanceEvent.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {google.cloud.dataplex.v1.GovernanceEvent.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GovernanceEvent.Entity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entity = reader.string(); - break; - } - case 2: { - message.entityType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.entityType != null && message.hasOwnProperty("entityType")) - switch (message.entityType) { - default: - return "entityType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GovernanceEvent.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GovernanceEvent.Entity) - return object; - var message = new $root.google.cloud.dataplex.v1.GovernanceEvent.Entity(); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.entityType) { - default: - if (typeof object.entityType === "number") { - message.entityType = object.entityType; - break; - } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.entityType = 0; - break; - case "TABLE": - case 1: - message.entityType = 1; - break; - case "FILESET": - case 2: - message.entityType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {google.cloud.dataplex.v1.GovernanceEvent.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = ""; - object.entityType = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = options.enums === String ? $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType[message.entityType] === undefined ? message.entityType : $root.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType[message.entityType] : message.entityType; - return object; - }; - - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entity - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GovernanceEvent.Entity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GovernanceEvent.Entity"; - }; - - /** - * EntityType enum. - * @name google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType - * @enum {number} - * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value - */ - Entity.EntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - return Entity; - })(); - - /** - * EventType enum. - * @name google.cloud.dataplex.v1.GovernanceEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} RESOURCE_IAM_POLICY_UPDATE=1 RESOURCE_IAM_POLICY_UPDATE value - * @property {number} BIGQUERY_TABLE_CREATE=2 BIGQUERY_TABLE_CREATE value - * @property {number} BIGQUERY_TABLE_UPDATE=3 BIGQUERY_TABLE_UPDATE value - * @property {number} BIGQUERY_TABLE_DELETE=4 BIGQUERY_TABLE_DELETE value - * @property {number} BIGQUERY_CONNECTION_CREATE=5 BIGQUERY_CONNECTION_CREATE value - * @property {number} BIGQUERY_CONNECTION_UPDATE=6 BIGQUERY_CONNECTION_UPDATE value - * @property {number} BIGQUERY_CONNECTION_DELETE=7 BIGQUERY_CONNECTION_DELETE value - * @property {number} BIGQUERY_TAXONOMY_CREATE=10 BIGQUERY_TAXONOMY_CREATE value - * @property {number} BIGQUERY_POLICY_TAG_CREATE=11 BIGQUERY_POLICY_TAG_CREATE value - * @property {number} BIGQUERY_POLICY_TAG_DELETE=12 BIGQUERY_POLICY_TAG_DELETE value - * @property {number} BIGQUERY_POLICY_TAG_SET_IAM_POLICY=13 BIGQUERY_POLICY_TAG_SET_IAM_POLICY value - * @property {number} ACCESS_POLICY_UPDATE=14 ACCESS_POLICY_UPDATE value - * @property {number} GOVERNANCE_RULE_MATCHED_RESOURCES=15 GOVERNANCE_RULE_MATCHED_RESOURCES value - * @property {number} GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS=16 GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS value - * @property {number} GOVERNANCE_RULE_ERRORS=17 GOVERNANCE_RULE_ERRORS value - * @property {number} GOVERNANCE_RULE_PROCESSING=18 GOVERNANCE_RULE_PROCESSING value - */ - GovernanceEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESOURCE_IAM_POLICY_UPDATE"] = 1; - values[valuesById[2] = "BIGQUERY_TABLE_CREATE"] = 2; - values[valuesById[3] = "BIGQUERY_TABLE_UPDATE"] = 3; - values[valuesById[4] = "BIGQUERY_TABLE_DELETE"] = 4; - values[valuesById[5] = "BIGQUERY_CONNECTION_CREATE"] = 5; - values[valuesById[6] = "BIGQUERY_CONNECTION_UPDATE"] = 6; - values[valuesById[7] = "BIGQUERY_CONNECTION_DELETE"] = 7; - values[valuesById[10] = "BIGQUERY_TAXONOMY_CREATE"] = 10; - values[valuesById[11] = "BIGQUERY_POLICY_TAG_CREATE"] = 11; - values[valuesById[12] = "BIGQUERY_POLICY_TAG_DELETE"] = 12; - values[valuesById[13] = "BIGQUERY_POLICY_TAG_SET_IAM_POLICY"] = 13; - values[valuesById[14] = "ACCESS_POLICY_UPDATE"] = 14; - values[valuesById[15] = "GOVERNANCE_RULE_MATCHED_RESOURCES"] = 15; - values[valuesById[16] = "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS"] = 16; - values[valuesById[17] = "GOVERNANCE_RULE_ERRORS"] = 17; - values[valuesById[18] = "GOVERNANCE_RULE_PROCESSING"] = 18; - return values; - })(); - - return GovernanceEvent; - })(); - - v1.DataScanEvent = (function() { - - /** - * Properties of a DataScanEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IDataScanEvent - * @property {string|null} [dataSource] DataScanEvent dataSource - * @property {string|null} [jobId] DataScanEvent jobId - * @property {google.protobuf.ITimestamp|null} [createTime] DataScanEvent createTime - * @property {google.protobuf.ITimestamp|null} [startTime] DataScanEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] DataScanEvent endTime - * @property {google.cloud.dataplex.v1.DataScanEvent.ScanType|null} [type] DataScanEvent type - * @property {google.cloud.dataplex.v1.DataScanEvent.State|null} [state] DataScanEvent state - * @property {string|null} [message] DataScanEvent message - * @property {string|null} [specVersion] DataScanEvent specVersion - * @property {google.cloud.dataplex.v1.DataScanEvent.Trigger|null} [trigger] DataScanEvent trigger - * @property {google.cloud.dataplex.v1.DataScanEvent.Scope|null} [scope] DataScanEvent scope - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null} [dataProfile] DataScanEvent dataProfile - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null} [dataQuality] DataScanEvent dataQuality - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null} [dataProfileConfigs] DataScanEvent dataProfileConfigs - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null} [dataQualityConfigs] DataScanEvent dataQualityConfigs - * @property {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null} [postScanActionsResult] DataScanEvent postScanActionsResult - */ - - /** - * Constructs a new DataScanEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataScanEvent. - * @implements IDataScanEvent - * @constructor - * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set - */ - function DataScanEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataScanEvent dataSource. - * @member {string} dataSource - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataSource = ""; - - /** - * DataScanEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.jobId = ""; - - /** - * DataScanEvent createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.createTime = null; - - /** - * DataScanEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.startTime = null; - - /** - * DataScanEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.endTime = null; - - /** - * DataScanEvent type. - * @member {google.cloud.dataplex.v1.DataScanEvent.ScanType} type - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.type = 0; - - /** - * DataScanEvent state. - * @member {google.cloud.dataplex.v1.DataScanEvent.State} state - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.state = 0; - - /** - * DataScanEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.message = ""; - - /** - * DataScanEvent specVersion. - * @member {string} specVersion - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.specVersion = ""; - - /** - * DataScanEvent trigger. - * @member {google.cloud.dataplex.v1.DataScanEvent.Trigger} trigger - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.trigger = 0; - - /** - * DataScanEvent scope. - * @member {google.cloud.dataplex.v1.DataScanEvent.Scope} scope - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.scope = 0; - - /** - * DataScanEvent dataProfile. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null|undefined} dataProfile - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataProfile = null; - - /** - * DataScanEvent dataQuality. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null|undefined} dataQuality - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataQuality = null; - - /** - * DataScanEvent dataProfileConfigs. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs|null|undefined} dataProfileConfigs - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataProfileConfigs = null; - - /** - * DataScanEvent dataQualityConfigs. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs|null|undefined} dataQualityConfigs - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataQualityConfigs = null; - - /** - * DataScanEvent postScanActionsResult. - * @member {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult|null|undefined} postScanActionsResult - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.postScanActionsResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataScanEvent result. - * @member {"dataProfile"|"dataQuality"|undefined} result - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - Object.defineProperty(DataScanEvent.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataProfile", "dataQuality"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataScanEvent appliedConfigs. - * @member {"dataProfileConfigs"|"dataQualityConfigs"|undefined} appliedConfigs - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - Object.defineProperty(DataScanEvent.prototype, "appliedConfigs", { - get: $util.oneOfGetter($oneOfFields = ["dataProfileConfigs", "dataQualityConfigs"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataScanEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent instance - */ - DataScanEvent.create = function create(properties) { - return new DataScanEvent(properties); - }; - - /** - * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScanEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); - if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.specVersion); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.trigger); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.scope); - if (message.postScanActionsResult != null && Object.hasOwnProperty.call(message, "postScanActionsResult")) - $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.encode(message.postScanActionsResult, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.encode(message.dataProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.dataQuality != null && Object.hasOwnProperty.call(message, "dataQuality")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.encode(message.dataQuality, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.dataProfileConfigs != null && Object.hasOwnProperty.call(message, "dataProfileConfigs")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.encode(message.dataProfileConfigs, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.dataQualityConfigs != null && Object.hasOwnProperty.call(message, "dataQualityConfigs")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.encode(message.dataQualityConfigs, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataScanEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataScanEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScanEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.jobId = reader.string(); - break; - } - case 12: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.message = reader.string(); - break; - } - case 8: { - message.specVersion = reader.string(); - break; - } - case 9: { - message.trigger = reader.int32(); - break; - } - case 10: { - message.scope = reader.int32(); - break; - } - case 101: { - message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.decode(reader, reader.uint32()); - break; - } - case 102: { - message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.decode(reader, reader.uint32()); - break; - } - case 201: { - message.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.decode(reader, reader.uint32()); - break; - } - case 202: { - message.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.decode(reader, reader.uint32()); - break; - } - case 11: { - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataScanEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataScanEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataScanEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - if (!$util.isString(message.specVersion)) - return "specVersion: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify(message.dataProfile); - if (error) - return "dataProfile." + error; - } - } - if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify(message.dataQuality); - if (error) - return "dataQuality." + error; - } - } - if (message.dataProfileConfigs != null && message.hasOwnProperty("dataProfileConfigs")) { - properties.appliedConfigs = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify(message.dataProfileConfigs); - if (error) - return "dataProfileConfigs." + error; - } - } - if (message.dataQualityConfigs != null && message.hasOwnProperty("dataQualityConfigs")) { - if (properties.appliedConfigs === 1) - return "appliedConfigs: multiple values"; - properties.appliedConfigs = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify(message.dataQualityConfigs); - if (error) - return "dataQualityConfigs." + error; - } - } - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify(message.postScanActionsResult); - if (error) - return "postScanActionsResult." + error; - } - return null; - }; - - /** - * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent - */ - DataScanEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "SCAN_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATA_PROFILE": - case 1: - message.type = 1; - break; - case "DATA_QUALITY": - case 2: - message.type = 2; - break; - case "DATA_DISCOVERY": - case 4: - message.type = 4; - break; - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "STARTED": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - case "CREATED": - case 5: - message.state = 5; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.specVersion != null) - message.specVersion = String(object.specVersion); - switch (object.trigger) { - default: - if (typeof object.trigger === "number") { - message.trigger = object.trigger; - break; - } - break; - case "TRIGGER_UNSPECIFIED": - case 0: - message.trigger = 0; - break; - case "ON_DEMAND": - case 1: - message.trigger = 1; - break; - case "SCHEDULE": - case 2: - message.trigger = 2; - break; - } - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "FULL": - case 1: - message.scope = 1; - break; - case "INCREMENTAL": - case 2: - message.scope = 2; - break; - } - if (object.dataProfile != null) { - if (typeof object.dataProfile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfile: object expected"); - message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.fromObject(object.dataProfile); - } - if (object.dataQuality != null) { - if (typeof object.dataQuality !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQuality: object expected"); - message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.fromObject(object.dataQuality); - } - if (object.dataProfileConfigs != null) { - if (typeof object.dataProfileConfigs !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfileConfigs: object expected"); - message.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.fromObject(object.dataProfileConfigs); - } - if (object.dataQualityConfigs != null) { - if (typeof object.dataQualityConfigs !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQualityConfigs: object expected"); - message.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.fromObject(object.dataQualityConfigs); - } - if (object.postScanActionsResult != null) { - if (typeof object.postScanActionsResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.postScanActionsResult: object expected"); - message.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.fromObject(object.postScanActionsResult); - } - return message; - }; - - /** - * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent} message DataScanEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataScanEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.type = options.enums === String ? "SCAN_TYPE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.specVersion = ""; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - object.postScanActionsResult = null; - object.createTime = null; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] : message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - object.specVersion = message.specVersion; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] : message.trigger; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] : message.scope; - if (message.postScanActionsResult != null && message.hasOwnProperty("postScanActionsResult")) - object.postScanActionsResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.toObject(message.postScanActionsResult, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { - object.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.toObject(message.dataProfile, options); - if (options.oneofs) - object.result = "dataProfile"; - } - if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { - object.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.toObject(message.dataQuality, options); - if (options.oneofs) - object.result = "dataQuality"; - } - if (message.dataProfileConfigs != null && message.hasOwnProperty("dataProfileConfigs")) { - object.dataProfileConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.toObject(message.dataProfileConfigs, options); - if (options.oneofs) - object.appliedConfigs = "dataProfileConfigs"; - } - if (message.dataQualityConfigs != null && message.hasOwnProperty("dataQualityConfigs")) { - object.dataQualityConfigs = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.toObject(message.dataQualityConfigs, options); - if (options.oneofs) - object.appliedConfigs = "dataQualityConfigs"; - } - return object; - }; - - /** - * Converts this DataScanEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - * @returns {Object.} JSON object - */ - DataScanEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataScanEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataScanEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent"; - }; - - /** - * ScanType enum. - * @name google.cloud.dataplex.v1.DataScanEvent.ScanType - * @enum {number} - * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value - * @property {number} DATA_PROFILE=1 DATA_PROFILE value - * @property {number} DATA_QUALITY=2 DATA_QUALITY value - * @property {number} DATA_DISCOVERY=4 DATA_DISCOVERY value - */ - DataScanEvent.ScanType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_PROFILE"] = 1; - values[valuesById[2] = "DATA_QUALITY"] = 2; - values[valuesById[4] = "DATA_DISCOVERY"] = 4; - return values; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.DataScanEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=1 STARTED value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - * @property {number} CREATED=5 CREATED value - */ - DataScanEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STARTED"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - values[valuesById[5] = "CREATED"] = 5; - return values; - })(); - - /** - * Trigger enum. - * @name google.cloud.dataplex.v1.DataScanEvent.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} ON_DEMAND=1 ON_DEMAND value - * @property {number} SCHEDULE=2 SCHEDULE value - */ - DataScanEvent.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "ON_DEMAND"] = 1; - values[valuesById[2] = "SCHEDULE"] = 2; - return values; - })(); - - /** - * Scope enum. - * @name google.cloud.dataplex.v1.DataScanEvent.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} INCREMENTAL=2 INCREMENTAL value - */ - DataScanEvent.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "INCREMENTAL"] = 2; - return values; - })(); - - DataScanEvent.DataProfileResult = (function() { - - /** - * Properties of a DataProfileResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataProfileResult - * @property {number|Long|null} [rowCount] DataProfileResult rowCount - */ - - /** - * Constructs a new DataProfileResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataProfileResult. - * @implements IDataProfileResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set - */ - function DataProfileResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataProfileResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @instance - */ - DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult instance - */ - DataProfileResult.create = function create(properties) { - return new DataProfileResult(properties); - }; - - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); - return writer; - }; - - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataProfileResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataProfileResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - return null; - }; - - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - */ - DataProfileResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} message DataProfileResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataProfileResult.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.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - return object; - }; - - /** - * Converts this DataProfileResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @instance - * @returns {Object.} JSON object - */ - DataProfileResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataProfileResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"; - }; - - return DataProfileResult; - })(); - - DataScanEvent.DataQualityResult = (function() { - - /** - * Properties of a DataQualityResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataQualityResult - * @property {number|Long|null} [rowCount] DataQualityResult rowCount - * @property {boolean|null} [passed] DataQualityResult passed - * @property {Object.|null} [dimensionPassed] DataQualityResult dimensionPassed - * @property {number|null} [score] DataQualityResult score - * @property {Object.|null} [dimensionScore] DataQualityResult dimensionScore - * @property {Object.|null} [columnScore] DataQualityResult columnScore - */ - - /** - * Constructs a new DataQualityResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataQualityResult. - * @implements IDataQualityResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set - */ - function DataQualityResult(properties) { - this.dimensionPassed = {}; - this.dimensionScore = {}; - this.columnScore = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityResult passed. - * @member {boolean} passed - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.passed = false; - - /** - * DataQualityResult dimensionPassed. - * @member {Object.} dimensionPassed - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.dimensionPassed = $util.emptyObject; - - /** - * DataQualityResult score. - * @member {number} score - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.score = 0; - - /** - * DataQualityResult dimensionScore. - * @member {Object.} dimensionScore - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.dimensionScore = $util.emptyObject; - - /** - * DataQualityResult columnScore. - * @member {Object.} columnScore - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.columnScore = $util.emptyObject; - - /** - * Creates a new DataQualityResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult instance - */ - DataQualityResult.create = function create(properties) { - return new DataQualityResult(properties); - }; - - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); - if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passed); - if (message.dimensionPassed != null && Object.hasOwnProperty.call(message, "dimensionPassed")) - for (var keys = Object.keys(message.dimensionPassed), 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 0 =*/16).bool(message.dimensionPassed[keys[i]]).ldelim(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.score); - if (message.dimensionScore != null && Object.hasOwnProperty.call(message, "dimensionScore")) - for (var keys = Object.keys(message.dimensionScore), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 5 =*/21).float(message.dimensionScore[keys[i]]).ldelim(); - if (message.columnScore != null && Object.hasOwnProperty.call(message, "columnScore")) - for (var keys = Object.keys(message.columnScore), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 5 =*/21).float(message.columnScore[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowCount = reader.int64(); - break; - } - case 2: { - message.passed = reader.bool(); - break; - } - case 3: { - if (message.dimensionPassed === $util.emptyObject) - message.dimensionPassed = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = false; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.bool(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.dimensionPassed[key] = value; - break; - } - case 4: { - message.score = reader.float(); - break; - } - case 5: { - if (message.dimensionScore === $util.emptyObject) - message.dimensionScore = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.float(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.dimensionScore[key] = value; - break; - } - case 6: { - if (message.columnScore === $util.emptyObject) - message.columnScore = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.float(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.columnScore[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - if (message.passed != null && message.hasOwnProperty("passed")) - if (typeof message.passed !== "boolean") - return "passed: boolean expected"; - if (message.dimensionPassed != null && message.hasOwnProperty("dimensionPassed")) { - if (!$util.isObject(message.dimensionPassed)) - return "dimensionPassed: object expected"; - var key = Object.keys(message.dimensionPassed); - for (var i = 0; i < key.length; ++i) - if (typeof message.dimensionPassed[key[i]] !== "boolean") - return "dimensionPassed: boolean{k:string} expected"; - } - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; - if (message.dimensionScore != null && message.hasOwnProperty("dimensionScore")) { - if (!$util.isObject(message.dimensionScore)) - return "dimensionScore: object expected"; - var key = Object.keys(message.dimensionScore); - for (var i = 0; i < key.length; ++i) - if (typeof message.dimensionScore[key[i]] !== "number") - return "dimensionScore: number{k:string} expected"; - } - if (message.columnScore != null && message.hasOwnProperty("columnScore")) { - if (!$util.isObject(message.columnScore)) - return "columnScore: object expected"; - var key = Object.keys(message.columnScore); - for (var i = 0; i < key.length; ++i) - if (typeof message.columnScore[key[i]] !== "number") - return "columnScore: number{k:string} expected"; - } - return null; - }; - - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - */ - DataQualityResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - if (object.passed != null) - message.passed = Boolean(object.passed); - if (object.dimensionPassed) { - if (typeof object.dimensionPassed !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionPassed: object expected"); - message.dimensionPassed = {}; - for (var keys = Object.keys(object.dimensionPassed), i = 0; i < keys.length; ++i) - message.dimensionPassed[keys[i]] = Boolean(object.dimensionPassed[keys[i]]); - } - if (object.score != null) - message.score = Number(object.score); - if (object.dimensionScore) { - if (typeof object.dimensionScore !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionScore: object expected"); - message.dimensionScore = {}; - for (var keys = Object.keys(object.dimensionScore), i = 0; i < keys.length; ++i) - message.dimensionScore[keys[i]] = Number(object.dimensionScore[keys[i]]); - } - if (object.columnScore) { - if (typeof object.columnScore !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.columnScore: object expected"); - message.columnScore = {}; - for (var keys = Object.keys(object.columnScore), i = 0; i < keys.length; ++i) - message.columnScore[keys[i]] = Number(object.columnScore[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} message DataQualityResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.dimensionPassed = {}; - object.dimensionScore = {}; - object.columnScore = {}; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - object.passed = false; - object.score = 0; - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - if (message.passed != null && message.hasOwnProperty("passed")) - object.passed = message.passed; - var keys2; - if (message.dimensionPassed && (keys2 = Object.keys(message.dimensionPassed)).length) { - object.dimensionPassed = {}; - for (var j = 0; j < keys2.length; ++j) - object.dimensionPassed[keys2[j]] = message.dimensionPassed[keys2[j]]; - } - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.dimensionScore && (keys2 = Object.keys(message.dimensionScore)).length) { - object.dimensionScore = {}; - for (var j = 0; j < keys2.length; ++j) - object.dimensionScore[keys2[j]] = options.json && !isFinite(message.dimensionScore[keys2[j]]) ? String(message.dimensionScore[keys2[j]]) : message.dimensionScore[keys2[j]]; - } - if (message.columnScore && (keys2 = Object.keys(message.columnScore)).length) { - object.columnScore = {}; - for (var j = 0; j < keys2.length; ++j) - object.columnScore[keys2[j]] = options.json && !isFinite(message.columnScore[keys2[j]]) ? String(message.columnScore[keys2[j]]) : message.columnScore[keys2[j]]; - } - return object; - }; - - /** - * Converts this DataQualityResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"; - }; - - return DataQualityResult; - })(); - - DataScanEvent.DataProfileAppliedConfigs = (function() { - - /** - * Properties of a DataProfileAppliedConfigs. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataProfileAppliedConfigs - * @property {number|null} [samplingPercent] DataProfileAppliedConfigs samplingPercent - * @property {boolean|null} [rowFilterApplied] DataProfileAppliedConfigs rowFilterApplied - * @property {boolean|null} [columnFilterApplied] DataProfileAppliedConfigs columnFilterApplied - */ - - /** - * Constructs a new DataProfileAppliedConfigs. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataProfileAppliedConfigs. - * @implements IDataProfileAppliedConfigs - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs=} [properties] Properties to set - */ - function DataProfileAppliedConfigs(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataProfileAppliedConfigs samplingPercent. - * @member {number} samplingPercent - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @instance - */ - DataProfileAppliedConfigs.prototype.samplingPercent = 0; - - /** - * DataProfileAppliedConfigs rowFilterApplied. - * @member {boolean} rowFilterApplied - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @instance - */ - DataProfileAppliedConfigs.prototype.rowFilterApplied = false; - - /** - * DataProfileAppliedConfigs columnFilterApplied. - * @member {boolean} columnFilterApplied - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @instance - */ - DataProfileAppliedConfigs.prototype.columnFilterApplied = false; - - /** - * Creates a new DataProfileAppliedConfigs instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs instance - */ - DataProfileAppliedConfigs.create = function create(properties) { - return new DataProfileAppliedConfigs(properties); - }; - - /** - * Encodes the specified DataProfileAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs} message DataProfileAppliedConfigs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileAppliedConfigs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.samplingPercent); - if (message.rowFilterApplied != null && Object.hasOwnProperty.call(message, "rowFilterApplied")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.rowFilterApplied); - if (message.columnFilterApplied != null && Object.hasOwnProperty.call(message, "columnFilterApplied")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.columnFilterApplied); - return writer; - }; - - /** - * Encodes the specified DataProfileAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileAppliedConfigs} message DataProfileAppliedConfigs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileAppliedConfigs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileAppliedConfigs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.samplingPercent = reader.float(); - break; - } - case 2: { - message.rowFilterApplied = reader.bool(); - break; - } - case 3: { - message.columnFilterApplied = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataProfileAppliedConfigs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileAppliedConfigs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataProfileAppliedConfigs message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataProfileAppliedConfigs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - if (typeof message.samplingPercent !== "number") - return "samplingPercent: number expected"; - if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) - if (typeof message.rowFilterApplied !== "boolean") - return "rowFilterApplied: boolean expected"; - if (message.columnFilterApplied != null && message.hasOwnProperty("columnFilterApplied")) - if (typeof message.columnFilterApplied !== "boolean") - return "columnFilterApplied: boolean expected"; - return null; - }; - - /** - * Creates a DataProfileAppliedConfigs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} DataProfileAppliedConfigs - */ - DataProfileAppliedConfigs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(); - if (object.samplingPercent != null) - message.samplingPercent = Number(object.samplingPercent); - if (object.rowFilterApplied != null) - message.rowFilterApplied = Boolean(object.rowFilterApplied); - if (object.columnFilterApplied != null) - message.columnFilterApplied = Boolean(object.columnFilterApplied); - return message; - }; - - /** - * Creates a plain object from a DataProfileAppliedConfigs message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} message DataProfileAppliedConfigs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataProfileAppliedConfigs.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.samplingPercent = 0; - object.rowFilterApplied = false; - object.columnFilterApplied = false; - } - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; - if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) - object.rowFilterApplied = message.rowFilterApplied; - if (message.columnFilterApplied != null && message.hasOwnProperty("columnFilterApplied")) - object.columnFilterApplied = message.columnFilterApplied; - return object; - }; - - /** - * Converts this DataProfileAppliedConfigs to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @instance - * @returns {Object.} JSON object - */ - DataProfileAppliedConfigs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataProfileAppliedConfigs - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataProfileAppliedConfigs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"; - }; - - return DataProfileAppliedConfigs; - })(); - - DataScanEvent.DataQualityAppliedConfigs = (function() { - - /** - * Properties of a DataQualityAppliedConfigs. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataQualityAppliedConfigs - * @property {number|null} [samplingPercent] DataQualityAppliedConfigs samplingPercent - * @property {boolean|null} [rowFilterApplied] DataQualityAppliedConfigs rowFilterApplied - */ - - /** - * Constructs a new DataQualityAppliedConfigs. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataQualityAppliedConfigs. - * @implements IDataQualityAppliedConfigs - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs=} [properties] Properties to set - */ - function DataQualityAppliedConfigs(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityAppliedConfigs samplingPercent. - * @member {number} samplingPercent - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @instance - */ - DataQualityAppliedConfigs.prototype.samplingPercent = 0; - - /** - * DataQualityAppliedConfigs rowFilterApplied. - * @member {boolean} rowFilterApplied - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @instance - */ - DataQualityAppliedConfigs.prototype.rowFilterApplied = false; - - /** - * Creates a new DataQualityAppliedConfigs instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs instance - */ - DataQualityAppliedConfigs.create = function create(properties) { - return new DataQualityAppliedConfigs(properties); - }; - - /** - * Encodes the specified DataQualityAppliedConfigs message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs} message DataQualityAppliedConfigs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityAppliedConfigs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.samplingPercent != null && Object.hasOwnProperty.call(message, "samplingPercent")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.samplingPercent); - if (message.rowFilterApplied != null && Object.hasOwnProperty.call(message, "rowFilterApplied")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.rowFilterApplied); - return writer; - }; - - /** - * Encodes the specified DataQualityAppliedConfigs message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityAppliedConfigs} message DataQualityAppliedConfigs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityAppliedConfigs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityAppliedConfigs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.samplingPercent = reader.float(); - break; - } - case 2: { - message.rowFilterApplied = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityAppliedConfigs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityAppliedConfigs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityAppliedConfigs message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityAppliedConfigs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - if (typeof message.samplingPercent !== "number") - return "samplingPercent: number expected"; - if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) - if (typeof message.rowFilterApplied !== "boolean") - return "rowFilterApplied: boolean expected"; - return null; - }; - - /** - * Creates a DataQualityAppliedConfigs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} DataQualityAppliedConfigs - */ - DataQualityAppliedConfigs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(); - if (object.samplingPercent != null) - message.samplingPercent = Number(object.samplingPercent); - if (object.rowFilterApplied != null) - message.rowFilterApplied = Boolean(object.rowFilterApplied); - return message; - }; - - /** - * Creates a plain object from a DataQualityAppliedConfigs message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} message DataQualityAppliedConfigs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityAppliedConfigs.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.samplingPercent = 0; - object.rowFilterApplied = false; - } - if (message.samplingPercent != null && message.hasOwnProperty("samplingPercent")) - object.samplingPercent = options.json && !isFinite(message.samplingPercent) ? String(message.samplingPercent) : message.samplingPercent; - if (message.rowFilterApplied != null && message.hasOwnProperty("rowFilterApplied")) - object.rowFilterApplied = message.rowFilterApplied; - return object; - }; - - /** - * Converts this DataQualityAppliedConfigs to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @instance - * @returns {Object.} JSON object - */ - DataQualityAppliedConfigs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityAppliedConfigs - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityAppliedConfigs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"; - }; - - return DataQualityAppliedConfigs; - })(); - - DataScanEvent.PostScanActionsResult = (function() { - - /** - * Properties of a PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IPostScanActionsResult - * @property {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null} [bigqueryExportResult] PostScanActionsResult bigqueryExportResult - */ - - /** - * Constructs a new PostScanActionsResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a PostScanActionsResult. - * @implements IPostScanActionsResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult=} [properties] Properties to set - */ - function PostScanActionsResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PostScanActionsResult bigqueryExportResult. - * @member {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult|null|undefined} bigqueryExportResult - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @instance - */ - PostScanActionsResult.prototype.bigqueryExportResult = null; - - /** - * Creates a new PostScanActionsResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult instance - */ - PostScanActionsResult.create = function create(properties) { - return new PostScanActionsResult(properties); - }; - - /** - * Encodes the specified PostScanActionsResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryExportResult != null && Object.hasOwnProperty.call(message, "bigqueryExportResult")) - $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.encode(message.bigqueryExportResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PostScanActionsResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IPostScanActionsResult} message PostScanActionsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostScanActionsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostScanActionsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostScanActionsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostScanActionsResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostScanActionsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify(message.bigqueryExportResult); - if (error) - return "bigqueryExportResult." + error; - } - return null; - }; - - /** - * Creates a PostScanActionsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} PostScanActionsResult - */ - PostScanActionsResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(); - if (object.bigqueryExportResult != null) { - if (typeof object.bigqueryExportResult !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.bigqueryExportResult: object expected"); - message.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.fromObject(object.bigqueryExportResult); - } - return message; - }; - - /** - * Creates a plain object from a PostScanActionsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} message PostScanActionsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostScanActionsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryExportResult = null; - if (message.bigqueryExportResult != null && message.hasOwnProperty("bigqueryExportResult")) - object.bigqueryExportResult = $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.toObject(message.bigqueryExportResult, options); - return object; - }; - - /** - * Converts this PostScanActionsResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @instance - * @returns {Object.} JSON object - */ - PostScanActionsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostScanActionsResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostScanActionsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"; - }; - - PostScanActionsResult.BigQueryExportResult = (function() { - - /** - * Properties of a BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @interface IBigQueryExportResult - * @property {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State|null} [state] BigQueryExportResult state - * @property {string|null} [message] BigQueryExportResult message - */ - - /** - * Constructs a new BigQueryExportResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - * @classdesc Represents a BigQueryExportResult. - * @implements IBigQueryExportResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - */ - function BigQueryExportResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryExportResult state. - * @member {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State} state - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.state = 0; - - /** - * BigQueryExportResult message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @instance - */ - BigQueryExportResult.prototype.message = ""; - - /** - * Creates a new BigQueryExportResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult instance - */ - BigQueryExportResult.create = function create(properties) { - return new BigQueryExportResult(properties); - }; - - /** - * Encodes the specified BigQueryExportResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.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.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - return writer; - }; - - /** - * Encodes the specified BigQueryExportResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.IBigQueryExportResult} message BigQueryExportResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryExportResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryExportResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryExportResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryExportResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryExportResult.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.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a BigQueryExportResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} BigQueryExportResult - */ - BigQueryExportResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "SKIPPED": - case 3: - message.state = 3; - break; - } - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a BigQueryExportResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} message BigQueryExportResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryExportResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this BigQueryExportResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @instance - * @returns {Object.} JSON object - */ - BigQueryExportResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryExportResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryExportResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"; - }; - - /** - * State enum. - * @name google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} SKIPPED=3 SKIPPED value - */ - BigQueryExportResult.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "SKIPPED"] = 3; - return values; - })(); - - return BigQueryExportResult; - })(); - - return PostScanActionsResult; - })(); - - return DataScanEvent; - })(); - - v1.DataQualityScanRuleResult = (function() { - - /** - * Properties of a DataQualityScanRuleResult. - * @memberof google.cloud.dataplex.v1 - * @interface IDataQualityScanRuleResult - * @property {string|null} [jobId] DataQualityScanRuleResult jobId - * @property {string|null} [dataSource] DataQualityScanRuleResult dataSource - * @property {string|null} [column] DataQualityScanRuleResult column - * @property {string|null} [ruleName] DataQualityScanRuleResult ruleName - * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType|null} [ruleType] DataQualityScanRuleResult ruleType - * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType|null} [evalutionType] DataQualityScanRuleResult evalutionType - * @property {string|null} [ruleDimension] DataQualityScanRuleResult ruleDimension - * @property {number|null} [thresholdPercent] DataQualityScanRuleResult thresholdPercent - * @property {google.cloud.dataplex.v1.DataQualityScanRuleResult.Result|null} [result] DataQualityScanRuleResult result - * @property {number|Long|null} [evaluatedRowCount] DataQualityScanRuleResult evaluatedRowCount - * @property {number|Long|null} [passedRowCount] DataQualityScanRuleResult passedRowCount - * @property {number|Long|null} [nullRowCount] DataQualityScanRuleResult nullRowCount - * @property {number|Long|null} [assertionRowCount] DataQualityScanRuleResult assertionRowCount - */ - - /** - * Constructs a new DataQualityScanRuleResult. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataQualityScanRuleResult. - * @implements IDataQualityScanRuleResult - * @constructor - * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult=} [properties] Properties to set - */ - function DataQualityScanRuleResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataQualityScanRuleResult jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.jobId = ""; - - /** - * DataQualityScanRuleResult dataSource. - * @member {string} dataSource - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.dataSource = ""; - - /** - * DataQualityScanRuleResult column. - * @member {string} column - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.column = ""; - - /** - * DataQualityScanRuleResult ruleName. - * @member {string} ruleName - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.ruleName = ""; - - /** - * DataQualityScanRuleResult ruleType. - * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType} ruleType - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.ruleType = 0; - - /** - * DataQualityScanRuleResult evalutionType. - * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType} evalutionType - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.evalutionType = 0; - - /** - * DataQualityScanRuleResult ruleDimension. - * @member {string} ruleDimension - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.ruleDimension = ""; - - /** - * DataQualityScanRuleResult thresholdPercent. - * @member {number} thresholdPercent - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.thresholdPercent = 0; - - /** - * DataQualityScanRuleResult result. - * @member {google.cloud.dataplex.v1.DataQualityScanRuleResult.Result} result - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.result = 0; - - /** - * DataQualityScanRuleResult evaluatedRowCount. - * @member {number|Long} evaluatedRowCount - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.evaluatedRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityScanRuleResult passedRowCount. - * @member {number|Long} passedRowCount - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.passedRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityScanRuleResult nullRowCount. - * @member {number|Long} nullRowCount - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.nullRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataQualityScanRuleResult assertionRowCount. - * @member {number|Long} assertionRowCount - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - */ - DataQualityScanRuleResult.prototype.assertionRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataQualityScanRuleResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult instance - */ - DataQualityScanRuleResult.create = function create(properties) { - return new DataQualityScanRuleResult(properties); - }; - - /** - * Encodes the specified DataQualityScanRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult} message DataQualityScanRuleResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityScanRuleResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.jobId); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSource); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.column); - if (message.ruleName != null && Object.hasOwnProperty.call(message, "ruleName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ruleName); - if (message.ruleType != null && Object.hasOwnProperty.call(message, "ruleType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ruleType); - if (message.evalutionType != null && Object.hasOwnProperty.call(message, "evalutionType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.evalutionType); - if (message.ruleDimension != null && Object.hasOwnProperty.call(message, "ruleDimension")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.ruleDimension); - if (message.thresholdPercent != null && Object.hasOwnProperty.call(message, "thresholdPercent")) - writer.uint32(/* id 8, wireType 1 =*/65).double(message.thresholdPercent); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.result); - if (message.evaluatedRowCount != null && Object.hasOwnProperty.call(message, "evaluatedRowCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.evaluatedRowCount); - if (message.passedRowCount != null && Object.hasOwnProperty.call(message, "passedRowCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.passedRowCount); - if (message.nullRowCount != null && Object.hasOwnProperty.call(message, "nullRowCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.nullRowCount); - if (message.assertionRowCount != null && Object.hasOwnProperty.call(message, "assertionRowCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.assertionRowCount); - return writer; - }; - - /** - * Encodes the specified DataQualityScanRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityScanRuleResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {google.cloud.dataplex.v1.IDataQualityScanRuleResult} message DataQualityScanRuleResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityScanRuleResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityScanRuleResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityScanRuleResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityScanRuleResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.jobId = reader.string(); - break; - } - case 2: { - message.dataSource = reader.string(); - break; - } - case 3: { - message.column = reader.string(); - break; - } - case 4: { - message.ruleName = reader.string(); - break; - } - case 5: { - message.ruleType = reader.int32(); - break; - } - case 6: { - message.evalutionType = reader.int32(); - break; - } - case 7: { - message.ruleDimension = reader.string(); - break; - } - case 8: { - message.thresholdPercent = reader.double(); - break; - } - case 9: { - message.result = reader.int32(); - break; - } - case 10: { - message.evaluatedRowCount = reader.int64(); - break; - } - case 11: { - message.passedRowCount = reader.int64(); - break; - } - case 12: { - message.nullRowCount = reader.int64(); - break; - } - case 13: { - message.assertionRowCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityScanRuleResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityScanRuleResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityScanRuleResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityScanRuleResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.ruleName != null && message.hasOwnProperty("ruleName")) - if (!$util.isString(message.ruleName)) - return "ruleName: string expected"; - if (message.ruleType != null && message.hasOwnProperty("ruleType")) - switch (message.ruleType) { - default: - return "ruleType: 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.evalutionType != null && message.hasOwnProperty("evalutionType")) - switch (message.evalutionType) { - default: - return "evalutionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.ruleDimension != null && message.hasOwnProperty("ruleDimension")) - if (!$util.isString(message.ruleDimension)) - return "ruleDimension: string expected"; - if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) - if (typeof message.thresholdPercent !== "number") - return "thresholdPercent: number expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.evaluatedRowCount != null && message.hasOwnProperty("evaluatedRowCount")) - if (!$util.isInteger(message.evaluatedRowCount) && !(message.evaluatedRowCount && $util.isInteger(message.evaluatedRowCount.low) && $util.isInteger(message.evaluatedRowCount.high))) - return "evaluatedRowCount: integer|Long expected"; - if (message.passedRowCount != null && message.hasOwnProperty("passedRowCount")) - if (!$util.isInteger(message.passedRowCount) && !(message.passedRowCount && $util.isInteger(message.passedRowCount.low) && $util.isInteger(message.passedRowCount.high))) - return "passedRowCount: integer|Long expected"; - if (message.nullRowCount != null && message.hasOwnProperty("nullRowCount")) - if (!$util.isInteger(message.nullRowCount) && !(message.nullRowCount && $util.isInteger(message.nullRowCount.low) && $util.isInteger(message.nullRowCount.high))) - return "nullRowCount: integer|Long expected"; - if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) - if (!$util.isInteger(message.assertionRowCount) && !(message.assertionRowCount && $util.isInteger(message.assertionRowCount.low) && $util.isInteger(message.assertionRowCount.high))) - return "assertionRowCount: integer|Long expected"; - return null; - }; - - /** - * Creates a DataQualityScanRuleResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataQualityScanRuleResult} DataQualityScanRuleResult - */ - DataQualityScanRuleResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataQualityScanRuleResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataQualityScanRuleResult(); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.column != null) - message.column = String(object.column); - if (object.ruleName != null) - message.ruleName = String(object.ruleName); - switch (object.ruleType) { - default: - if (typeof object.ruleType === "number") { - message.ruleType = object.ruleType; - break; - } - break; - case "RULE_TYPE_UNSPECIFIED": - case 0: - message.ruleType = 0; - break; - case "NON_NULL_EXPECTATION": - case 1: - message.ruleType = 1; - break; - case "RANGE_EXPECTATION": - case 2: - message.ruleType = 2; - break; - case "REGEX_EXPECTATION": - case 3: - message.ruleType = 3; - break; - case "ROW_CONDITION_EXPECTATION": - case 4: - message.ruleType = 4; - break; - case "SET_EXPECTATION": - case 5: - message.ruleType = 5; - break; - case "STATISTIC_RANGE_EXPECTATION": - case 6: - message.ruleType = 6; - break; - case "TABLE_CONDITION_EXPECTATION": - case 7: - message.ruleType = 7; - break; - case "UNIQUENESS_EXPECTATION": - case 8: - message.ruleType = 8; - break; - case "SQL_ASSERTION": - case 9: - message.ruleType = 9; - break; - } - switch (object.evalutionType) { - default: - if (typeof object.evalutionType === "number") { - message.evalutionType = object.evalutionType; - break; - } - break; - case "EVALUATION_TYPE_UNSPECIFIED": - case 0: - message.evalutionType = 0; - break; - case "PER_ROW": - case 1: - message.evalutionType = 1; - break; - case "AGGREGATE": - case 2: - message.evalutionType = 2; - break; - } - if (object.ruleDimension != null) - message.ruleDimension = String(object.ruleDimension); - if (object.thresholdPercent != null) - message.thresholdPercent = Number(object.thresholdPercent); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "PASSED": - case 1: - message.result = 1; - break; - case "FAILED": - case 2: - message.result = 2; - break; - } - if (object.evaluatedRowCount != null) - if ($util.Long) - (message.evaluatedRowCount = $util.Long.fromValue(object.evaluatedRowCount)).unsigned = false; - else if (typeof object.evaluatedRowCount === "string") - message.evaluatedRowCount = parseInt(object.evaluatedRowCount, 10); - else if (typeof object.evaluatedRowCount === "number") - message.evaluatedRowCount = object.evaluatedRowCount; - else if (typeof object.evaluatedRowCount === "object") - message.evaluatedRowCount = new $util.LongBits(object.evaluatedRowCount.low >>> 0, object.evaluatedRowCount.high >>> 0).toNumber(); - if (object.passedRowCount != null) - if ($util.Long) - (message.passedRowCount = $util.Long.fromValue(object.passedRowCount)).unsigned = false; - else if (typeof object.passedRowCount === "string") - message.passedRowCount = parseInt(object.passedRowCount, 10); - else if (typeof object.passedRowCount === "number") - message.passedRowCount = object.passedRowCount; - else if (typeof object.passedRowCount === "object") - message.passedRowCount = new $util.LongBits(object.passedRowCount.low >>> 0, object.passedRowCount.high >>> 0).toNumber(); - if (object.nullRowCount != null) - if ($util.Long) - (message.nullRowCount = $util.Long.fromValue(object.nullRowCount)).unsigned = false; - else if (typeof object.nullRowCount === "string") - message.nullRowCount = parseInt(object.nullRowCount, 10); - else if (typeof object.nullRowCount === "number") - message.nullRowCount = object.nullRowCount; - else if (typeof object.nullRowCount === "object") - message.nullRowCount = new $util.LongBits(object.nullRowCount.low >>> 0, object.nullRowCount.high >>> 0).toNumber(); - if (object.assertionRowCount != null) - if ($util.Long) - (message.assertionRowCount = $util.Long.fromValue(object.assertionRowCount)).unsigned = false; - else if (typeof object.assertionRowCount === "string") - message.assertionRowCount = parseInt(object.assertionRowCount, 10); - else if (typeof object.assertionRowCount === "number") - message.assertionRowCount = object.assertionRowCount; - else if (typeof object.assertionRowCount === "object") - message.assertionRowCount = new $util.LongBits(object.assertionRowCount.low >>> 0, object.assertionRowCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataQualityScanRuleResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {google.cloud.dataplex.v1.DataQualityScanRuleResult} message DataQualityScanRuleResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityScanRuleResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.jobId = ""; - object.dataSource = ""; - object.column = ""; - object.ruleName = ""; - object.ruleType = options.enums === String ? "RULE_TYPE_UNSPECIFIED" : 0; - object.evalutionType = options.enums === String ? "EVALUATION_TYPE_UNSPECIFIED" : 0; - object.ruleDimension = ""; - object.thresholdPercent = 0; - object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.evaluatedRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.evaluatedRowCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.passedRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.passedRowCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.nullRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nullRowCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.assertionRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.assertionRowCount = options.longs === String ? "0" : 0; - } - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.ruleName != null && message.hasOwnProperty("ruleName")) - object.ruleName = message.ruleName; - if (message.ruleType != null && message.hasOwnProperty("ruleType")) - object.ruleType = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType[message.ruleType] === undefined ? message.ruleType : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType[message.ruleType] : message.ruleType; - if (message.evalutionType != null && message.hasOwnProperty("evalutionType")) - object.evalutionType = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType[message.evalutionType] === undefined ? message.evalutionType : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType[message.evalutionType] : message.evalutionType; - if (message.ruleDimension != null && message.hasOwnProperty("ruleDimension")) - object.ruleDimension = message.ruleDimension; - if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) - object.thresholdPercent = options.json && !isFinite(message.thresholdPercent) ? String(message.thresholdPercent) : message.thresholdPercent; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result[message.result] === undefined ? message.result : $root.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result[message.result] : message.result; - if (message.evaluatedRowCount != null && message.hasOwnProperty("evaluatedRowCount")) - if (typeof message.evaluatedRowCount === "number") - object.evaluatedRowCount = options.longs === String ? String(message.evaluatedRowCount) : message.evaluatedRowCount; - else - object.evaluatedRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.evaluatedRowCount) : options.longs === Number ? new $util.LongBits(message.evaluatedRowCount.low >>> 0, message.evaluatedRowCount.high >>> 0).toNumber() : message.evaluatedRowCount; - if (message.passedRowCount != null && message.hasOwnProperty("passedRowCount")) - if (typeof message.passedRowCount === "number") - object.passedRowCount = options.longs === String ? String(message.passedRowCount) : message.passedRowCount; - else - object.passedRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedRowCount) : options.longs === Number ? new $util.LongBits(message.passedRowCount.low >>> 0, message.passedRowCount.high >>> 0).toNumber() : message.passedRowCount; - if (message.nullRowCount != null && message.hasOwnProperty("nullRowCount")) - if (typeof message.nullRowCount === "number") - object.nullRowCount = options.longs === String ? String(message.nullRowCount) : message.nullRowCount; - else - object.nullRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullRowCount) : options.longs === Number ? new $util.LongBits(message.nullRowCount.low >>> 0, message.nullRowCount.high >>> 0).toNumber() : message.nullRowCount; - if (message.assertionRowCount != null && message.hasOwnProperty("assertionRowCount")) - if (typeof message.assertionRowCount === "number") - object.assertionRowCount = options.longs === String ? String(message.assertionRowCount) : message.assertionRowCount; - else - object.assertionRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.assertionRowCount) : options.longs === Number ? new $util.LongBits(message.assertionRowCount.low >>> 0, message.assertionRowCount.high >>> 0).toNumber() : message.assertionRowCount; - return object; - }; - - /** - * Converts this DataQualityScanRuleResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityScanRuleResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityScanRuleResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataQualityScanRuleResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityScanRuleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityScanRuleResult"; - }; - - /** - * RuleType enum. - * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType - * @enum {number} - * @property {number} RULE_TYPE_UNSPECIFIED=0 RULE_TYPE_UNSPECIFIED value - * @property {number} NON_NULL_EXPECTATION=1 NON_NULL_EXPECTATION value - * @property {number} RANGE_EXPECTATION=2 RANGE_EXPECTATION value - * @property {number} REGEX_EXPECTATION=3 REGEX_EXPECTATION value - * @property {number} ROW_CONDITION_EXPECTATION=4 ROW_CONDITION_EXPECTATION value - * @property {number} SET_EXPECTATION=5 SET_EXPECTATION value - * @property {number} STATISTIC_RANGE_EXPECTATION=6 STATISTIC_RANGE_EXPECTATION value - * @property {number} TABLE_CONDITION_EXPECTATION=7 TABLE_CONDITION_EXPECTATION value - * @property {number} UNIQUENESS_EXPECTATION=8 UNIQUENESS_EXPECTATION value - * @property {number} SQL_ASSERTION=9 SQL_ASSERTION value - */ - DataQualityScanRuleResult.RuleType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RULE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NON_NULL_EXPECTATION"] = 1; - values[valuesById[2] = "RANGE_EXPECTATION"] = 2; - values[valuesById[3] = "REGEX_EXPECTATION"] = 3; - values[valuesById[4] = "ROW_CONDITION_EXPECTATION"] = 4; - values[valuesById[5] = "SET_EXPECTATION"] = 5; - values[valuesById[6] = "STATISTIC_RANGE_EXPECTATION"] = 6; - values[valuesById[7] = "TABLE_CONDITION_EXPECTATION"] = 7; - values[valuesById[8] = "UNIQUENESS_EXPECTATION"] = 8; - values[valuesById[9] = "SQL_ASSERTION"] = 9; - return values; - })(); - - /** - * EvaluationType enum. - * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType - * @enum {number} - * @property {number} EVALUATION_TYPE_UNSPECIFIED=0 EVALUATION_TYPE_UNSPECIFIED value - * @property {number} PER_ROW=1 PER_ROW value - * @property {number} AGGREGATE=2 AGGREGATE value - */ - DataQualityScanRuleResult.EvaluationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVALUATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PER_ROW"] = 1; - values[valuesById[2] = "AGGREGATE"] = 2; - return values; - })(); - - /** - * Result enum. - * @name google.cloud.dataplex.v1.DataQualityScanRuleResult.Result - * @enum {number} - * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value - * @property {number} PASSED=1 PASSED value - * @property {number} FAILED=2 FAILED value - */ - DataQualityScanRuleResult.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PASSED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - return values; - })(); - - return DataQualityScanRuleResult; - })(); - - v1.MetadataService = (function() { - - /** - * Constructs a new MetadataService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a MetadataService - * @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 MetadataService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; - - /** - * Creates new MetadataService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.MetadataService - * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. - */ - MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef CreateEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity - */ - - /** - * Calls CreateEntity. - * @function createEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.CreateEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.createEntity = function createEntity(request, callback) { - return this.rpcCall(createEntity, $root.google.cloud.dataplex.v1.CreateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "CreateEntity" }); - - /** - * Calls CreateEntity. - * @function createEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef UpdateEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity - */ - - /** - * Calls UpdateEntity. - * @function updateEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.updateEntity = function updateEntity(request, callback) { - return this.rpcCall(updateEntity, $root.google.cloud.dataplex.v1.UpdateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "UpdateEntity" }); - - /** - * Calls UpdateEntity. - * @function updateEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef DeleteEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntity. - * @function deleteEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.deleteEntity = function deleteEntity(request, callback) { - return this.rpcCall(deleteEntity, $root.google.cloud.dataplex.v1.DeleteEntityRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntity" }); - - /** - * Calls DeleteEntity. - * @function deleteEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity - */ - - /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { - return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "GetEntity" }); - - /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse - */ - - /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { - return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); - }, "name", { value: "ListEntities" }); - - /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef CreatePartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Partition} [response] Partition - */ - - /** - * Calls CreatePartition. - * @function createPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback} callback Node-style callback called with the error, if any, and Partition - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.createPartition = function createPartition(request, callback) { - return this.rpcCall(createPartition, $root.google.cloud.dataplex.v1.CreatePartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); - }, "name", { value: "CreatePartition" }); - - /** - * Calls CreatePartition. - * @function createPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef DeletePartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePartition. - * @function deletePartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.deletePartition = function deletePartition(request, callback) { - return this.rpcCall(deletePartition, $root.google.cloud.dataplex.v1.DeletePartitionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePartition" }); - - /** - * Calls DeletePartition. - * @function deletePartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetPartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Partition} [response] Partition - */ - - /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { - return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); - }, "name", { value: "GetPartition" }); - - /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListPartitionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse - */ - - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { - return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); - }, "name", { value: "ListPartitions" }); - - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MetadataService; - })(); - - v1.CreateEntityRequest = (function() { - - /** - * Properties of a CreateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEntityRequest - * @property {string|null} [parent] CreateEntityRequest parent - * @property {google.cloud.dataplex.v1.IEntity|null} [entity] CreateEntityRequest entity - * @property {boolean|null} [validateOnly] CreateEntityRequest validateOnly - */ - - /** - * Constructs a new CreateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEntityRequest. - * @implements ICreateEntityRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set - */ - function CreateEntityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntityRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @instance - */ - CreateEntityRequest.prototype.parent = ""; - - /** - * CreateEntityRequest entity. - * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @instance - */ - CreateEntityRequest.prototype.entity = null; - - /** - * CreateEntityRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @instance - */ - CreateEntityRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateEntityRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest instance - */ - CreateEntityRequest.create = function create(properties) { - return new CreateEntityRequest(properties); - }; - - /** - * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntityRequest.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.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntityRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntityRequest.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.entity != null && message.hasOwnProperty("entity")) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); - if (error) - return "entity." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest - */ - CreateEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEntityRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEntityRequest.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.CreateEntityRequest} message CreateEntityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntityRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entity = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateEntityRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntityRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntityRequest"; - }; - - return CreateEntityRequest; - })(); - - v1.UpdateEntityRequest = (function() { - - /** - * Properties of an UpdateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEntityRequest - * @property {google.cloud.dataplex.v1.IEntity|null} [entity] UpdateEntityRequest entity - * @property {boolean|null} [validateOnly] UpdateEntityRequest validateOnly - */ - - /** - * Constructs a new UpdateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEntityRequest. - * @implements IUpdateEntityRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set - */ - function UpdateEntityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntityRequest entity. - * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @instance - */ - UpdateEntityRequest.prototype.entity = null; - - /** - * UpdateEntityRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @instance - */ - UpdateEntityRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateEntityRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest instance - */ - UpdateEntityRequest.create = function create(properties) { - return new UpdateEntityRequest(properties); - }; - - /** - * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntityRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntityRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntityRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); - if (error) - return "entity." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest - */ - UpdateEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntityRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntityRequest.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateEntityRequest} message UpdateEntityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntityRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = null; - object.validateOnly = false; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateEntityRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntityRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntityRequest"; - }; - - return UpdateEntityRequest; - })(); - - v1.DeleteEntityRequest = (function() { - - /** - * Properties of a DeleteEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEntityRequest - * @property {string|null} [name] DeleteEntityRequest name - * @property {string|null} [etag] DeleteEntityRequest etag - */ - - /** - * Constructs a new DeleteEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEntityRequest. - * @implements IDeleteEntityRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set - */ - function DeleteEntityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntityRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @instance - */ - DeleteEntityRequest.prototype.name = ""; - - /** - * DeleteEntityRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @instance - */ - DeleteEntityRequest.prototype.etag = ""; - - /** - * Creates a new DeleteEntityRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest instance - */ - DeleteEntityRequest.create = function create(properties) { - return new DeleteEntityRequest(properties); - }; - - /** - * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntityRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntityRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntityRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest - */ - DeleteEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntityRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteEntityRequest} message DeleteEntityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntityRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteEntityRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntityRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntityRequest"; - }; - - return DeleteEntityRequest; - })(); - - v1.ListEntitiesRequest = (function() { - - /** - * Properties of a ListEntitiesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesRequest - * @property {string|null} [parent] ListEntitiesRequest parent - * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view - * @property {number|null} [pageSize] ListEntitiesRequest pageSize - * @property {string|null} [pageToken] ListEntitiesRequest pageToken - * @property {string|null} [filter] ListEntitiesRequest filter - */ - - /** - * Constructs a new ListEntitiesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesRequest. - * @implements IListEntitiesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set - */ - function ListEntitiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.parent = ""; - - /** - * ListEntitiesRequest view. - * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.view = 0; - - /** - * ListEntitiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.pageSize = 0; - - /** - * ListEntitiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.pageToken = ""; - - /** - * ListEntitiesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.filter = ""; - - /** - * Creates a new ListEntitiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance - */ - ListEntitiesRequest.create = function create(properties) { - return new ListEntitiesRequest(properties); - }; - - /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntitiesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntitiesRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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 ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest - */ - ListEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTITY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "TABLES": - case 1: - message.view = 1; - break; - case "FILESETS": - case 2: - message.view = 2; - break; - } - 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 ListEntitiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntitiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; - 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 ListEntitiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntitiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntitiesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesRequest"; - }; - - /** - * EntityView enum. - * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView - * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} TABLES=1 TABLES value - * @property {number} FILESETS=2 FILESETS value - */ - ListEntitiesRequest.EntityView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLES"] = 1; - values[valuesById[2] = "FILESETS"] = 2; - return values; - })(); - - return ListEntitiesRequest; - })(); - - v1.ListEntitiesResponse = (function() { - - /** - * Properties of a ListEntitiesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesResponse - * @property {Array.|null} [entities] ListEntitiesResponse entities - * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken - */ - - /** - * Constructs a new ListEntitiesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesResponse. - * @implements IListEntitiesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set - */ - function ListEntitiesResponse(properties) { - this.entities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntitiesResponse entities. - * @member {Array.} entities - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - */ - ListEntitiesResponse.prototype.entities = $util.emptyArray; - - /** - * ListEntitiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - */ - ListEntitiesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntitiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance - */ - ListEntitiesResponse.create = function create(properties) { - return new ListEntitiesResponse(properties); - }; - - /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dataplex.v1.Entity.encode(message.entities[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 ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntitiesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntitiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse - */ - ListEntitiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); - message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntitiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEntitiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntitiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntitiesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesResponse"; - }; - - return ListEntitiesResponse; - })(); - - v1.GetEntityRequest = (function() { - - /** - * Properties of a GetEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetEntityRequest - * @property {string|null} [name] GetEntityRequest name - * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view - */ - - /** - * Constructs a new GetEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntityRequest. - * @implements IGetEntityRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set - */ - function GetEntityRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntityRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @instance - */ - GetEntityRequest.prototype.name = ""; - - /** - * GetEntityRequest view. - * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @instance - */ - GetEntityRequest.prototype.view = 0; - - /** - * Creates a new GetEntityRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance - */ - GetEntityRequest.create = function create(properties) { - return new GetEntityRequest(properties); - }; - - /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntityRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntityRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntityRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntityRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntityRequest.verify = function verify(message) { - if (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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - return null; - }; - - /** - * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest - */ - GetEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTITY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "SCHEMA": - case 2: - message.view = 2; - break; - case "FULL": - case 4: - message.view = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntityRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetEntityRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntityRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntityRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEntityRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntityRequest"; - }; - - /** - * EntityView enum. - * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView - * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} FULL=4 FULL value - */ - GetEntityRequest.EntityView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[4] = "FULL"] = 4; - return values; - })(); - - return GetEntityRequest; - })(); - - v1.ListPartitionsRequest = (function() { - - /** - * Properties of a ListPartitionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsRequest - * @property {string|null} [parent] ListPartitionsRequest parent - * @property {number|null} [pageSize] ListPartitionsRequest pageSize - * @property {string|null} [pageToken] ListPartitionsRequest pageToken - * @property {string|null} [filter] ListPartitionsRequest filter - */ - - /** - * Constructs a new ListPartitionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsRequest. - * @implements IListPartitionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set - */ - function ListPartitionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPartitionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.parent = ""; - - /** - * ListPartitionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.pageSize = 0; - - /** - * ListPartitionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.pageToken = ""; - - /** - * ListPartitionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.filter = ""; - - /** - * Creates a new ListPartitionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance - */ - ListPartitionsRequest.create = function create(properties) { - return new ListPartitionsRequest(properties); - }; - - /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsRequest.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 ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); - 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 ListPartitionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPartitionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPartitionsRequest.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 ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest - */ - ListPartitionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); - 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 ListPartitionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPartitionsRequest.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 ListPartitionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPartitionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPartitionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsRequest"; - }; - - return ListPartitionsRequest; - })(); - - v1.CreatePartitionRequest = (function() { - - /** - * Properties of a CreatePartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreatePartitionRequest - * @property {string|null} [parent] CreatePartitionRequest parent - * @property {google.cloud.dataplex.v1.IPartition|null} [partition] CreatePartitionRequest partition - * @property {boolean|null} [validateOnly] CreatePartitionRequest validateOnly - */ - - /** - * Constructs a new CreatePartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreatePartitionRequest. - * @implements ICreatePartitionRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set - */ - function CreatePartitionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreatePartitionRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @instance - */ - CreatePartitionRequest.prototype.parent = ""; - - /** - * CreatePartitionRequest partition. - * @member {google.cloud.dataplex.v1.IPartition|null|undefined} partition - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @instance - */ - CreatePartitionRequest.prototype.partition = null; - - /** - * CreatePartitionRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @instance - */ - CreatePartitionRequest.prototype.validateOnly = false; - - /** - * Creates a new CreatePartitionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest instance - */ - CreatePartitionRequest.create = function create(properties) { - return new CreatePartitionRequest(properties); - }; - - /** - * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePartitionRequest.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.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.Partition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePartitionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePartitionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePartitionRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePartitionRequest.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.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest - */ - CreatePartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreatePartitionRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreatePartitionRequest.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partition); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.CreatePartitionRequest} message CreatePartitionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePartitionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.partition = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.cloud.dataplex.v1.Partition.toObject(message.partition, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreatePartitionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePartitionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePartitionRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreatePartitionRequest"; - }; - - return CreatePartitionRequest; - })(); - - v1.DeletePartitionRequest = (function() { - - /** - * Properties of a DeletePartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeletePartitionRequest - * @property {string|null} [name] DeletePartitionRequest name - * @property {string|null} [etag] DeletePartitionRequest etag - */ - - /** - * Constructs a new DeletePartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeletePartitionRequest. - * @implements IDeletePartitionRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set - */ - function DeletePartitionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePartitionRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @instance - */ - DeletePartitionRequest.prototype.name = ""; - - /** - * DeletePartitionRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @instance - */ - DeletePartitionRequest.prototype.etag = ""; - - /** - * Creates a new DeletePartitionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest instance - */ - DeletePartitionRequest.create = function create(properties) { - return new DeletePartitionRequest(properties); - }; - - /** - * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePartitionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - return writer; - }; - - /** - * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePartitionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePartitionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePartitionRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePartitionRequest.verify = function verify(message) { - if (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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest - */ - DeletePartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeletePartitionRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {google.cloud.dataplex.v1.DeletePartitionRequest} message DeletePartitionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePartitionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeletePartitionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePartitionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePartitionRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeletePartitionRequest"; - }; - - return DeletePartitionRequest; - })(); - - v1.ListPartitionsResponse = (function() { - - /** - * Properties of a ListPartitionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsResponse - * @property {Array.|null} [partitions] ListPartitionsResponse partitions - * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken - */ - - /** - * Constructs a new ListPartitionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsResponse. - * @implements IListPartitionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set - */ - function ListPartitionsResponse(properties) { - this.partitions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPartitionsResponse partitions. - * @member {Array.} partitions - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - */ - ListPartitionsResponse.prototype.partitions = $util.emptyArray; - - /** - * ListPartitionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - */ - ListPartitionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPartitionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance - */ - ListPartitionsResponse.create = function create(properties) { - return new ListPartitionsResponse(properties); - }; - - /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partitions != null && message.partitions.length) - for (var i = 0; i < message.partitions.length; ++i) - $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[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 ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.partitions && message.partitions.length)) - message.partitions = []; - message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPartitionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPartitionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partitions != null && message.hasOwnProperty("partitions")) { - if (!Array.isArray(message.partitions)) - return "partitions: array expected"; - for (var i = 0; i < message.partitions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); - if (error) - return "partitions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse - */ - ListPartitionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); - if (object.partitions) { - if (!Array.isArray(object.partitions)) - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); - message.partitions = []; - for (var i = 0; i < object.partitions.length; ++i) { - if (typeof object.partitions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); - message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPartitionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.partitions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.partitions && message.partitions.length) { - object.partitions = []; - for (var j = 0; j < message.partitions.length; ++j) - object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPartitionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPartitionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPartitionsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsResponse"; - }; - - return ListPartitionsResponse; - })(); - - v1.GetPartitionRequest = (function() { - - /** - * Properties of a GetPartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetPartitionRequest - * @property {string|null} [name] GetPartitionRequest name - */ - - /** - * Constructs a new GetPartitionRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetPartitionRequest. - * @implements IGetPartitionRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set - */ - function GetPartitionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPartitionRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @instance - */ - GetPartitionRequest.prototype.name = ""; - - /** - * Creates a new GetPartitionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance - */ - GetPartitionRequest.create = function create(properties) { - return new GetPartitionRequest(properties); - }; - - /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPartitionRequest.encode = function encode(message, writer) { - 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 GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPartitionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); - 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 GetPartitionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPartitionRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPartitionRequest.verify = function verify(message) { - if (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 GetPartitionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest - */ - GetPartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPartitionRequest.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 GetPartitionRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @instance - * @returns {Object.} JSON object - */ - GetPartitionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPartitionRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetPartitionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetPartitionRequest"; - }; - - return GetPartitionRequest; - })(); - - v1.Entity = (function() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dataplex.v1 - * @interface IEntity - * @property {string|null} [name] Entity name - * @property {string|null} [displayName] Entity displayName - * @property {string|null} [description] Entity description - * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime - * @property {string|null} [id] Entity id - * @property {string|null} [etag] Entity etag - * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type - * @property {string|null} [asset] Entity asset - * @property {string|null} [dataPath] Entity dataPath - * @property {string|null} [dataPathPattern] Entity dataPathPattern - * @property {string|null} [catalogEntry] Entity catalogEntry - * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system - * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format - * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility - * @property {google.cloud.dataplex.v1.IStorageAccess|null} [access] Entity access - * @property {string|null} [uid] Entity uid - * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set - */ - function Entity(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entity name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.name = ""; - - /** - * Entity displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.displayName = ""; - - /** - * Entity description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.description = ""; - - /** - * Entity createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.createTime = null; - - /** - * Entity updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.updateTime = null; - - /** - * Entity id. - * @member {string} id - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.id = ""; - - /** - * Entity etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.etag = ""; - - /** - * Entity type. - * @member {google.cloud.dataplex.v1.Entity.Type} type - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.type = 0; - - /** - * Entity asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.asset = ""; - - /** - * Entity dataPath. - * @member {string} dataPath - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.dataPath = ""; - - /** - * Entity dataPathPattern. - * @member {string} dataPathPattern - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.dataPathPattern = ""; - - /** - * Entity catalogEntry. - * @member {string} catalogEntry - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.catalogEntry = ""; - - /** - * Entity system. - * @member {google.cloud.dataplex.v1.StorageSystem} system - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.system = 0; - - /** - * Entity format. - * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.format = null; - - /** - * Entity compatibility. - * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.compatibility = null; - - /** - * Entity access. - * @member {google.cloud.dataplex.v1.IStorageAccess|null|undefined} access - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.access = null; - - /** - * Entity uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.uid = ""; - - /** - * Entity schema. - * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema - * @memberof google.cloud.dataplex.v1.Entity - * @instance - */ - Entity.prototype.schema = null; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encode = function encode(message, writer) { - if (!writer) - 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); - if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); - if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); - if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.access != null && Object.hasOwnProperty.call(message, "access")) - $root.google.cloud.dataplex.v1.StorageAccess.encode(message.access, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.uid); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); - 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 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.id = reader.string(); - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 10: { - message.type = reader.int32(); - break; - } - case 11: { - message.asset = reader.string(); - break; - } - case 12: { - message.dataPath = reader.string(); - break; - } - case 13: { - message.dataPathPattern = reader.string(); - break; - } - case 14: { - message.catalogEntry = reader.string(); - break; - } - case 15: { - message.system = reader.int32(); - break; - } - case 16: { - message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); - break; - } - case 19: { - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); - break; - } - case 21: { - message.access = $root.google.cloud.dataplex.v1.StorageAccess.decode(reader, reader.uint32()); - break; - } - case 22: { - message.uid = reader.string(); - break; - } - case 50: { - message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity} Entity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entity.verify = function verify(message) { - if (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.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.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: 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; - } - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - if (!$util.isString(message.dataPath)) - return "dataPath: string expected"; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - if (!$util.isString(message.dataPathPattern)) - return "dataPathPattern: string expected"; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - if (!$util.isString(message.catalogEntry)) - return "catalogEntry: string expected"; - if (message.system != null && message.hasOwnProperty("system")) - switch (message.system) { - default: - return "system: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.format != null && message.hasOwnProperty("format")) { - var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); - if (error) - return "format." + error; - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); - if (error) - return "compatibility." + error; - } - if (message.access != null && message.hasOwnProperty("access")) { - var error = $root.google.cloud.dataplex.v1.StorageAccess.verify(message.access); - if (error) - return "access." + error; - } - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); - if (error) - return "schema." + error; - } - return null; - }; - - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity(); - 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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.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.dataplex.v1.Entity.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.id != null) - message.id = String(object.id); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataPath != null) - message.dataPath = String(object.dataPath); - if (object.dataPathPattern != null) - message.dataPathPattern = String(object.dataPathPattern); - if (object.catalogEntry != null) - message.catalogEntry = String(object.catalogEntry); - switch (object.system) { - default: - if (typeof object.system === "number") { - message.system = object.system; - break; - } - break; - case "STORAGE_SYSTEM_UNSPECIFIED": - case 0: - message.system = 0; - break; - case "CLOUD_STORAGE": - case 1: - message.system = 1; - break; - case "BIGQUERY": - case 2: - message.system = 2; - break; - } - if (object.format != null) { - if (typeof object.format !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); - message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); - } - if (object.compatibility != null) { - if (typeof object.compatibility !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); - } - if (object.access != null) { - if (typeof object.access !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.access: object expected"); - message.access = $root.google.cloud.dataplex.v1.StorageAccess.fromObject(object.access); - } - if (object.uid != null) - message.uid = String(object.uid); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); - message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); - } - return message; - }; - - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {google.cloud.dataplex.v1.Entity} message Entity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.id = ""; - object.etag = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.asset = ""; - object.dataPath = ""; - object.dataPathPattern = ""; - object.catalogEntry = ""; - object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; - object.format = null; - object.compatibility = null; - object.access = null; - object.uid = ""; - object.schema = 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.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.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - object.dataPath = message.dataPath; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - object.dataPathPattern = message.dataPathPattern; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - object.catalogEntry = message.catalogEntry; - if (message.system != null && message.hasOwnProperty("system")) - object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] === undefined ? message.system : $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; - if (message.format != null && message.hasOwnProperty("format")) - object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); - if (message.compatibility != null && message.hasOwnProperty("compatibility")) - object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); - if (message.access != null && message.hasOwnProperty("access")) - object.access = $root.google.cloud.dataplex.v1.StorageAccess.toObject(message.access, options); - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); - return object; - }; - - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entity - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Entity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value - */ - Entity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - Entity.CompatibilityStatus = (function() { - - /** - * Properties of a CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @interface ICompatibilityStatus - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery - */ - - /** - * Constructs a new CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @classdesc Represents a CompatibilityStatus. - * @implements ICompatibilityStatus - * @constructor - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - */ - function CompatibilityStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompatibilityStatus hiveMetastore. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.hiveMetastore = null; - - /** - * CompatibilityStatus bigquery. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.bigquery = null; - - /** - * Creates a new CompatibilityStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance - */ - CompatibilityStatus.create = function create(properties) { - return new CompatibilityStatus(properties); - }; - - /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - } - case 2: { - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompatibilityStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompatibilityStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); - if (error) - return "hiveMetastore." + error; - } - if (message.bigquery != null && message.hasOwnProperty("bigquery")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); - if (error) - return "bigquery." + error; - } - return null; - }; - - /** - * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - */ - CompatibilityStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - if (object.hiveMetastore != null) { - if (typeof object.hiveMetastore !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); - } - if (object.bigquery != null) { - if (typeof object.bigquery !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); - } - return message; - }; - - /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompatibilityStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hiveMetastore = null; - object.bigquery = null; - } - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) - object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); - if (message.bigquery != null && message.hasOwnProperty("bigquery")) - object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); - return object; - }; - - /** - * Converts this CompatibilityStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - * @returns {Object.} JSON object - */ - CompatibilityStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompatibilityStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompatibilityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus"; - }; - - CompatibilityStatus.Compatibility = (function() { - - /** - * Properties of a Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @interface ICompatibility - * @property {boolean|null} [compatible] Compatibility compatible - * @property {string|null} [reason] Compatibility reason - */ - - /** - * Constructs a new Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @classdesc Represents a Compatibility. - * @implements ICompatibility - * @constructor - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - */ - function Compatibility(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Compatibility compatible. - * @member {boolean} compatible - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.compatible = false; - - /** - * Compatibility reason. - * @member {string} reason - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.reason = ""; - - /** - * Creates a new Compatibility instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance - */ - Compatibility.create = function create(properties) { - return new Compatibility(properties); - }; - - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); - return writer; - }; - - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.compatible = reader.bool(); - break; - } - case 2: { - message.reason = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Compatibility message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Compatibility.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.compatible != null && message.hasOwnProperty("compatible")) - if (typeof message.compatible !== "boolean") - return "compatible: boolean expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - return null; - }; - - /** - * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - */ - Compatibility.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - if (object.compatible != null) - message.compatible = Boolean(object.compatible); - if (object.reason != null) - message.reason = String(object.reason); - return message; - }; - - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Compatibility.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.compatible = false; - object.reason = ""; - } - if (message.compatible != null && message.hasOwnProperty("compatible")) - object.compatible = message.compatible; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - return object; - }; - - /** - * Converts this Compatibility to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - * @returns {Object.} JSON object - */ - Compatibility.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Compatibility - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Compatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"; - }; - - return Compatibility; - })(); - - return CompatibilityStatus; - })(); - - return Entity; - })(); - - v1.Partition = (function() { - - /** - * Properties of a Partition. - * @memberof google.cloud.dataplex.v1 - * @interface IPartition - * @property {string|null} [name] Partition name - * @property {Array.|null} [values] Partition values - * @property {string|null} [location] Partition location - * @property {string|null} [etag] Partition etag - */ - - /** - * Constructs a new Partition. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Partition. - * @implements IPartition - * @constructor - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set - */ - function Partition(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Partition name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.name = ""; - - /** - * Partition values. - * @member {Array.} values - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.values = $util.emptyArray; - - /** - * Partition location. - * @member {string} location - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.location = ""; - - /** - * Partition etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.etag = ""; - - /** - * Creates a new Partition instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Partition} Partition instance - */ - Partition.create = function create(properties) { - return new Partition(properties); - }; - - /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Partition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.values[i]); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - return writer; - }; - - /** - * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Partition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Partition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Partition} Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Partition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Partition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Partition} Partition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Partition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Partition message. - * @function verify - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Partition.verify = function verify(message) { - if (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.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a Partition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Partition} Partition - */ - Partition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Partition) - return object; - var message = new $root.google.cloud.dataplex.v1.Partition(); - if (object.name != null) - message.name = String(object.name); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.location != null) - message.location = String(object.location); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.Partition} message Partition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Partition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.name = ""; - object.location = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this Partition to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Partition - * @instance - * @returns {Object.} JSON object - */ - Partition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Partition - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Partition"; - }; - - return Partition; - })(); - - v1.Schema = (function() { - - /** - * Properties of a Schema. - * @memberof google.cloud.dataplex.v1 - * @interface ISchema - * @property {boolean|null} [userManaged] Schema userManaged - * @property {Array.|null} [fields] Schema fields - * @property {Array.|null} [partitionFields] Schema partitionFields - * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle - */ - - /** - * Constructs a new Schema. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Schema. - * @implements ISchema - * @constructor - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set - */ - function Schema(properties) { - this.fields = []; - this.partitionFields = []; - if (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 userManaged. - * @member {boolean} userManaged - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.userManaged = false; - - /** - * Schema fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.fields = $util.emptyArray; - - /** - * Schema partitionFields. - * @member {Array.} partitionFields - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.partitionFields = $util.emptyArray; - - /** - * Schema partitionStyle. - * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle - * @memberof google.cloud.dataplex.v1.Schema - * @instance - */ - Schema.prototype.partitionStyle = 0; - - /** - * Creates a new Schema instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema} Schema instance - */ - Schema.create = function create(properties) { - return new Schema(properties); - }; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.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.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.partitionFields != null && message.partitionFields.length) - for (var i = 0; i < message.partitionFields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); - return writer; - }; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.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.dataplex.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.dataplex.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.dataplex.v1.Schema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.userManaged = reader.bool(); - break; - } - case 2: { - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.partitionFields && message.partitionFields.length)) - message.partitionFields = []; - message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); - break; - } - case 4: { - message.partitionStyle = reader.int32(); - 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.dataplex.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.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.dataplex.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.userManaged != null && message.hasOwnProperty("userManaged")) - if (typeof message.userManaged !== "boolean") - return "userManaged: boolean expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { - if (!Array.isArray(message.partitionFields)) - return "partitionFields: array expected"; - for (var i = 0; i < message.partitionFields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); - if (error) - return "partitionFields." + error; - } - } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - switch (message.partitionStyle) { - default: - return "partitionStyle: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema} Schema - */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema(); - if (object.userManaged != null) - message.userManaged = Boolean(object.userManaged); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } - } - if (object.partitionFields) { - if (!Array.isArray(object.partitionFields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); - message.partitionFields = []; - for (var i = 0; i < object.partitionFields.length; ++i) { - if (typeof object.partitionFields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); - message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); - } - } - switch (object.partitionStyle) { - default: - if (typeof object.partitionStyle === "number") { - message.partitionStyle = object.partitionStyle; - break; - } - break; - case "PARTITION_STYLE_UNSPECIFIED": - case 0: - message.partitionStyle = 0; - break; - case "HIVE_COMPATIBLE": - case 1: - message.partitionStyle = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema - * @static - * @param {google.cloud.dataplex.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.fields = []; - object.partitionFields = []; - } - if (options.defaults) { - object.userManaged = false; - object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; - } - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - object.userManaged = message.userManaged; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } - if (message.partitionFields && message.partitionFields.length) { - object.partitionFields = []; - for (var j = 0; j < message.partitionFields.length; ++j) - object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); - } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] === undefined ? message.partitionStyle : $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; - return object; - }; - - /** - * Converts this Schema to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.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.dataplex.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.dataplex.v1.Schema"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Schema.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} BOOLEAN=1 BOOLEAN value - * @property {number} BYTE=2 BYTE value - * @property {number} INT16=3 INT16 value - * @property {number} INT32=4 INT32 value - * @property {number} INT64=5 INT64 value - * @property {number} FLOAT=6 FLOAT value - * @property {number} DOUBLE=7 DOUBLE value - * @property {number} DECIMAL=8 DECIMAL value - * @property {number} STRING=9 STRING value - * @property {number} BINARY=10 BINARY value - * @property {number} TIMESTAMP=11 TIMESTAMP value - * @property {number} DATE=12 DATE value - * @property {number} TIME=13 TIME value - * @property {number} RECORD=14 RECORD value - * @property {number} NULL=100 NULL value - */ - Schema.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOLEAN"] = 1; - values[valuesById[2] = "BYTE"] = 2; - values[valuesById[3] = "INT16"] = 3; - values[valuesById[4] = "INT32"] = 4; - values[valuesById[5] = "INT64"] = 5; - values[valuesById[6] = "FLOAT"] = 6; - values[valuesById[7] = "DOUBLE"] = 7; - values[valuesById[8] = "DECIMAL"] = 8; - values[valuesById[9] = "STRING"] = 9; - values[valuesById[10] = "BINARY"] = 10; - values[valuesById[11] = "TIMESTAMP"] = 11; - values[valuesById[12] = "DATE"] = 12; - values[valuesById[13] = "TIME"] = 13; - values[valuesById[14] = "RECORD"] = 14; - values[valuesById[100] = "NULL"] = 100; - return values; - })(); - - /** - * Mode enum. - * @name google.cloud.dataplex.v1.Schema.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} REQUIRED=1 REQUIRED value - * @property {number} NULLABLE=2 NULLABLE value - * @property {number} REPEATED=3 REPEATED value - */ - Schema.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "REQUIRED"] = 1; - values[valuesById[2] = "NULLABLE"] = 2; - values[valuesById[3] = "REPEATED"] = 3; - return values; - })(); - - Schema.SchemaField = (function() { - - /** - * Properties of a SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface ISchemaField - * @property {string|null} [name] SchemaField name - * @property {string|null} [description] SchemaField description - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type - * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode - * @property {Array.|null} [fields] SchemaField fields - */ - - /** - * Constructs a new SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a SchemaField. - * @implements ISchemaField - * @constructor - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set - */ - function SchemaField(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]]; - } - - /** - * SchemaField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.name = ""; - - /** - * SchemaField description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.description = ""; - - /** - * SchemaField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.type = 0; - - /** - * SchemaField mode. - * @member {google.cloud.dataplex.v1.Schema.Mode} mode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.mode = 0; - - /** - * SchemaField fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.fields = $util.emptyArray; - - /** - * Creates a new SchemaField instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance - */ - SchemaField.create = function create(properties) { - return new SchemaField(properties); - }; - - /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaField.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchemaField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - message.mode = reader.int32(); - break; - } - case 10: { - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaField message. - * @function verify - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaField.verify = function verify(message) { - if (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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: - break; - } - 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.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - */ - SchemaField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "REQUIRED": - case 1: - message.mode = 1; - break; - case "NULLABLE": - case 2: - message.mode = 2; - break; - case "REPEATED": - case 3: - message.mode = 3; - break; - } - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } - return object; - }; - - /** - * Converts this SchemaField to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - * @returns {Object.} JSON object - */ - SchemaField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchemaField - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.SchemaField"; - }; - - return SchemaField; - })(); - - Schema.PartitionField = (function() { - - /** - * Properties of a PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface IPartitionField - * @property {string|null} [name] PartitionField name - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type - */ - - /** - * Constructs a new PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a PartitionField. - * @implements IPartitionField - * @constructor - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set - */ - function PartitionField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PartitionField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - */ - PartitionField.prototype.name = ""; - - /** - * PartitionField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - */ - PartitionField.prototype.type = 0; - - /** - * Creates a new PartitionField instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance - */ - PartitionField.create = function create(properties) { - return new PartitionField(properties); - }; - - /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionField.encode = function encode(message, writer) { - if (!writer) - 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); - return writer; - }; - - /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PartitionField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartitionField message. - * @function verify - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartitionField.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: - break; - } - return null; - }; - - /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - */ - PartitionField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; - break; - } - return message; - }; - - /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartitionField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - 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.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this PartitionField to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - * @returns {Object.} JSON object - */ - PartitionField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PartitionField - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartitionField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.PartitionField"; - }; - - return PartitionField; - })(); - - /** - * PartitionStyle enum. - * @name google.cloud.dataplex.v1.Schema.PartitionStyle - * @enum {number} - * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value - * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value - */ - Schema.PartitionStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; - return values; - })(); - - return Schema; - })(); - - v1.StorageFormat = (function() { - - /** - * Properties of a StorageFormat. - * @memberof google.cloud.dataplex.v1 - * @interface IStorageFormat - * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format - * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat - * @property {string|null} [mimeType] StorageFormat mimeType - * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv - * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json - * @property {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null} [iceberg] StorageFormat iceberg - */ - - /** - * Constructs a new StorageFormat. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a StorageFormat. - * @implements IStorageFormat - * @constructor - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set - */ - function StorageFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageFormat format. - * @member {google.cloud.dataplex.v1.StorageFormat.Format} format - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.format = 0; - - /** - * StorageFormat compressionFormat. - * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.compressionFormat = 0; - - /** - * StorageFormat mimeType. - * @member {string} mimeType - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.mimeType = ""; - - /** - * StorageFormat csv. - * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.csv = null; - - /** - * StorageFormat json. - * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.json = null; - - /** - * StorageFormat iceberg. - * @member {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null|undefined} iceberg - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.iceberg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * StorageFormat options. - * @member {"csv"|"json"|"iceberg"|undefined} options - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - Object.defineProperty(StorageFormat.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["csv", "json", "iceberg"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new StorageFormat instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance - */ - StorageFormat.create = function create(properties) { - return new StorageFormat(properties); - }; - - /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); - if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) - $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.json != null && Object.hasOwnProperty.call(message, "json")) - $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.iceberg != null && Object.hasOwnProperty.call(message, "iceberg")) - $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.encode(message.iceberg, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageFormat message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - case 2: { - message.compressionFormat = reader.int32(); - break; - } - case 3: { - message.mimeType = reader.string(); - break; - } - case 10: { - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); - break; - } - case 11: { - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); - break; - } - case 12: { - message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageFormat message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 100: - case 101: - case 200: - case 201: - case 202: - case 203: - case 204: - case 1000: - case 1001: - break; - } - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - switch (message.compressionFormat) { - default: - return "compressionFormat: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.csv != null && message.hasOwnProperty("csv")) { - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); - if (error) - return "csv." + error; - } - } - if (message.json != null && message.hasOwnProperty("json")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); - if (error) - return "json." + error; - } - } - if (message.iceberg != null && message.hasOwnProperty("iceberg")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify(message.iceberg); - if (error) - return "iceberg." + error; - } - } - return null; - }; - - /** - * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat - */ - StorageFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "PARQUET": - case 1: - message.format = 1; - break; - case "AVRO": - case 2: - message.format = 2; - break; - case "ORC": - case 3: - message.format = 3; - break; - case "CSV": - case 100: - message.format = 100; - break; - case "JSON": - case 101: - message.format = 101; - break; - case "IMAGE": - case 200: - message.format = 200; - break; - case "AUDIO": - case 201: - message.format = 201; - break; - case "VIDEO": - case 202: - message.format = 202; - break; - case "TEXT": - case 203: - message.format = 203; - break; - case "TFRECORD": - case 204: - message.format = 204; - break; - case "OTHER": - case 1000: - message.format = 1000; - break; - case "UNKNOWN": - case 1001: - message.format = 1001; - break; - } - switch (object.compressionFormat) { - default: - if (typeof object.compressionFormat === "number") { - message.compressionFormat = object.compressionFormat; - break; - } - break; - case "COMPRESSION_FORMAT_UNSPECIFIED": - case 0: - message.compressionFormat = 0; - break; - case "GZIP": - case 2: - message.compressionFormat = 2; - break; - case "BZIP2": - case 3: - message.compressionFormat = 3; - break; - } - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.csv != null) { - if (typeof object.csv !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); - } - if (object.json != null) { - if (typeof object.json !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); - } - if (object.iceberg != null) { - if (typeof object.iceberg !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.iceberg: object expected"); - message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.fromObject(object.iceberg); - } - return message; - }; - - /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; - object.mimeType = ""; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] === undefined ? message.format : $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] === undefined ? message.compressionFormat : $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.csv != null && message.hasOwnProperty("csv")) { - object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); - if (options.oneofs) - object.options = "csv"; - } - if (message.json != null && message.hasOwnProperty("json")) { - object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); - if (options.oneofs) - object.options = "json"; - } - if (message.iceberg != null && message.hasOwnProperty("iceberg")) { - object.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.toObject(message.iceberg, options); - if (options.oneofs) - object.options = "iceberg"; - } - return object; - }; - - /** - * Converts this StorageFormat to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - * @returns {Object.} JSON object - */ - StorageFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageFormat - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat"; - }; - - StorageFormat.CsvOptions = (function() { - - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface ICsvOptions - * @property {string|null} [encoding] CsvOptions encoding - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [quote] CsvOptions quote - */ - - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; - - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; - - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; - - /** - * CsvOptions quote. - * @member {string} quote - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.quote = ""; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); - if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); - return writer; - }; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - case 2: { - message.headerRows = reader.int32(); - break; - } - case 3: { - message.delimiter = reader.string(); - break; - } - case 4: { - message.quote = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.quote != null && message.hasOwnProperty("quote")) - if (!$util.isString(message.quote)) - return "quote: string expected"; - return null; - }; - - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.quote != null) - message.quote = String(object.quote); - return message; - }; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.headerRows = 0; - object.delimiter = ""; - object.quote = ""; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.quote != null && message.hasOwnProperty("quote")) - object.quote = message.quote; - return object; - }; - - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CsvOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.CsvOptions"; - }; - - return CsvOptions; - })(); - - StorageFormat.JsonOptions = (function() { - - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - */ - - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; - - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - return writer; - }; - - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - return null; - }; - - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - return message; - }; - - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = ""; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - return object; - }; - - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JsonOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.JsonOptions"; - }; - - return JsonOptions; - })(); - - StorageFormat.IcebergOptions = (function() { - - /** - * Properties of an IcebergOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface IIcebergOptions - * @property {string|null} [metadataLocation] IcebergOptions metadataLocation - */ - - /** - * Constructs a new IcebergOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents an IcebergOptions. - * @implements IIcebergOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set - */ - function IcebergOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IcebergOptions metadataLocation. - * @member {string} metadataLocation - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @instance - */ - IcebergOptions.prototype.metadataLocation = ""; - - /** - * Creates a new IcebergOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions instance - */ - IcebergOptions.create = function create(properties) { - return new IcebergOptions(properties); - }; - - /** - * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IcebergOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataLocation); - return writer; - }; - - /** - * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IcebergOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IcebergOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IcebergOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadataLocation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IcebergOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IcebergOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IcebergOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) - if (!$util.isString(message.metadataLocation)) - return "metadataLocation: string expected"; - return null; - }; - - /** - * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - */ - IcebergOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); - if (object.metadataLocation != null) - message.metadataLocation = String(object.metadataLocation); - return message; - }; - - /** - * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} message IcebergOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IcebergOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadataLocation = ""; - if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) - object.metadataLocation = message.metadataLocation; - return object; - }; - - /** - * Converts this IcebergOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @instance - * @returns {Object.} JSON object - */ - IcebergOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IcebergOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IcebergOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"; - }; - - return IcebergOptions; - })(); - - /** - * Format enum. - * @name google.cloud.dataplex.v1.StorageFormat.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} PARQUET=1 PARQUET value - * @property {number} AVRO=2 AVRO value - * @property {number} ORC=3 ORC value - * @property {number} CSV=100 CSV value - * @property {number} JSON=101 JSON value - * @property {number} IMAGE=200 IMAGE value - * @property {number} AUDIO=201 AUDIO value - * @property {number} VIDEO=202 VIDEO value - * @property {number} TEXT=203 TEXT value - * @property {number} TFRECORD=204 TFRECORD value - * @property {number} OTHER=1000 OTHER value - * @property {number} UNKNOWN=1001 UNKNOWN value - */ - StorageFormat.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PARQUET"] = 1; - values[valuesById[2] = "AVRO"] = 2; - values[valuesById[3] = "ORC"] = 3; - values[valuesById[100] = "CSV"] = 100; - values[valuesById[101] = "JSON"] = 101; - values[valuesById[200] = "IMAGE"] = 200; - values[valuesById[201] = "AUDIO"] = 201; - values[valuesById[202] = "VIDEO"] = 202; - values[valuesById[203] = "TEXT"] = 203; - values[valuesById[204] = "TFRECORD"] = 204; - values[valuesById[1000] = "OTHER"] = 1000; - values[valuesById[1001] = "UNKNOWN"] = 1001; - return values; - })(); - - /** - * CompressionFormat enum. - * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat - * @enum {number} - * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value - * @property {number} GZIP=2 GZIP value - * @property {number} BZIP2=3 BZIP2 value - */ - StorageFormat.CompressionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[2] = "GZIP"] = 2; - values[valuesById[3] = "BZIP2"] = 3; - return values; - })(); - - return StorageFormat; - })(); - - v1.StorageAccess = (function() { - - /** - * Properties of a StorageAccess. - * @memberof google.cloud.dataplex.v1 - * @interface IStorageAccess - * @property {google.cloud.dataplex.v1.StorageAccess.AccessMode|null} [read] StorageAccess read - */ - - /** - * Constructs a new StorageAccess. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a StorageAccess. - * @implements IStorageAccess - * @constructor - * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set - */ - function StorageAccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageAccess read. - * @member {google.cloud.dataplex.v1.StorageAccess.AccessMode} read - * @memberof google.cloud.dataplex.v1.StorageAccess - * @instance - */ - StorageAccess.prototype.read = 0; - - /** - * Creates a new StorageAccess instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess instance - */ - StorageAccess.create = function create(properties) { - return new StorageAccess(properties); - }; - - /** - * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageAccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.read != null && Object.hasOwnProperty.call(message, "read")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.read); - return writer; - }; - - /** - * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageAccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageAccess message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageAccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageAccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 21: { - message.read = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageAccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageAccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageAccess message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageAccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.read != null && message.hasOwnProperty("read")) - switch (message.read) { - default: - return "read: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess - */ - StorageAccess.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageAccess) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageAccess(); - switch (object.read) { - default: - if (typeof object.read === "number") { - message.read = object.read; - break; - } - break; - case "ACCESS_MODE_UNSPECIFIED": - case 0: - message.read = 0; - break; - case "DIRECT": - case 1: - message.read = 1; - break; - case "MANAGED": - case 2: - message.read = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {google.cloud.dataplex.v1.StorageAccess} message StorageAccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageAccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.read = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; - if (message.read != null && message.hasOwnProperty("read")) - object.read = options.enums === String ? $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] === undefined ? message.read : $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] : message.read; - return object; - }; - - /** - * Converts this StorageAccess to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageAccess - * @instance - * @returns {Object.} JSON object - */ - StorageAccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageAccess - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageAccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageAccess"; - }; - - /** - * AccessMode enum. - * @name google.cloud.dataplex.v1.StorageAccess.AccessMode - * @enum {number} - * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value - * @property {number} DIRECT=1 DIRECT value - * @property {number} MANAGED=2 MANAGED value - */ - StorageAccess.AccessMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIRECT"] = 1; - values[valuesById[2] = "MANAGED"] = 2; - return values; - })(); - - return StorageAccess; - })(); - - /** - * StorageSystem enum. - * @name google.cloud.dataplex.v1.StorageSystem - * @enum {number} - * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value - * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - v1.StorageSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_STORAGE"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); - - return v1; - })(); - - return dataplex; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - 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; - })(); - - 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.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - 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 - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - 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; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - object[".google.api.fieldInfo"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Struct - * @function getTypeUrl - * @memberof google.protobuf.Struct - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Struct"; - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.protobuf.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Value"; - }; - - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListValue - * @function getTypeUrl - * @memberof google.protobuf.ListValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ListValue"; - }; - - return ListValue; - })(); - - return protobuf; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.done != null && message.hasOwnProperty("done")) - if (typeof message.done !== "boolean") - return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.response != null && message.hasOwnProperty("response")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Any.verify(message.response); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - var message = new $root.google.longrunning.Operation(); - if (object.name != null) - message.name = String(object.name); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.longrunning.Operation.metadata: object expected"); - message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); - } - if (object.done != null) - message.done = Boolean(object.done); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.longrunning.Operation.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".google.longrunning.Operation.response: object expected"); - message.response = $root.google.protobuf.Any.fromObject(object.response); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Operation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.metadata = null; - object.done = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) - object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); - if (options.oneofs) - object.result = "response"; - } - return object; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.name = reader.string(); - break; - } - case 1: { - message.filter = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - var message = new $root.google.longrunning.ListOperationsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - var message = new $root.google.longrunning.ListOperationsResponse(); - if (object.operations) { - if (!Array.isArray(object.operations)) - throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); - message.operations = []; - for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - var message = new $root.google.longrunning.WaitOperationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitOperationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.timeout = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - return object; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - if (!$util.isString(message.responseType)) - return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - if (!$util.isString(message.metadataType)) - return "metadataType: string expected"; - return null; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - var message = new $root.google.longrunning.OperationInfo(); - if (object.responseType != null) - message.responseType = String(object.responseType); - if (object.metadataType != null) - message.metadataType = String(object.metadataType); - return message; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.responseType = ""; - object.metadataType = ""; - } - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) - object.metadataType = message.metadataType; - return object; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - google.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-dataplex/v1/protos/protos.json b/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json deleted file mode 100644 index 23c4f05537a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/protos/protos.json +++ /dev/null @@ -1,13622 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "dataplex": { - "nested": { - "v1": { - "options": { - "go_package": "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb", - "java_multiple_files": true, - "java_outer_classname": "MetadataProto", - "java_package": "com.google.cloud.dataplex.v1", - "csharp_namespace": "Google.Cloud.Dataplex.V1", - "php_namespace": "Google\\Cloud\\Dataplex\\V1", - "ruby_package": "Google::Cloud::Dataplex::V1", - "(google.api.resource_definition).type": "bigquery.googleapis.com/Table", - "(google.api.resource_definition).pattern": "projects/{project}/datasets/{dataset}/tables/{table}" - }, - "nested": { - "Environment": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Environment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "infrastructureSpec": { - "type": "InfrastructureSpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sessionSpec": { - "type": "SessionSpec", - "id": 101, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sessionStatus": { - "type": "SessionStatus", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endpoints": { - "type": "Endpoints", - "id": 200, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "InfrastructureSpec": { - "oneofs": { - "resources": { - "oneof": [ - "compute" - ] - }, - "runtime": { - "oneof": [ - "osImage" - ] - } - }, - "fields": { - "compute": { - "type": "ComputeResources", - "id": 50, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "osImage": { - "type": "OsImageRuntime", - "id": 100, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "ComputeResources": { - "fields": { - "diskSizeGb": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "nodeCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxNodeCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "OsImageRuntime": { - "fields": { - "imageVersion": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "javaLibraries": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pythonPackages": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "properties": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SessionSpec": { - "fields": { - "maxIdleDuration": { - "type": "google.protobuf.Duration", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enableFastStartup": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SessionStatus": { - "fields": { - "active": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Endpoints": { - "fields": { - "notebooks": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sql": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - }, - "Content": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Content", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/content/{content}" - }, - "oneofs": { - "data": { - "oneof": [ - "dataText" - ] - }, - "content": { - "oneof": [ - "sqlScript", - "notebook" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "path": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataText": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sqlScript": { - "type": "SqlScript", - "id": 100 - }, - "notebook": { - "type": "Notebook", - "id": 101 - } - }, - "nested": { - "SqlScript": { - "fields": { - "engine": { - "type": "QueryEngine", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "QueryEngine": { - "values": { - "QUERY_ENGINE_UNSPECIFIED": 0, - "SPARK": 2 - } - } - } - }, - "Notebook": { - "fields": { - "kernelType": { - "type": "KernelType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "KernelType": { - "values": { - "KERNEL_TYPE_UNSPECIFIED": 0, - "PYTHON3": 1 - } - } - } - } - } - }, - "Session": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Session", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Session" - } - }, - "userId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Lake": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Lake", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metastore": { - "type": "Metastore", - "id": 102, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "assetStatus": { - "type": "AssetStatus", - "id": 103, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metastoreStatus": { - "type": "MetastoreStatus", - "id": 104, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Metastore": { - "fields": { - "service": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MetastoreStatus": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endpoint": { - "type": "string", - "id": 4 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "NONE": 1, - "READY": 2, - "UPDATING": 3, - "ERROR": 4 - } - } - } - } - } - }, - "AssetStatus": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "activeAssets": { - "type": "int32", - "id": 2 - }, - "securityPolicyApplyingAssets": { - "type": "int32", - "id": 3 - } - } - }, - "Zone": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Zone", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "Type", - "id": 9, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "discoverySpec": { - "type": "DiscoverySpec", - "id": 103, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceSpec": { - "type": "ResourceSpec", - "id": 104, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "assetStatus": { - "type": "AssetStatus", - "id": 105, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "RAW": 1, - "CURATED": 2 - } - }, - "ResourceSpec": { - "fields": { - "locationType": { - "type": "LocationType", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - }, - "nested": { - "LocationType": { - "values": { - "LOCATION_TYPE_UNSPECIFIED": 0, - "SINGLE_REGION": 1, - "MULTI_REGION": 2 - } - } - } - }, - "DiscoverySpec": { - "oneofs": { - "trigger": { - "oneof": [ - "schedule" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "includePatterns": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludePatterns": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "csvOptions": { - "type": "CsvOptions", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jsonOptions": { - "type": "JsonOptions", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "schedule": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CsvOptions": { - "fields": { - "headerRows": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encoding": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - }, - "Action": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Action", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" - }, - "oneofs": { - "details": { - "oneof": [ - "invalidDataFormat", - "incompatibleDataSchema", - "invalidDataPartition", - "missingData", - "missingResource", - "unauthorizedResource", - "failedSecurityPolicyApply", - "invalidDataOrganization" - ] - } - }, - "fields": { - "category": { - "type": "Category", - "id": 1 - }, - "issue": { - "type": "string", - "id": 2 - }, - "detectTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "name": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Action" - } - }, - "lake": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "zone": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "asset": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - }, - "dataLocations": { - "rule": "repeated", - "type": "string", - "id": 9 - }, - "invalidDataFormat": { - "type": "InvalidDataFormat", - "id": 10 - }, - "incompatibleDataSchema": { - "type": "IncompatibleDataSchema", - "id": 11 - }, - "invalidDataPartition": { - "type": "InvalidDataPartition", - "id": 12 - }, - "missingData": { - "type": "MissingData", - "id": 13 - }, - "missingResource": { - "type": "MissingResource", - "id": 14 - }, - "unauthorizedResource": { - "type": "UnauthorizedResource", - "id": 15 - }, - "failedSecurityPolicyApply": { - "type": "FailedSecurityPolicyApply", - "id": 21 - }, - "invalidDataOrganization": { - "type": "InvalidDataOrganization", - "id": 22 - } - }, - "nested": { - "Category": { - "values": { - "CATEGORY_UNSPECIFIED": 0, - "RESOURCE_MANAGEMENT": 1, - "SECURITY_POLICY": 2, - "DATA_DISCOVERY": 3 - } - }, - "MissingResource": { - "fields": {} - }, - "UnauthorizedResource": { - "fields": {} - }, - "FailedSecurityPolicyApply": { - "fields": { - "asset": { - "type": "string", - "id": 1 - } - } - }, - "InvalidDataFormat": { - "fields": { - "sampledDataLocations": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "expectedFormat": { - "type": "string", - "id": 2 - }, - "newFormat": { - "type": "string", - "id": 3 - } - } - }, - "IncompatibleDataSchema": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "existingSchema": { - "type": "string", - "id": 2 - }, - "newSchema": { - "type": "string", - "id": 3 - }, - "sampledDataLocations": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "schemaChange": { - "type": "SchemaChange", - "id": 5 - } - }, - "nested": { - "SchemaChange": { - "values": { - "SCHEMA_CHANGE_UNSPECIFIED": 0, - "INCOMPATIBLE": 1, - "MODIFIED": 2 - } - } - } - }, - "InvalidDataPartition": { - "fields": { - "expectedStructure": { - "type": "PartitionStructure", - "id": 1 - } - }, - "nested": { - "PartitionStructure": { - "values": { - "PARTITION_STRUCTURE_UNSPECIFIED": 0, - "CONSISTENT_KEYS": 1, - "HIVE_STYLE_KEYS": 2 - } - } - } - }, - "MissingData": { - "fields": {} - }, - "InvalidDataOrganization": { - "fields": {} - } - } - }, - "Asset": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Asset", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "uid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceSpec": { - "type": "ResourceSpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resourceStatus": { - "type": "ResourceStatus", - "id": 101, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "securityStatus": { - "type": "SecurityStatus", - "id": 103, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "discoverySpec": { - "type": "DiscoverySpec", - "id": 106, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "discoveryStatus": { - "type": "DiscoveryStatus", - "id": 107, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "SecurityStatus": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "APPLYING": 2, - "ERROR": 3 - } - } - } - }, - "DiscoverySpec": { - "oneofs": { - "trigger": { - "oneof": [ - "schedule" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includePatterns": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludePatterns": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "csvOptions": { - "type": "CsvOptions", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jsonOptions": { - "type": "JsonOptions", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "schedule": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CsvOptions": { - "fields": { - "headerRows": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encoding": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disableTypeInference": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "ResourceSpec": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "type": { - "type": "Type", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "readAccessMode": { - "type": "AccessMode", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "STORAGE_BUCKET": 1, - "BIGQUERY_DATASET": 2 - } - }, - "AccessMode": { - "values": { - "ACCESS_MODE_UNSPECIFIED": 0, - "DIRECT": 1, - "MANAGED": 2 - } - } - } - }, - "ResourceStatus": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "managedAccessIdentity": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "ERROR": 2 - } - } - } - }, - "DiscoveryStatus": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "lastRunTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "stats": { - "type": "Stats", - "id": 6 - }, - "lastRunDuration": { - "type": "google.protobuf.Duration", - "id": 7 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "IN_PROGRESS": 2, - "PAUSED": 3, - "DISABLED": 5 - } - }, - "Stats": { - "fields": { - "dataItems": { - "type": "int64", - "id": 1 - }, - "dataSize": { - "type": "int64", - "id": 2 - }, - "tables": { - "type": "int64", - "id": 3 - }, - "filesets": { - "type": "int64", - "id": 4 - } - } - } - } - } - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "CREATING": 2, - "DELETING": 3, - "ACTION_REQUIRED": 4 - } - }, - "CatalogService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateEntryType": { - "requestType": "CreateEntryTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryTypes", - "(google.api.http).body": "entry_type", - "(google.api.method_signature)": "parent,entry_type,entry_type_id", - "(google.longrunning.operation_info).response_type": "EntryType", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/entryTypes", - "body": "entry_type" - } - }, - { - "(google.api.method_signature)": "parent,entry_type,entry_type_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "EntryType", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateEntryType": { - "requestType": "UpdateEntryTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}", - "(google.api.http).body": "entry_type", - "(google.api.method_signature)": "entry_type,update_mask", - "(google.longrunning.operation_info).response_type": "EntryType", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}", - "body": "entry_type" - } - }, - { - "(google.api.method_signature)": "entry_type,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "EntryType", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteEntryType": { - "requestType": "DeleteEntryTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryTypes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/entryTypes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListEntryTypes": { - "requestType": "ListEntryTypesRequest", - "responseType": "ListEntryTypesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/entryTypes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/entryTypes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEntryType": { - "requestType": "GetEntryTypeRequest", - "responseType": "EntryType", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryTypes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/entryTypes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateAspectType": { - "requestType": "CreateAspectTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/aspectTypes", - "(google.api.http).body": "aspect_type", - "(google.api.method_signature)": "parent,aspect_type,aspect_type_id", - "(google.longrunning.operation_info).response_type": "AspectType", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/aspectTypes", - "body": "aspect_type" - } - }, - { - "(google.api.method_signature)": "parent,aspect_type,aspect_type_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "AspectType", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateAspectType": { - "requestType": "UpdateAspectTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}", - "(google.api.http).body": "aspect_type", - "(google.api.method_signature)": "aspect_type,update_mask", - "(google.longrunning.operation_info).response_type": "AspectType", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}", - "body": "aspect_type" - } - }, - { - "(google.api.method_signature)": "aspect_type,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "AspectType", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteAspectType": { - "requestType": "DeleteAspectTypeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/aspectTypes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/aspectTypes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListAspectTypes": { - "requestType": "ListAspectTypesRequest", - "responseType": "ListAspectTypesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/aspectTypes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/aspectTypes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetAspectType": { - "requestType": "GetAspectTypeRequest", - "responseType": "AspectType", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/aspectTypes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/aspectTypes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateEntryGroup": { - "requestType": "CreateEntryGroupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryGroups", - "(google.api.http).body": "entry_group", - "(google.api.method_signature)": "parent,entry_group,entry_group_id", - "(google.longrunning.operation_info).response_type": "EntryGroup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/entryGroups", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "parent,entry_group,entry_group_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "EntryGroup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateEntryGroup": { - "requestType": "UpdateEntryGroupRequest", - "responseType": "google.longrunning.Operation", - "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", - "(google.longrunning.operation_info).response_type": "EntryGroup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "entry_group,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "EntryGroup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteEntryGroup": { - "requestType": "DeleteEntryGroupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "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" - } - ] - }, - "GetEntryGroup": { - "requestType": "GetEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "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,entry_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "body": "entry" - } - }, - { - "(google.api.method_signature)": "parent,entry,entry_id" - } - ] - }, - "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,update_mask" - } - ] - }, - "DeleteEntry": { - "requestType": "DeleteEntryRequest", - "responseType": "Entry", - "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" - } - ] - }, - "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" - } - ] - }, - "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/{name=projects/*/locations/*}:lookupEntry" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*}:lookupEntry" - } - } - ] - }, - "SearchEntries": { - "requestType": "SearchEntriesRequest", - "responseType": "SearchEntriesResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*}:searchEntries", - "(google.api.method_signature)": "name,query" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*}:searchEntries" - } - }, - { - "(google.api.method_signature)": "name,query" - } - ] - }, - "CreateMetadataJob": { - "requestType": "CreateMetadataJobRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/metadataJobs", - "(google.api.http).body": "metadata_job", - "(google.api.method_signature)": "parent,metadata_job,metadata_job_id", - "(google.longrunning.operation_info).response_type": "MetadataJob", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/metadataJobs", - "body": "metadata_job" - } - }, - { - "(google.api.method_signature)": "parent,metadata_job,metadata_job_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "MetadataJob", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetMetadataJob": { - "requestType": "GetMetadataJobRequest", - "responseType": "MetadataJob", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/metadataJobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/metadataJobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMetadataJobs": { - "requestType": "ListMetadataJobsRequest", - "responseType": "ListMetadataJobsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/metadataJobs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/metadataJobs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CancelMetadataJob": { - "requestType": "CancelMetadataJobRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "AspectType": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/AspectType", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/aspectTypes/{aspect_type}", - "(google.api.resource).plural": "aspectTypes", - "(google.api.resource).singular": "aspectType" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 8 - }, - "authorization": { - "type": "Authorization", - "id": 52, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "metadataTemplate": { - "type": "MetadataTemplate", - "id": 53, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "transferStatus": { - "type": "TransferStatus", - "id": 202, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Authorization": { - "fields": { - "alternateUsePermission": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - }, - "MetadataTemplate": { - "fields": { - "index": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recordFields": { - "rule": "repeated", - "type": "MetadataTemplate", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enumValues": { - "rule": "repeated", - "type": "EnumValue", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mapItems": { - "type": "MetadataTemplate", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "arrayItems": { - "type": "MetadataTemplate", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "typeId": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "typeRef": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "constraints": { - "type": "Constraints", - "id": 50, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "annotations": { - "type": "Annotations", - "id": 51, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EnumValue": { - "fields": { - "index": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deprecated": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Constraints": { - "fields": { - "required": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Annotations": { - "fields": { - "deprecated": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayOrder": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stringType": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stringValues": { - "rule": "repeated", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - }, - "EntryGroup": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/EntryGroup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}", - "(google.api.resource).plural": "entryGroups", - "(google.api.resource).singular": "entryGroup" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 8 - }, - "transferStatus": { - "type": "TransferStatus", - "id": 202, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "EntryType": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/EntryType", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryTypes/{entry_type}", - "(google.api.resource).plural": "entryTypes", - "(google.api.resource).singular": "entryType" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "typeAliases": { - "rule": "repeated", - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "platform": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "system": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "requiredAspects": { - "rule": "repeated", - "type": "AspectInfo", - "id": 50 - }, - "authorization": { - "type": "Authorization", - "id": 51, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - }, - "nested": { - "AspectInfo": { - "fields": { - "type": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" - } - } - } - }, - "Authorization": { - "fields": { - "alternateUsePermission": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - } - } - }, - "Aspect": { - "fields": { - "aspectType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "path": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "data": { - "type": "google.protobuf.Struct", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aspectSource": { - "type": "AspectSource", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AspectSource": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11 - }, - "dataVersion": { - "type": "string", - "id": 12 - } - } - }, - "Entry": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Entry", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}", - "(google.api.resource).plural": "entries", - "(google.api.resource).singular": "entry" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "entryType": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "aspects": { - "keyType": "string", - "type": "Aspect", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "parentEntry": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "fullyQualifiedName": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "entrySource": { - "type": "EntrySource", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "EntrySource": { - "fields": { - "resource": { - "type": "string", - "id": 1 - }, - "system": { - "type": "string", - "id": 2 - }, - "platform": { - "type": "string", - "id": 3 - }, - "displayName": { - "type": "string", - "id": 5 - }, - "description": { - "type": "string", - "id": 6 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7 - }, - "ancestors": { - "rule": "repeated", - "type": "Ancestor", - "id": 9, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11 - }, - "location": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Ancestor": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "CreateEntryGroupRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "entryGroupId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entryGroup": { - "type": "EntryGroup", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateEntryGroupRequest": { - "fields": { - "entryGroup": { - "type": "EntryGroup", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" - } - }, - "etag": { - "type": "string", - "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).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryGroupsResponse": { - "fields": { - "entryGroups": { - "rule": "repeated", - "type": "EntryGroup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" - } - } - } - }, - "CreateEntryTypeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "entryTypeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entryType": { - "type": "EntryType", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateEntryTypeRequest": { - "fields": { - "entryType": { - "type": "EntryType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEntryTypeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryTypesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryTypesResponse": { - "fields": { - "entryTypes": { - "rule": "repeated", - "type": "EntryType", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetEntryTypeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" - } - } - } - }, - "CreateAspectTypeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "aspectTypeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aspectType": { - "type": "AspectType", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateAspectTypeRequest": { - "fields": { - "aspectType": { - "type": "AspectType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteAspectTypeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListAspectTypesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListAspectTypesResponse": { - "fields": { - "aspectTypes": { - "rule": "repeated", - "type": "AspectType", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetAspectTypeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" - } - } - } - }, - "CreateEntryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" - } - }, - "entryId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entry": { - "type": "Entry", - "id": 3, - "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, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "deleteMissingAspects": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aspectKeys": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" - } - } - } - }, - "ListEntriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.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" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "Entry", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" - } - }, - "view": { - "type": "EntryView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aspectTypes": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "paths": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "LookupEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "view": { - "type": "EntryView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aspectTypes": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "paths": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "entry": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entry" - } - } - } - }, - "SearchEntriesRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "query": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "scope": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SearchEntriesResult": { - "fields": { - "linkedResource": { - "type": "string", - "id": 8, - "options": { - "deprecated": true - } - }, - "dataplexEntry": { - "type": "Entry", - "id": 9 - }, - "snippets": { - "type": "Snippets", - "id": 12, - "options": { - "deprecated": true - } - } - }, - "nested": { - "Snippets": { - "options": { - "deprecated": true - }, - "fields": { - "dataplexEntry": { - "type": "Entry", - "id": 1, - "options": { - "deprecated": true - } - } - } - } - } - }, - "SearchEntriesResponse": { - "fields": { - "results": { - "rule": "repeated", - "type": "SearchEntriesResult", - "id": 1 - }, - "totalSize": { - "type": "int32", - "id": 2 - }, - "nextPageToken": { - "type": "string", - "id": 3 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "ImportItem": { - "fields": { - "entry": { - "type": "Entry", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - }, - "aspectKeys": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateMetadataJobRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "metadataJob": { - "type": "MetadataJob", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "metadataJobId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetMetadataJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" - } - } - } - }, - "ListMetadataJobsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListMetadataJobsResponse": { - "fields": { - "metadataJobs": { - "rule": "repeated", - "type": "MetadataJob", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CancelMetadataJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" - } - } - } - }, - "MetadataJob": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/MetadataJob", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" - }, - "oneofs": { - "spec": { - "oneof": [ - "importSpec" - ] - }, - "result": { - "oneof": [ - "importResult" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "Type", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "importSpec": { - "type": "ImportJobSpec", - "id": 100 - }, - "importResult": { - "type": "ImportJobResult", - "id": 200, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "status": { - "type": "Status", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "ImportJobResult": { - "fields": { - "deletedEntries": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updatedEntries": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createdEntries": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "unchangedEntries": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "recreatedEntries": { - "type": "int64", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ImportJobSpec": { - "fields": { - "sourceStorageUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sourceCreateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "scope": { - "type": "ImportJobScope", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entrySyncMode": { - "type": "SyncMode", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "aspectSyncMode": { - "type": "SyncMode", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "logLevel": { - "type": "LogLevel", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "SyncMode": { - "values": { - "SYNC_MODE_UNSPECIFIED": 0, - "FULL": 1, - "INCREMENTAL": 2 - } - }, - "LogLevel": { - "values": { - "LOG_LEVEL_UNSPECIFIED": 0, - "DEBUG": 1, - "INFO": 2 - } - }, - "ImportJobScope": { - "fields": { - "entryGroups": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" - } - }, - "entryTypes": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" - } - }, - "aspectTypes": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" - } - } - } - } - } - }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "IMPORT": 1 - } - }, - "Status": { - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "completionPercent": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "QUEUED": 1, - "RUNNING": 2, - "CANCELING": 3, - "CANCELED": 4, - "SUCCEEDED": 5, - "FAILED": 6, - "SUCCEEDED_WITH_ERRORS": 7 - } - } - } - } - } - }, - "EntryView": { - "values": { - "ENTRY_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 2, - "CUSTOM": 3, - "ALL": 4 - } - }, - "TransferStatus": { - "values": { - "TRANSFER_STATUS_UNSPECIFIED": 0, - "TRANSFER_STATUS_MIGRATED": 1, - "TRANSFER_STATUS_TRANSFERRED": 2 - } - }, - "DataplexService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateLake": { - "requestType": "CreateLakeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", - "(google.api.http).body": "lake", - "(google.api.method_signature)": "parent,lake,lake_id", - "(google.longrunning.operation_info).response_type": "Lake", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/lakes", - "body": "lake" - } - }, - { - "(google.api.method_signature)": "parent,lake,lake_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Lake", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateLake": { - "requestType": "UpdateLakeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", - "(google.api.http).body": "lake", - "(google.api.method_signature)": "lake,update_mask", - "(google.longrunning.operation_info).response_type": "Lake", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", - "body": "lake" - } - }, - { - "(google.api.method_signature)": "lake,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Lake", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteLake": { - "requestType": "DeleteLakeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListLakes": { - "requestType": "ListLakesRequest", - "responseType": "ListLakesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/lakes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetLake": { - "requestType": "GetLakeRequest", - "responseType": "Lake", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListLakeActions": { - "requestType": "ListLakeActionsRequest", - "responseType": "ListActionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateZone": { - "requestType": "CreateZoneRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "(google.api.http).body": "zone", - "(google.api.method_signature)": "parent,zone,zone_id", - "(google.longrunning.operation_info).response_type": "Zone", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "body": "zone" - } - }, - { - "(google.api.method_signature)": "parent,zone,zone_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Zone", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateZone": { - "requestType": "UpdateZoneRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.http).body": "zone", - "(google.api.method_signature)": "zone,update_mask", - "(google.longrunning.operation_info).response_type": "Zone", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", - "body": "zone" - } - }, - { - "(google.api.method_signature)": "zone,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Zone", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteZone": { - "requestType": "DeleteZoneRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListZones": { - "requestType": "ListZonesRequest", - "responseType": "ListZonesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetZone": { - "requestType": "GetZoneRequest", - "responseType": "Zone", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListZoneActions": { - "requestType": "ListZoneActionsRequest", - "responseType": "ListActionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateAsset": { - "requestType": "CreateAssetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "(google.api.http).body": "asset", - "(google.api.method_signature)": "parent,asset,asset_id", - "(google.longrunning.operation_info).response_type": "Asset", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "body": "asset" - } - }, - { - "(google.api.method_signature)": "parent,asset,asset_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Asset", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateAsset": { - "requestType": "UpdateAssetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.http).body": "asset", - "(google.api.method_signature)": "asset,update_mask", - "(google.longrunning.operation_info).response_type": "Asset", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "body": "asset" - } - }, - { - "(google.api.method_signature)": "asset,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Asset", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteAsset": { - "requestType": "DeleteAssetRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListAssets": { - "requestType": "ListAssetsRequest", - "responseType": "ListAssetsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetAsset": { - "requestType": "GetAssetRequest", - "responseType": "Asset", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListAssetActions": { - "requestType": "ListAssetActionsRequest", - "responseType": "ListActionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateTask": { - "requestType": "CreateTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "(google.api.http).body": "task", - "(google.api.method_signature)": "parent,task,task_id", - "(google.longrunning.operation_info).response_type": "Task", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "body": "task" - } - }, - { - "(google.api.method_signature)": "parent,task,task_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Task", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateTask": { - "requestType": "UpdateTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.http).body": "task", - "(google.api.method_signature)": "task,update_mask", - "(google.longrunning.operation_info).response_type": "Task", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "body": "task" - } - }, - { - "(google.api.method_signature)": "task,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Task", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteTask": { - "requestType": "DeleteTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListTasks": { - "requestType": "ListTasksRequest", - "responseType": "ListTasksResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTask": { - "requestType": "GetTaskRequest", - "responseType": "Task", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListJobs": { - "requestType": "ListJobsRequest", - "responseType": "ListJobsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "RunTask": { - "requestType": "RunTaskRequest", - "responseType": "RunTaskResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetJob": { - "requestType": "GetJobRequest", - "responseType": "Job", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelJob": { - "requestType": "CancelJobRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "parent,environment,environment_id", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "parent,environment,environment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "environment,update_mask", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "environment,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListEnvironments": { - "requestType": "ListEnvironmentsRequest", - "responseType": "ListEnvironmentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListSessions": { - "requestType": "ListSessionsRequest", - "responseType": "ListSessionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateLakeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "lakeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lake": { - "type": "Lake", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateLakeRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lake": { - "type": "Lake", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteLakeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - } - } - }, - "ListLakesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListLakesResponse": { - "fields": { - "lakes": { - "rule": "repeated", - "type": "Lake", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "ListLakeActionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListActionsResponse": { - "fields": { - "actions": { - "rule": "repeated", - "type": "Action", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetLakeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - } - } - }, - "CreateZoneRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "zoneId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "Zone", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateZoneRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "Zone", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteZoneRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - } - } - }, - "ListZonesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListZonesResponse": { - "fields": { - "zones": { - "rule": "repeated", - "type": "Zone", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListZoneActionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetZoneRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - } - } - }, - "CreateAssetRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "assetId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "asset": { - "type": "Asset", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateAssetRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "asset": { - "type": "Asset", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteAssetRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - } - } - }, - "ListAssetsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListAssetsResponse": { - "fields": { - "assets": { - "rule": "repeated", - "type": "Asset", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListAssetActionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetAssetRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "verb": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateTaskRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "taskId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "task": { - "type": "Task", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateTaskRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "task": { - "type": "Task", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteTaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" - } - } - } - }, - "ListTasksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListTasksResponse": { - "fields": { - "tasks": { - "rule": "repeated", - "type": "Task", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetTaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" - } - } - } - }, - "GetJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" - } - } - } - }, - "RunTaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "args": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RunTaskResponse": { - "fields": { - "job": { - "type": "Job", - "id": 1 - } - } - }, - "ListJobsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListJobsResponse": { - "fields": { - "jobs": { - "rule": "repeated", - "type": "Job", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" - } - } - } - }, - "CreateEnvironmentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "environmentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "environment": { - "type": "Environment", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateEnvironmentRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "environment": { - "type": "Environment", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" - } - } - } - }, - "ListEnvironmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEnvironmentsResponse": { - "fields": { - "environments": { - "rule": "repeated", - "type": "Environment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" - } - } - } - }, - "ListSessionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListSessionsResponse": { - "fields": { - "sessions": { - "rule": "repeated", - "type": "Session", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "Task": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Task", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" - }, - "oneofs": { - "config": { - "oneof": [ - "spark", - "notebook" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "triggerSpec": { - "type": "TriggerSpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "executionSpec": { - "type": "ExecutionSpec", - "id": 101, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "executionStatus": { - "type": "ExecutionStatus", - "id": 201, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "spark": { - "type": "SparkTaskConfig", - "id": 300 - }, - "notebook": { - "type": "NotebookTaskConfig", - "id": 302 - } - }, - "nested": { - "InfrastructureSpec": { - "oneofs": { - "resources": { - "oneof": [ - "batch" - ] - }, - "runtime": { - "oneof": [ - "containerImage" - ] - }, - "network": { - "oneof": [ - "vpcNetwork" - ] - } - }, - "fields": { - "batch": { - "type": "BatchComputeResources", - "id": 52 - }, - "containerImage": { - "type": "ContainerImageRuntime", - "id": 101 - }, - "vpcNetwork": { - "type": "VpcNetwork", - "id": 150 - } - }, - "nested": { - "BatchComputeResources": { - "fields": { - "executorsCount": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxExecutorsCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ContainerImageRuntime": { - "fields": { - "image": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "javaJars": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pythonPackages": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "properties": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "VpcNetwork": { - "oneofs": { - "networkName": { - "oneof": [ - "network", - "subNetwork" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subNetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "TriggerSpec": { - "oneofs": { - "trigger": { - "oneof": [ - "schedule" - ] - } - }, - "fields": { - "type": { - "type": "Type", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxRetries": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "schedule": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ON_DEMAND": 1, - "RECURRING": 2 - } - } - } - }, - "ExecutionSpec": { - "fields": { - "args": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "serviceAccount": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "project": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxJobExecutionLifetime": { - "type": "google.protobuf.Duration", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKey": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SparkTaskConfig": { - "oneofs": { - "driver": { - "oneof": [ - "mainJarFileUri", - "mainClass", - "pythonScriptFile", - "sqlScriptFile", - "sqlScript" - ] - } - }, - "fields": { - "mainJarFileUri": { - "type": "string", - "id": 100 - }, - "mainClass": { - "type": "string", - "id": 101 - }, - "pythonScriptFile": { - "type": "string", - "id": 102 - }, - "sqlScriptFile": { - "type": "string", - "id": 104 - }, - "sqlScript": { - "type": "string", - "id": 105 - }, - "fileUris": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "archiveUris": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "infrastructureSpec": { - "type": "InfrastructureSpec", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NotebookTaskConfig": { - "fields": { - "notebook": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "infrastructureSpec": { - "type": "InfrastructureSpec", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "fileUris": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "archiveUris": { - "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ExecutionStatus": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "latestJob": { - "type": "Job", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - }, - "Job": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Job", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "retryCount": { - "type": "uint32", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "service": { - "type": "Service", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceJob": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "trigger": { - "type": "Trigger", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "executionSpec": { - "type": "Task.ExecutionSpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "DATAPROC": 1 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "CANCELLING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4, - "FAILED": 5, - "ABORTED": 6 - } - }, - "Trigger": { - "values": { - "TRIGGER_UNSPECIFIED": 0, - "TASK_CONFIG": 1, - "RUN_REQUEST": 2 - } - } - } - }, - "ContentService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateContent": { - "requestType": "CreateContentRequest", - "responseType": "Content", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", - "(google.api.http).body": "content", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", - "(google.api.http).additional_bindings.body": "content", - "(google.api.method_signature)": "parent,content" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", - "body": "content", - "additional_bindings": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/content", - "body": "content" - } - } - }, - { - "(google.api.method_signature)": "parent,content" - } - ] - }, - "UpdateContent": { - "requestType": "UpdateContentRequest", - "responseType": "Content", - "options": { - "(google.api.http).patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", - "(google.api.http).body": "content", - "(google.api.http).additional_bindings.patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", - "(google.api.http).additional_bindings.body": "content", - "(google.api.method_signature)": "content,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}", - "body": "content", - "additional_bindings": { - "patch": "/v1/{content.name=projects/*/locations/*/lakes/*/content/**}", - "body": "content" - } - } - }, - { - "(google.api.method_signature)": "content,update_mask" - } - ] - }, - "DeleteContent": { - "requestType": "DeleteContentRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", - "additional_bindings": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetContent": { - "requestType": "GetContentRequest", - "responseType": "Content", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", - "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}", - "additional_bindings": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/content/**}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", - "(google.api.http).additional_bindings.get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy", - "(google.api.method_signature)": "resource" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy", - "additional_bindings": { - "get": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy" - } - } - }, - { - "(google.api.method_signature)": "resource" - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy", - "body": "*" - } - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions", - "body": "*" - } - } - } - ] - }, - "ListContent": { - "requestType": "ListContentRequest", - "responseType": "ListContentResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/lakes/*}/content", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/contentitems", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/content" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateContentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "content": { - "type": "Content", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateContentRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "content": { - "type": "Content", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteContentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" - } - } - } - }, - "ListContentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListContentResponse": { - "fields": { - "content": { - "rule": "repeated", - "type": "Content", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetContentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Content" - } - }, - "view": { - "type": "ContentView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ContentView": { - "values": { - "CONTENT_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 2 - } - } - } - }, - "DataDiscoverySpec": { - "oneofs": { - "resourceConfig": { - "oneof": [ - "storageConfig" - ] - } - }, - "fields": { - "bigqueryPublishingConfig": { - "type": "BigQueryPublishingConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageConfig": { - "type": "StorageConfig", - "id": 100 - } - }, - "nested": { - "BigQueryPublishingConfig": { - "fields": { - "tableType": { - "type": "TableType", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "connection": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "bigqueryconnection.googleapis.com/Connection" - } - } - }, - "nested": { - "TableType": { - "values": { - "TABLE_TYPE_UNSPECIFIED": 0, - "EXTERNAL": 1, - "BIGLAKE": 2 - } - } - } - }, - "StorageConfig": { - "fields": { - "includePatterns": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludePatterns": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "csvOptions": { - "type": "CsvOptions", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jsonOptions": { - "type": "JsonOptions", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CsvOptions": { - "fields": { - "headerRows": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encoding": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "typeInferenceDisabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "quote": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "typeInferenceDisabled": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - }, - "DataDiscoveryResult": { - "fields": { - "bigqueryPublishing": { - "type": "BigQueryPublishing", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "BigQueryPublishing": { - "fields": { - "dataset": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "bigquery.googleapis.com/Dataset" - } - } - } - } - } - }, - "DataProfileSpec": { - "fields": { - "samplingPercent": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rowFilter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "postScanActions": { - "type": "PostScanActions", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includeFields": { - "type": "SelectedFields", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludeFields": { - "type": "SelectedFields", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PostScanActions": { - "fields": { - "bigqueryExport": { - "type": "BigQueryExport", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "BigQueryExport": { - "fields": { - "resultsTable": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SelectedFields": { - "fields": { - "fieldNames": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "DataProfileResult": { - "fields": { - "rowCount": { - "type": "int64", - "id": 3 - }, - "profile": { - "type": "Profile", - "id": 4 - }, - "scannedData": { - "type": "ScannedData", - "id": 5 - }, - "postScanActionsResult": { - "type": "PostScanActionsResult", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Profile": { - "fields": { - "fields": { - "rule": "repeated", - "type": "Field", - "id": 2 - } - }, - "nested": { - "Field": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "string", - "id": 2 - }, - "mode": { - "type": "string", - "id": 3 - }, - "profile": { - "type": "ProfileInfo", - "id": 4 - } - }, - "nested": { - "ProfileInfo": { - "oneofs": { - "fieldInfo": { - "oneof": [ - "stringProfile", - "integerProfile", - "doubleProfile" - ] - } - }, - "fields": { - "nullRatio": { - "type": "double", - "id": 2 - }, - "distinctRatio": { - "type": "double", - "id": 3 - }, - "topNValues": { - "rule": "repeated", - "type": "TopNValue", - "id": 4 - }, - "stringProfile": { - "type": "StringFieldInfo", - "id": 101 - }, - "integerProfile": { - "type": "IntegerFieldInfo", - "id": 102 - }, - "doubleProfile": { - "type": "DoubleFieldInfo", - "id": 103 - } - }, - "nested": { - "StringFieldInfo": { - "fields": { - "minLength": { - "type": "int64", - "id": 1 - }, - "maxLength": { - "type": "int64", - "id": 2 - }, - "averageLength": { - "type": "double", - "id": 3 - } - } - }, - "IntegerFieldInfo": { - "fields": { - "average": { - "type": "double", - "id": 1 - }, - "standardDeviation": { - "type": "double", - "id": 3 - }, - "min": { - "type": "int64", - "id": 4 - }, - "quartiles": { - "rule": "repeated", - "type": "int64", - "id": 6 - }, - "max": { - "type": "int64", - "id": 5 - } - } - }, - "DoubleFieldInfo": { - "fields": { - "average": { - "type": "double", - "id": 1 - }, - "standardDeviation": { - "type": "double", - "id": 3 - }, - "min": { - "type": "double", - "id": 4 - }, - "quartiles": { - "rule": "repeated", - "type": "double", - "id": 6 - }, - "max": { - "type": "double", - "id": 5 - } - } - }, - "TopNValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - }, - "count": { - "type": "int64", - "id": 2 - }, - "ratio": { - "type": "double", - "id": 3 - } - } - } - } - } - } - } - } - }, - "PostScanActionsResult": { - "fields": { - "bigqueryExportResult": { - "type": "BigQueryExportResult", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "BigQueryExportResult": { - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "SKIPPED": 3 - } - } - } - } - } - } - } - }, - "Trigger": { - "oneofs": { - "mode": { - "oneof": [ - "onDemand", - "schedule" - ] - } - }, - "fields": { - "onDemand": { - "type": "OnDemand", - "id": 100 - }, - "schedule": { - "type": "Schedule", - "id": 101 - } - }, - "nested": { - "OnDemand": { - "fields": {} - }, - "Schedule": { - "fields": { - "cron": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "DataSource": { - "oneofs": { - "source": { - "oneof": [ - "entity", - "resource" - ] - } - }, - "fields": { - "entity": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "IMMUTABLE", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "resource": { - "type": "string", - "id": 101, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - }, - "ScannedData": { - "oneofs": { - "dataRange": { - "oneof": [ - "incrementalField" - ] - } - }, - "fields": { - "incrementalField": { - "type": "IncrementalField", - "id": 1 - } - }, - "nested": { - "IncrementalField": { - "fields": { - "field": { - "type": "string", - "id": 1 - }, - "start": { - "type": "string", - "id": 2 - }, - "end": { - "type": "string", - "id": 3 - } - } - } - } - }, - "DataQualitySpec": { - "fields": { - "rules": { - "rule": "repeated", - "type": "DataQualityRule", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "samplingPercent": { - "type": "float", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rowFilter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "postScanActions": { - "type": "PostScanActions", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PostScanActions": { - "fields": { - "bigqueryExport": { - "type": "BigQueryExport", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "notificationReport": { - "type": "NotificationReport", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "BigQueryExport": { - "fields": { - "resultsTable": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Recipients": { - "fields": { - "emails": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ScoreThresholdTrigger": { - "fields": { - "scoreThreshold": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JobFailureTrigger": { - "fields": {} - }, - "JobEndTrigger": { - "fields": {} - }, - "NotificationReport": { - "fields": { - "recipients": { - "type": "Recipients", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "scoreThresholdTrigger": { - "type": "ScoreThresholdTrigger", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jobFailureTrigger": { - "type": "JobFailureTrigger", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "jobEndTrigger": { - "type": "JobEndTrigger", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - }, - "DataQualityResult": { - "oneofs": { - "_score": { - "oneof": [ - "score" - ] - } - }, - "fields": { - "passed": { - "type": "bool", - "id": 5 - }, - "score": { - "type": "float", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "dimensions": { - "rule": "repeated", - "type": "DataQualityDimensionResult", - "id": 2 - }, - "columns": { - "rule": "repeated", - "type": "DataQualityColumnResult", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rules": { - "rule": "repeated", - "type": "DataQualityRuleResult", - "id": 3 - }, - "rowCount": { - "type": "int64", - "id": 4 - }, - "scannedData": { - "type": "ScannedData", - "id": 7 - }, - "postScanActionsResult": { - "type": "PostScanActionsResult", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PostScanActionsResult": { - "fields": { - "bigqueryExportResult": { - "type": "BigQueryExportResult", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "BigQueryExportResult": { - "fields": { - "state": { - "type": "State", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "SKIPPED": 3 - } - } - } - } - } - } - } - }, - "DataQualityRuleResult": { - "fields": { - "rule": { - "type": "DataQualityRule", - "id": 1 - }, - "passed": { - "type": "bool", - "id": 7 - }, - "evaluatedCount": { - "type": "int64", - "id": 9 - }, - "passedCount": { - "type": "int64", - "id": 8 - }, - "nullCount": { - "type": "int64", - "id": 5 - }, - "passRatio": { - "type": "double", - "id": 6 - }, - "failingRowsQuery": { - "type": "string", - "id": 10 - }, - "assertionRowCount": { - "type": "int64", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "DataQualityDimensionResult": { - "oneofs": { - "_score": { - "oneof": [ - "score" - ] - } - }, - "fields": { - "dimension": { - "type": "DataQualityDimension", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "passed": { - "type": "bool", - "id": 3 - }, - "score": { - "type": "float", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - } - }, - "DataQualityDimension": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DataQualityRule": { - "oneofs": { - "ruleType": { - "oneof": [ - "rangeExpectation", - "nonNullExpectation", - "setExpectation", - "regexExpectation", - "uniquenessExpectation", - "statisticRangeExpectation", - "rowConditionExpectation", - "tableConditionExpectation", - "sqlAssertion" - ] - } - }, - "fields": { - "rangeExpectation": { - "type": "RangeExpectation", - "id": 1 - }, - "nonNullExpectation": { - "type": "NonNullExpectation", - "id": 2 - }, - "setExpectation": { - "type": "SetExpectation", - "id": 3 - }, - "regexExpectation": { - "type": "RegexExpectation", - "id": 4 - }, - "uniquenessExpectation": { - "type": "UniquenessExpectation", - "id": 100 - }, - "statisticRangeExpectation": { - "type": "StatisticRangeExpectation", - "id": 101 - }, - "rowConditionExpectation": { - "type": "RowConditionExpectation", - "id": 200 - }, - "tableConditionExpectation": { - "type": "TableConditionExpectation", - "id": 201 - }, - "sqlAssertion": { - "type": "SqlAssertion", - "id": 202 - }, - "column": { - "type": "string", - "id": 500, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ignoreNull": { - "type": "bool", - "id": 501, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dimension": { - "type": "string", - "id": 502, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "threshold": { - "type": "double", - "id": 503, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "name": { - "type": "string", - "id": 504, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 505, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "suspended": { - "type": "bool", - "id": 506, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "RangeExpectation": { - "fields": { - "minValue": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxValue": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "strictMinEnabled": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "strictMaxEnabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NonNullExpectation": { - "fields": {} - }, - "SetExpectation": { - "fields": { - "values": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RegexExpectation": { - "fields": { - "regex": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UniquenessExpectation": { - "fields": {} - }, - "StatisticRangeExpectation": { - "fields": { - "statistic": { - "type": "ColumnStatistic", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minValue": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxValue": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "strictMinEnabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "strictMaxEnabled": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ColumnStatistic": { - "values": { - "STATISTIC_UNDEFINED": 0, - "MEAN": 1, - "MIN": 2, - "MAX": 3 - } - } - } - }, - "RowConditionExpectation": { - "fields": { - "sqlExpression": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TableConditionExpectation": { - "fields": { - "sqlExpression": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SqlAssertion": { - "fields": { - "sqlStatement": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "DataQualityColumnResult": { - "oneofs": { - "_score": { - "oneof": [ - "score" - ] - } - }, - "fields": { - "column": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "score": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - } - }, - "DataTaxonomyService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateDataTaxonomy": { - "requestType": "CreateDataTaxonomyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", - "(google.api.http).body": "data_taxonomy", - "(google.api.method_signature)": "parent,data_taxonomy,data_taxonomy_id", - "(google.longrunning.operation_info).response_type": "DataTaxonomy", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", - "body": "data_taxonomy" - } - }, - { - "(google.api.method_signature)": "parent,data_taxonomy,data_taxonomy_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataTaxonomy", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateDataTaxonomy": { - "requestType": "UpdateDataTaxonomyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}", - "(google.api.http).body": "data_taxonomy", - "(google.api.method_signature)": "data_taxonomy,update_mask", - "(google.longrunning.operation_info).response_type": "DataTaxonomy", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}", - "body": "data_taxonomy" - } - }, - { - "(google.api.method_signature)": "data_taxonomy,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataTaxonomy", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteDataTaxonomy": { - "requestType": "DeleteDataTaxonomyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListDataTaxonomies": { - "requestType": "ListDataTaxonomiesRequest", - "responseType": "ListDataTaxonomiesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataTaxonomies", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/dataTaxonomies" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataTaxonomy": { - "requestType": "GetDataTaxonomyRequest", - "responseType": "DataTaxonomy", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateDataAttributeBinding": { - "requestType": "CreateDataAttributeBindingRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", - "(google.api.http).body": "data_attribute_binding", - "(google.api.method_signature)": "parent,data_attribute_binding,data_attribute_binding_id", - "(google.longrunning.operation_info).response_type": "DataAttributeBinding", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", - "body": "data_attribute_binding" - } - }, - { - "(google.api.method_signature)": "parent,data_attribute_binding,data_attribute_binding_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataAttributeBinding", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateDataAttributeBinding": { - "requestType": "UpdateDataAttributeBindingRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}", - "(google.api.http).body": "data_attribute_binding", - "(google.api.method_signature)": "data_attribute_binding,update_mask", - "(google.longrunning.operation_info).response_type": "DataAttributeBinding", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}", - "body": "data_attribute_binding" - } - }, - { - "(google.api.method_signature)": "data_attribute_binding,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataAttributeBinding", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteDataAttributeBinding": { - "requestType": "DeleteDataAttributeBindingRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListDataAttributeBindings": { - "requestType": "ListDataAttributeBindingsRequest", - "responseType": "ListDataAttributeBindingsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataAttributeBinding": { - "requestType": "GetDataAttributeBindingRequest", - "responseType": "DataAttributeBinding", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateDataAttribute": { - "requestType": "CreateDataAttributeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", - "(google.api.http).body": "data_attribute", - "(google.api.method_signature)": "parent,data_attribute,data_attribute_id", - "(google.longrunning.operation_info).response_type": "DataAttribute", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", - "body": "data_attribute" - } - }, - { - "(google.api.method_signature)": "parent,data_attribute,data_attribute_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataAttribute", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateDataAttribute": { - "requestType": "UpdateDataAttributeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", - "(google.api.http).body": "data_attribute", - "(google.api.method_signature)": "data_attribute,update_mask", - "(google.longrunning.operation_info).response_type": "DataAttribute", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", - "body": "data_attribute" - } - }, - { - "(google.api.method_signature)": "data_attribute,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataAttribute", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteDataAttribute": { - "requestType": "DeleteDataAttributeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListDataAttributes": { - "requestType": "ListDataAttributesRequest", - "responseType": "ListDataAttributesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataAttribute": { - "requestType": "GetDataAttributeRequest", - "responseType": "DataAttribute", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "DataTaxonomy": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/DataTaxonomy", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "attributeCount": { - "type": "int32", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "etag": { - "type": "string", - "id": 10 - }, - "classCount": { - "type": "int32", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "DataAttribute": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/DataAttribute", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "parentId": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - }, - "attributeCount": { - "type": "int32", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "etag": { - "type": "string", - "id": 10 - }, - "resourceAccessSpec": { - "type": "ResourceAccessSpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataAccessSpec": { - "type": "DataAccessSpec", - "id": 101, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DataAttributeBinding": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/DataAttributeBinding", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}" - }, - "oneofs": { - "resourceReference": { - "oneof": [ - "resource" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 8 - }, - "resource": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "attributes": { - "rule": "repeated", - "type": "string", - "id": 110, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - }, - "paths": { - "rule": "repeated", - "type": "Path", - "id": 120, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Path": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "attributes": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - } - } - } - } - }, - "CreateDataTaxonomyRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "dataTaxonomyId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataTaxonomy": { - "type": "DataTaxonomy", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateDataTaxonomyRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataTaxonomy": { - "type": "DataTaxonomy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetDataTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" - } - } - } - }, - "ListDataTaxonomiesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataTaxonomiesResponse": { - "fields": { - "dataTaxonomies": { - "rule": "repeated", - "type": "DataTaxonomy", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeleteDataTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CreateDataAttributeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" - } - }, - "dataAttributeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataAttribute": { - "type": "DataAttribute", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateDataAttributeRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataAttribute": { - "type": "DataAttribute", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetDataAttributeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - } - } - }, - "ListDataAttributesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataTaxonomy" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataAttributesResponse": { - "fields": { - "dataAttributes": { - "rule": "repeated", - "type": "DataAttribute", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeleteDataAttributeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttribute" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CreateDataAttributeBindingRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "dataAttributeBindingId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataAttributeBinding": { - "type": "DataAttributeBinding", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateDataAttributeBindingRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataAttributeBinding": { - "type": "DataAttributeBinding", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetDataAttributeBindingRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" - } - } - } - }, - "ListDataAttributeBindingsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataAttributeBindingsResponse": { - "fields": { - "dataAttributeBindings": { - "rule": "repeated", - "type": "DataAttributeBinding", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "DeleteDataAttributeBindingRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataAttributeBinding" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ResourceAccessSpec": { - "fields": { - "readers": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "writers": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "owners": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DataAccessSpec": { - "fields": { - "readers": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DataScanService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateDataScan": { - "requestType": "CreateDataScanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataScans", - "(google.api.http).body": "data_scan", - "(google.api.method_signature)": "parent,data_scan,data_scan_id", - "(google.longrunning.operation_info).response_type": "DataScan", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/dataScans", - "body": "data_scan" - } - }, - { - "(google.api.method_signature)": "parent,data_scan,data_scan_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataScan", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateDataScan": { - "requestType": "UpdateDataScanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", - "(google.api.http).body": "data_scan", - "(google.api.method_signature)": "data_scan,update_mask", - "(google.longrunning.operation_info).response_type": "DataScan", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", - "body": "data_scan" - } - }, - { - "(google.api.method_signature)": "data_scan,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataScan", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteDataScan": { - "requestType": "DeleteDataScanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataScans/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/dataScans/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetDataScan": { - "requestType": "GetDataScanRequest", - "responseType": "DataScan", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/dataScans/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListDataScans": { - "requestType": "ListDataScansRequest", - "responseType": "ListDataScansResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataScans", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/dataScans" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "RunDataScan": { - "requestType": "RunDataScanRequest", - "responseType": "RunDataScanResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetDataScanJob": { - "requestType": "GetDataScanJobRequest", - "responseType": "DataScanJob", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListDataScanJobs": { - "requestType": "ListDataScanJobsRequest", - "responseType": "ListDataScanJobsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GenerateDataQualityRules": { - "requestType": "GenerateDataQualityRulesRequest", - "responseType": "GenerateDataQualityRulesResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules", - "body": "*", - "additional_bindings": { - "post": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - } - } - }, - "CreateDataScanRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "dataScan": { - "type": "DataScan", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataScanId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateDataScanRequest": { - "fields": { - "dataScan": { - "type": "DataScan", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteDataScanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" - } - } - } - }, - "GetDataScanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" - } - }, - "view": { - "type": "DataScanView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "DataScanView": { - "values": { - "DATA_SCAN_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 10 - } - } - } - }, - "ListDataScansRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataScansResponse": { - "fields": { - "dataScans": { - "rule": "repeated", - "type": "DataScan", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "RunDataScanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" - } - } - } - }, - "RunDataScanResponse": { - "fields": { - "job": { - "type": "DataScanJob", - "id": 1 - } - } - }, - "GetDataScanJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScanJob" - } - }, - "view": { - "type": "DataScanJobView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "DataScanJobView": { - "values": { - "DATA_SCAN_JOB_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "FULL": 10 - } - } - } - }, - "ListDataScanJobsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataScanJobsResponse": { - "fields": { - "dataScanJobs": { - "rule": "repeated", - "type": "DataScanJob", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GenerateDataQualityRulesRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GenerateDataQualityRulesResponse": { - "fields": { - "rule": { - "rule": "repeated", - "type": "DataQualityRule", - "id": 1 - } - } - }, - "DataScan": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/DataScan", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}" - }, - "oneofs": { - "spec": { - "oneof": [ - "dataQualitySpec", - "dataProfileSpec", - "dataDiscoverySpec" - ] - }, - "result": { - "oneof": [ - "dataQualityResult", - "dataProfileResult", - "dataDiscoveryResult" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "state": { - "type": "State", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "data": { - "type": "DataSource", - "id": 9, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "executionSpec": { - "type": "ExecutionSpec", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "executionStatus": { - "type": "ExecutionStatus", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "DataScanType", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataQualitySpec": { - "type": "DataQualitySpec", - "id": 100 - }, - "dataProfileSpec": { - "type": "DataProfileSpec", - "id": 101 - }, - "dataDiscoverySpec": { - "type": "DataDiscoverySpec", - "id": 102 - }, - "dataQualityResult": { - "type": "DataQualityResult", - "id": 200, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataProfileResult": { - "type": "DataProfileResult", - "id": 201, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataDiscoveryResult": { - "type": "DataDiscoveryResult", - "id": 202, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "ExecutionSpec": { - "oneofs": { - "incremental": { - "oneof": [ - "field" - ] - } - }, - "fields": { - "trigger": { - "type": "Trigger", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "field": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - }, - "ExecutionStatus": { - "fields": { - "latestJobStartTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "latestJobEndTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "latestJobCreateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "DataScanJob": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/DataScanJob", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" - }, - "oneofs": { - "spec": { - "oneof": [ - "dataQualitySpec", - "dataProfileSpec", - "dataDiscoverySpec" - ] - }, - "result": { - "oneof": [ - "dataQualityResult", - "dataProfileResult", - "dataDiscoveryResult" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "message": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "DataScanType", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataQualitySpec": { - "type": "DataQualitySpec", - "id": 100, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataProfileSpec": { - "type": "DataProfileSpec", - "id": 101, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataDiscoverySpec": { - "type": "DataDiscoverySpec", - "id": 102, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataQualityResult": { - "type": "DataQualityResult", - "id": 200, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataProfileResult": { - "type": "DataProfileResult", - "id": 201, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataDiscoveryResult": { - "type": "DataDiscoveryResult", - "id": 202, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "CANCELING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4, - "FAILED": 5, - "PENDING": 7 - } - } - } - }, - "DataScanType": { - "values": { - "DATA_SCAN_TYPE_UNSPECIFIED": 0, - "DATA_QUALITY": 1, - "DATA_PROFILE": 2, - "DATA_DISCOVERY": 3 - } - }, - "DiscoveryEvent": { - "oneofs": { - "details": { - "oneof": [ - "config", - "entity", - "partition", - "action", - "table" - ] - } - }, - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "lakeId": { - "type": "string", - "id": 2 - }, - "zoneId": { - "type": "string", - "id": 3 - }, - "assetId": { - "type": "string", - "id": 4 - }, - "dataLocation": { - "type": "string", - "id": 5 - }, - "datascanId": { - "type": "string", - "id": 6 - }, - "type": { - "type": "EventType", - "id": 10 - }, - "config": { - "type": "ConfigDetails", - "id": 20 - }, - "entity": { - "type": "EntityDetails", - "id": 21 - }, - "partition": { - "type": "PartitionDetails", - "id": 22 - }, - "action": { - "type": "ActionDetails", - "id": 23 - }, - "table": { - "type": "TableDetails", - "id": 24 - } - }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "CONFIG": 1, - "ENTITY_CREATED": 2, - "ENTITY_UPDATED": 3, - "ENTITY_DELETED": 4, - "PARTITION_CREATED": 5, - "PARTITION_UPDATED": 6, - "PARTITION_DELETED": 7, - "TABLE_PUBLISHED": 10, - "TABLE_UPDATED": 11, - "TABLE_IGNORED": 12, - "TABLE_DELETED": 13 - } - }, - "EntityType": { - "values": { - "ENTITY_TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 - } - }, - "TableType": { - "values": { - "TABLE_TYPE_UNSPECIFIED": 0, - "EXTERNAL_TABLE": 1, - "BIGLAKE_TABLE": 2, - "OBJECT_TABLE": 3 - } - }, - "ConfigDetails": { - "fields": { - "parameters": { - "keyType": "string", - "type": "string", - "id": 1 - } - } - }, - "EntityDetails": { - "fields": { - "entity": { - "type": "string", - "id": 1 - }, - "type": { - "type": "EntityType", - "id": 2 - } - } - }, - "TableDetails": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "type": { - "type": "TableType", - "id": 2 - } - } - }, - "PartitionDetails": { - "fields": { - "partition": { - "type": "string", - "id": 1 - }, - "entity": { - "type": "string", - "id": 2 - }, - "type": { - "type": "EntityType", - "id": 3 - }, - "sampledDataLocations": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "ActionDetails": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "issue": { - "type": "string", - "id": 2 - } - } - } - } - }, - "JobEvent": { - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "jobId": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "state": { - "type": "State", - "id": 5 - }, - "retries": { - "type": "int32", - "id": 6 - }, - "type": { - "type": "Type", - "id": 7 - }, - "service": { - "type": "Service", - "id": 8 - }, - "serviceJob": { - "type": "string", - "id": 9 - }, - "executionTrigger": { - "type": "ExecutionTrigger", - "id": 11 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "SPARK": 1, - "NOTEBOOK": 2 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "CANCELLED": 3, - "ABORTED": 4 - } - }, - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "DATAPROC": 1 - } - }, - "ExecutionTrigger": { - "values": { - "EXECUTION_TRIGGER_UNSPECIFIED": 0, - "TASK_CONFIG": 1, - "RUN_REQUEST": 2 - } - } - } - }, - "SessionEvent": { - "oneofs": { - "detail": { - "oneof": [ - "query" - ] - } - }, - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "userId": { - "type": "string", - "id": 2 - }, - "sessionId": { - "type": "string", - "id": 3 - }, - "type": { - "type": "EventType", - "id": 4 - }, - "query": { - "type": "QueryDetail", - "id": 5 - }, - "eventSucceeded": { - "type": "bool", - "id": 6 - }, - "fastStartupEnabled": { - "type": "bool", - "id": 7 - }, - "unassignedDuration": { - "type": "google.protobuf.Duration", - "id": 8 - } - }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "START": 1, - "STOP": 2, - "QUERY": 3, - "CREATE": 4 - } - }, - "QueryDetail": { - "fields": { - "queryId": { - "type": "string", - "id": 1 - }, - "queryText": { - "type": "string", - "id": 2 - }, - "engine": { - "type": "Engine", - "id": 3 - }, - "duration": { - "type": "google.protobuf.Duration", - "id": 4 - }, - "resultSizeBytes": { - "type": "int64", - "id": 5 - }, - "dataProcessedBytes": { - "type": "int64", - "id": 6 - } - }, - "nested": { - "Engine": { - "values": { - "ENGINE_UNSPECIFIED": 0, - "SPARK_SQL": 1, - "BIGQUERY": 2 - } - } - } - } - } - }, - "GovernanceEvent": { - "oneofs": { - "_entity": { - "oneof": [ - "entity" - ] - } - }, - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "eventType": { - "type": "EventType", - "id": 2 - }, - "entity": { - "type": "Entity", - "id": 3, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "Entity": { - "fields": { - "entity": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "entityType": { - "type": "EntityType", - "id": 2 - } - }, - "nested": { - "EntityType": { - "values": { - "ENTITY_TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 - } - } - } - }, - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "RESOURCE_IAM_POLICY_UPDATE": 1, - "BIGQUERY_TABLE_CREATE": 2, - "BIGQUERY_TABLE_UPDATE": 3, - "BIGQUERY_TABLE_DELETE": 4, - "BIGQUERY_CONNECTION_CREATE": 5, - "BIGQUERY_CONNECTION_UPDATE": 6, - "BIGQUERY_CONNECTION_DELETE": 7, - "BIGQUERY_TAXONOMY_CREATE": 10, - "BIGQUERY_POLICY_TAG_CREATE": 11, - "BIGQUERY_POLICY_TAG_DELETE": 12, - "BIGQUERY_POLICY_TAG_SET_IAM_POLICY": 13, - "ACCESS_POLICY_UPDATE": 14, - "GOVERNANCE_RULE_MATCHED_RESOURCES": 15, - "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS": 16, - "GOVERNANCE_RULE_ERRORS": 17, - "GOVERNANCE_RULE_PROCESSING": 18 - } - } - } - }, - "DataScanEvent": { - "oneofs": { - "result": { - "oneof": [ - "dataProfile", - "dataQuality" - ] - }, - "appliedConfigs": { - "oneof": [ - "dataProfileConfigs", - "dataQualityConfigs" - ] - } - }, - "fields": { - "dataSource": { - "type": "string", - "id": 1 - }, - "jobId": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 12 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "type": { - "type": "ScanType", - "id": 5 - }, - "state": { - "type": "State", - "id": 6 - }, - "message": { - "type": "string", - "id": 7 - }, - "specVersion": { - "type": "string", - "id": 8 - }, - "trigger": { - "type": "Trigger", - "id": 9 - }, - "scope": { - "type": "Scope", - "id": 10 - }, - "dataProfile": { - "type": "DataProfileResult", - "id": 101 - }, - "dataQuality": { - "type": "DataQualityResult", - "id": 102 - }, - "dataProfileConfigs": { - "type": "DataProfileAppliedConfigs", - "id": 201 - }, - "dataQualityConfigs": { - "type": "DataQualityAppliedConfigs", - "id": 202 - }, - "postScanActionsResult": { - "type": "PostScanActionsResult", - "id": 11 - } - }, - "nested": { - "ScanType": { - "values": { - "SCAN_TYPE_UNSPECIFIED": 0, - "DATA_PROFILE": 1, - "DATA_QUALITY": 2, - "DATA_DISCOVERY": 4 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STARTED": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4, - "CREATED": 5 - } - }, - "Trigger": { - "values": { - "TRIGGER_UNSPECIFIED": 0, - "ON_DEMAND": 1, - "SCHEDULE": 2 - } - }, - "Scope": { - "values": { - "SCOPE_UNSPECIFIED": 0, - "FULL": 1, - "INCREMENTAL": 2 - } - }, - "DataProfileResult": { - "fields": { - "rowCount": { - "type": "int64", - "id": 1 - } - } - }, - "DataQualityResult": { - "fields": { - "rowCount": { - "type": "int64", - "id": 1 - }, - "passed": { - "type": "bool", - "id": 2 - }, - "dimensionPassed": { - "keyType": "string", - "type": "bool", - "id": 3 - }, - "score": { - "type": "float", - "id": 4 - }, - "dimensionScore": { - "keyType": "string", - "type": "float", - "id": 5 - }, - "columnScore": { - "keyType": "string", - "type": "float", - "id": 6 - } - } - }, - "DataProfileAppliedConfigs": { - "fields": { - "samplingPercent": { - "type": "float", - "id": 1 - }, - "rowFilterApplied": { - "type": "bool", - "id": 2 - }, - "columnFilterApplied": { - "type": "bool", - "id": 3 - } - } - }, - "DataQualityAppliedConfigs": { - "fields": { - "samplingPercent": { - "type": "float", - "id": 1 - }, - "rowFilterApplied": { - "type": "bool", - "id": 2 - } - } - }, - "PostScanActionsResult": { - "fields": { - "bigqueryExportResult": { - "type": "BigQueryExportResult", - "id": 1 - } - }, - "nested": { - "BigQueryExportResult": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "SKIPPED": 3 - } - } - } - } - } - } - } - }, - "DataQualityScanRuleResult": { - "fields": { - "jobId": { - "type": "string", - "id": 1 - }, - "dataSource": { - "type": "string", - "id": 2 - }, - "column": { - "type": "string", - "id": 3 - }, - "ruleName": { - "type": "string", - "id": 4 - }, - "ruleType": { - "type": "RuleType", - "id": 5 - }, - "evalutionType": { - "type": "EvaluationType", - "id": 6 - }, - "ruleDimension": { - "type": "string", - "id": 7 - }, - "thresholdPercent": { - "type": "double", - "id": 8 - }, - "result": { - "type": "Result", - "id": 9 - }, - "evaluatedRowCount": { - "type": "int64", - "id": 10 - }, - "passedRowCount": { - "type": "int64", - "id": 11 - }, - "nullRowCount": { - "type": "int64", - "id": 12 - }, - "assertionRowCount": { - "type": "int64", - "id": 13 - } - }, - "nested": { - "RuleType": { - "values": { - "RULE_TYPE_UNSPECIFIED": 0, - "NON_NULL_EXPECTATION": 1, - "RANGE_EXPECTATION": 2, - "REGEX_EXPECTATION": 3, - "ROW_CONDITION_EXPECTATION": 4, - "SET_EXPECTATION": 5, - "STATISTIC_RANGE_EXPECTATION": 6, - "TABLE_CONDITION_EXPECTATION": 7, - "UNIQUENESS_EXPECTATION": 8, - "SQL_ASSERTION": 9 - } - }, - "EvaluationType": { - "values": { - "EVALUATION_TYPE_UNSPECIFIED": 0, - "PER_ROW": 1, - "AGGREGATE": 2 - } - }, - "Result": { - "values": { - "RESULT_UNSPECIFIED": 0, - "PASSED": 1, - "FAILED": 2 - } - } - } - }, - "MetadataService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateEntity": { - "requestType": "CreateEntityRequest", - "responseType": "Entity", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "(google.api.http).body": "entity", - "(google.api.method_signature)": "parent,entity" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "body": "entity" - } - }, - { - "(google.api.method_signature)": "parent,entity" - } - ] - }, - "UpdateEntity": { - "requestType": "UpdateEntityRequest", - "responseType": "Entity", - "options": { - "(google.api.http).put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "(google.api.http).body": "entity" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "body": "entity" - } - } - ] - }, - "DeleteEntity": { - "requestType": "DeleteEntityRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetEntity": { - "requestType": "GetEntityRequest", - "responseType": "Entity", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEntities": { - "requestType": "ListEntitiesRequest", - "responseType": "ListEntitiesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreatePartition": { - "requestType": "CreatePartitionRequest", - "responseType": "Partition", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "(google.api.http).body": "partition", - "(google.api.method_signature)": "parent,partition" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "body": "partition" - } - }, - { - "(google.api.method_signature)": "parent,partition" - } - ] - }, - "DeletePartition": { - "requestType": "DeletePartitionRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetPartition": { - "requestType": "GetPartitionRequest", - "responseType": "Partition", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListPartitions": { - "requestType": "ListPartitionsRequest", - "responseType": "ListPartitionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateEntityRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "entity": { - "type": "Entity", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateEntityRequest": { - "fields": { - "entity": { - "type": "Entity", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEntityRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListEntitiesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - }, - "view": { - "type": "EntityView", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "TABLES": 1, - "FILESETS": 2 - } - } - } - }, - "ListEntitiesResponse": { - "fields": { - "entities": { - "rule": "repeated", - "type": "Entity", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEntityRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "view": { - "type": "EntityView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "SCHEMA": 2, - "FULL": 4 - } - } - } - }, - "ListPartitionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CreatePartitionRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "partition": { - "type": "Partition", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeletePartitionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListPartitionsResponse": { - "fields": { - "partitions": { - "rule": "repeated", - "type": "Partition", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPartitionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" - } - } - } - }, - "Entity": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Entity", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "id": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "Type", - "id": 10, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "asset": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "dataPath": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "dataPathPattern": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "catalogEntry": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "system": { - "type": "StorageSystem", - "id": 15, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "format": { - "type": "StorageFormat", - "id": 16, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "compatibility": { - "type": "CompatibilityStatus", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "access": { - "type": "StorageAccess", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "schema": { - "type": "Schema", - "id": 50, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 - } - }, - "CompatibilityStatus": { - "fields": { - "hiveMetastore": { - "type": "Compatibility", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bigquery": { - "type": "Compatibility", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Compatibility": { - "fields": { - "compatible": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reason": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - } - } - }, - "Partition": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Partition", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "location": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "etag": { - "type": "string", - "id": 4, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Schema": { - "fields": { - "userManaged": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "fields": { - "rule": "repeated", - "type": "SchemaField", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "partitionFields": { - "rule": "repeated", - "type": "PartitionField", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "partitionStyle": { - "type": "PartitionStyle", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "BOOLEAN": 1, - "BYTE": 2, - "INT16": 3, - "INT32": 4, - "INT64": 5, - "FLOAT": 6, - "DOUBLE": 7, - "DECIMAL": 8, - "STRING": 9, - "BINARY": 10, - "TIMESTAMP": 11, - "DATE": 12, - "TIME": 13, - "RECORD": 14, - "NULL": 100 - } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "REQUIRED": 1, - "NULLABLE": 2, - "REPEATED": 3 - } - }, - "SchemaField": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "mode": { - "type": "Mode", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "fields": { - "rule": "repeated", - "type": "SchemaField", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PartitionField": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "Type", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - }, - "PartitionStyle": { - "values": { - "PARTITION_STYLE_UNSPECIFIED": 0, - "HIVE_COMPATIBLE": 1 - } - } - } - }, - "StorageFormat": { - "oneofs": { - "options": { - "oneof": [ - "csv", - "json", - "iceberg" - ] - } - }, - "fields": { - "format": { - "type": "Format", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "compressionFormat": { - "type": "CompressionFormat", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mimeType": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "csv": { - "type": "CsvOptions", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "json": { - "type": "JsonOptions", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "iceberg": { - "type": "IcebergOptions", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CsvOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "headerRows": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "quote": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "IcebergOptions": { - "fields": { - "metadataLocation": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "PARQUET": 1, - "AVRO": 2, - "ORC": 3, - "CSV": 100, - "JSON": 101, - "IMAGE": 200, - "AUDIO": 201, - "VIDEO": 202, - "TEXT": 203, - "TFRECORD": 204, - "OTHER": 1000, - "UNKNOWN": 1001 - } - }, - "CompressionFormat": { - "values": { - "COMPRESSION_FORMAT_UNSPECIFIED": 0, - "GZIP": 2, - "BZIP2": 3 - } - } - } - }, - "StorageAccess": { - "fields": { - "read": { - "type": "AccessMode", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "AccessMode": { - "values": { - "ACCESS_MODE_UNSPECIFIED": 0, - "DIRECT": 1, - "MANAGED": 2 - } - } - } - }, - "StorageSystem": { - "values": { - "STORAGE_SYSTEM_UNSPECIFIED": 0, - "CLOUD_STORAGE": 1, - "BIGQUERY": 2 - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldInfoProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - "fields": { - "nullValue": { - "type": "NullValue", - "id": 1 - }, - "numberValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 - } - } - } - } - }, - "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 - } - } - } - } - }, - "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-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js deleted file mode 100644 index 9f5c8daf7c7..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_aspect_type.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, aspectTypeId, aspectType) { - // [START dataplex_v1_generated_CatalogService_CreateAspectType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a Google Cloud region. - */ - // const parent = 'abc123' - /** - * Required. AspectType identifier. - */ - // const aspectTypeId = 'abc123' - /** - * Required. AspectType Resource. - */ - // const aspectType = {} - /** - * Optional. The service validates the request without performing any - * mutations. The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callCreateAspectType() { - // Construct request - const request = { - parent, - aspectTypeId, - aspectType, - }; - - // Run request - const [operation] = await dataplexClient.createAspectType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAspectType(); - // [END dataplex_v1_generated_CatalogService_CreateAspectType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js deleted file mode 100644 index 7878fa9880f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entryId, entry) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - */ - // const parent = 'abc123' - /** - * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use an Entry ID format - * based on full resource - * names (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a full resource name of the resource without the - * prefix double slashes in the API service name part of the full resource - * name. This allows retrieval of entries using their associated resource - * name. - * For example, if the full resource name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * It is also suggested to follow the same convention for entries - * corresponding to resources from providers or systems other than Google - * Cloud. - * The maximum size of the field is 4000 characters. - */ - // const entryId = 'abc123' - /** - * Required. Entry resource. - */ - // const entry = {} - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callCreateEntry() { - // Construct request - const request = { - parent, - entryId, - entry, - }; - - // Run request - const response = await dataplexClient.createEntry(request); - console.log(response); - } - - callCreateEntry(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js deleted file mode 100644 index 8280461ff74..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_group.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entryGroupId, entryGroup) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Required. EntryGroup identifier. - */ - // const entryGroupId = 'abc123' - /** - * Required. EntryGroup Resource. - */ - // const entryGroup = {} - /** - * Optional. The service validates the request without performing any - * mutations. The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callCreateEntryGroup() { - // Construct request - const request = { - parent, - entryGroupId, - entryGroup, - }; - - // Run request - const [operation] = await dataplexClient.createEntryGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEntryGroup(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js deleted file mode 100644 index a5a8dc17981..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_entry_type.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entryTypeId, entryType) { - // [START dataplex_v1_generated_CatalogService_CreateEntryType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a Google Cloud region. - */ - // const parent = 'abc123' - /** - * Required. EntryType identifier. - */ - // const entryTypeId = 'abc123' - /** - * Required. EntryType Resource. - */ - // const entryType = {} - /** - * Optional. The service validates the request without performing any - * mutations. The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callCreateEntryType() { - // Construct request - const request = { - parent, - entryTypeId, - entryType, - }; - - // Run request - const [operation] = await dataplexClient.createEntryType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEntryType(); - // [END dataplex_v1_generated_CatalogService_CreateEntryType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js deleted file mode 100644 index be62c1257f9..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_aspect_type.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_DeleteAspectType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - */ - // const name = 'abc123' - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error - * response. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callDeleteAspectType() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteAspectType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAspectType(); - // [END dataplex_v1_generated_CatalogService_DeleteAspectType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js deleted file mode 100644 index a03a81cc0c4..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callDeleteEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.deleteEntry(request); - console.log(response); - } - - callDeleteEntry(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js deleted file mode 100644 index 68f864f6567..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_group.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - */ - // const name = 'abc123' - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error - * response. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callDeleteEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteEntryGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEntryGroup(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js deleted file mode 100644 index a9600d68ee9..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.delete_entry_type.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_DeleteEntryType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - */ - // const name = 'abc123' - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callDeleteEntryType() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteEntryType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEntryType(); - // [END dataplex_v1_generated_CatalogService_DeleteEntryType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js deleted file mode 100644 index d67d138832c..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_aspect_type.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_GetAspectType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callGetAspectType() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getAspectType(request); - console.log(response); - } - - callGetAspectType(); - // [END dataplex_v1_generated_CatalogService_GetAspectType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js deleted file mode 100644 index 50dff5372ff..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - */ - // const name = 'abc123' - /** - * Optional. View to control which parts of an entry the service should - * return. - */ - // const view = {} - /** - * Optional. Limits the aspects returned to the provided aspect types. - * It only works for CUSTOM view. - */ - // const aspectTypes = ['abc','def'] - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. It only works for CUSTOM view. - */ - // const paths = ['abc','def'] - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callGetEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getEntry(request); - console.log(response); - } - - callGetEntry(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js deleted file mode 100644 index 0e7f5fe333c..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_group.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callGetEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getEntryGroup(request); - console.log(response); - } - - callGetEntryGroup(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js deleted file mode 100644 index 93ca21cf3a2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_entry_type.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_CatalogService_GetEntryType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callGetEntryType() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getEntryType(request); - console.log(response); - } - - callGetEntryType(); - // [END dataplex_v1_generated_CatalogService_GetEntryType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js deleted file mode 100644 index 7984ec990c8..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_aspect_types.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 dataplex_v1_generated_CatalogService_ListAspectTypes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * AspectTypes. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListAspectTypes` must match the call that - * provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - */ - // const filter = 'abc123' - /** - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callListAspectTypes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listAspectTypesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAspectTypes(); - // [END dataplex_v1_generated_CatalogService_ListAspectTypes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js deleted file mode 100644 index 7f2bc294577..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entries.js +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - */ - // const parent = 'abc123' - /** - * Optional. Number of items to return per page. If there are remaining - * results, the service returns a next_page_token. If unspecified, the service - * returns at most 10 Entries. The maximum value is 100; values above 100 will - * be coerced to 100. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListEntries` call. Provide - * this to retrieve the subsequent page. - */ - // const pageToken = 'abc123' - /** - * Optional. A filter on the entries to return. Filters are case-sensitive. - * You can filter the request by the following fields: - * * entry_type - * * entry_source.display_name - * The comparison operators are =, !=, <, >, <=, >=. The service compares - * strings according to lexical order. - * You can use the logical operators AND, OR, NOT in the filter. - * You can use Wildcard "*", but for entry_type you need to provide the - * full project id or number. - * Example filter expressions: - * * "entry_source.display_name=AnExampleDisplayName" - * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * * "NOT entry_source.display_name=AnotherExampleDisplayName" - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callListEntries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listEntriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntries(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js deleted file mode 100644 index 594addd7df7..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_groups.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_CatalogService_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 resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryGroups. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListEntryGroups` must match the call that - * provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callListEntryGroups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listEntryGroupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntryGroups(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js deleted file mode 100644 index d6d9e6108ea..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_entry_types.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 dataplex_v1_generated_CatalogService_ListEntryTypes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provided to `ListEntryTypes` must match the call that - * provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - */ - // const filter = 'abc123' - /** - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callListEntryTypes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listEntryTypesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntryTypes(); - // [END dataplex_v1_generated_CatalogService_ListEntryTypes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js deleted file mode 100644 index 67cb293c769..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.lookup_entry.js +++ /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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entry) { - // [START dataplex_v1_generated_CatalogService_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. - */ - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - */ - // const name = 'abc123' - /** - * Optional. View to control which parts of an entry the service should - * return. - */ - // const view = {} - /** - * Optional. Limits the aspects returned to the provided aspect types. - * It only works for CUSTOM view. - */ - // const aspectTypes = ['abc','def'] - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. It only works for CUSTOM view. - */ - // const paths = ['abc','def'] - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - */ - // const entry = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callLookupEntry() { - // Construct request - const request = { - name, - entry, - }; - - // Run request - const response = await dataplexClient.lookupEntry(request); - console.log(response); - } - - callLookupEntry(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js deleted file mode 100644 index d2a3d980ded..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.search_entries.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, query) { - // [START dataplex_v1_generated_CatalogService_SearchEntries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - */ - // const name = 'abc123' - /** - * Required. The query against which entries in scope should be matched. - */ - // const query = 'abc123' - /** - * 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. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `SearchEntries` call. Provide - * this to retrieve the subsequent page. - */ - // const pageToken = 'abc123' - /** - * Optional. Specifies the ordering of results. - */ - // const orderBy = 'abc123' - /** - * Optional. The scope under which the search should be operating. It must - * either be `organizations/` or `projects/`. If it is - * unspecified, it defaults to the organization where the project provided in - * `name` is located. - */ - // const scope = 'abc123' - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callSearchEntries() { - // Construct request - const request = { - name, - query, - }; - - // Run request - const iterable = dataplexClient.searchEntriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchEntries(); - // [END dataplex_v1_generated_CatalogService_SearchEntries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js deleted file mode 100644 index 6b1e17cbce2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_aspect_type.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(aspectType, updateMask) { - // [START dataplex_v1_generated_CatalogService_UpdateAspectType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. AspectType Resource - */ - // const aspectType = {} - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callUpdateAspectType() { - // Construct request - const request = { - aspectType, - updateMask, - }; - - // Run request - const [operation] = await dataplexClient.updateAspectType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAspectType(); - // [END dataplex_v1_generated_CatalogService_UpdateAspectType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js deleted file mode 100644 index b8eb05b145e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 dataplex_v1_generated_CatalogService_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. Entry resource. - */ - // const entry = {} - /** - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * If the update_mask is empty, the service will update all modifiable fields - * present in the request. - */ - // const updateMask = {} - /** - * Optional. If set to true and the entry doesn't exist, the service will - * create it. - */ - // const allowMissing = true - /** - * Optional. If set to true and the aspect_keys specify aspect ranges, the - * service deletes any existing aspects from that range that weren't provided - * in the request. - */ - // const deleteMissingAspects = true - /** - * Optional. The map keys of the Aspects which the service should modify. It - * supports the following syntaxes: - * * `` - matches an aspect of the given type and empty - * path. - * * `@path` - matches an aspect of the given type and - * specified path. For example, to attach an aspect to a field that is - * specified by the `schema` aspect, the path should have the format - * `Schema.`. - * * `*` - matches aspects of the given type for all - * paths. - * * `*@path` - matches aspects of all types on the given path. - * The service will not remove existing aspects matching the syntax unless - * `delete_missing_aspects` is set to true. - * If this field is left empty, the service treats it as specifying - * exactly those Aspects present in the request. - */ - // const aspectKeys = ['abc','def'] - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callUpdateEntry() { - // Construct request - const request = { - entry, - }; - - // Run request - const response = await dataplexClient.updateEntry(request); - console.log(response); - } - - callUpdateEntry(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js deleted file mode 100644 index ecdf55324b0..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_group.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entryGroup, updateMask) { - // [START dataplex_v1_generated_CatalogService_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. EntryGroup Resource. - */ - // const entryGroup = {} - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Optional. The service validates the request, without performing any - * mutations. The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callUpdateEntryGroup() { - // Construct request - const request = { - entryGroup, - updateMask, - }; - - // Run request - const [operation] = await dataplexClient.updateEntryGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateEntryGroup(); - // [END dataplex_v1_generated_CatalogService_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-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js deleted file mode 100644 index 6b8ab21e781..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.update_entry_type.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entryType, updateMask) { - // [START dataplex_v1_generated_CatalogService_UpdateEntryType_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. EntryType Resource. - */ - // const entryType = {} - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Optional. The service validates the request without performing any - * mutations. The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {CatalogServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new CatalogServiceClient(); - - async function callUpdateEntryType() { - // Construct request - const request = { - entryType, - updateMask, - }; - - // Run request - const [operation] = await dataplexClient.updateEntryType(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateEntryType(); - // [END dataplex_v1_generated_CatalogService_UpdateEntryType_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js deleted file mode 100644 index 88cff8bc82e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.create_content.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, content) { - // [START dataplex_v1_generated_ContentService_CreateContent_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - */ - // const parent = 'abc123' - /** - * Required. Content resource. - */ - // const content = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callCreateContent() { - // Construct request - const request = { - parent, - content, - }; - - // Run request - const response = await dataplexClient.createContent(request); - console.log(response); - } - - callCreateContent(); - // [END dataplex_v1_generated_ContentService_CreateContent_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js deleted file mode 100644 index 832fb2ab7d2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.delete_content.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_ContentService_DeleteContent_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callDeleteContent() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.deleteContent(request); - console.log(response); - } - - callDeleteContent(); - // [END dataplex_v1_generated_ContentService_DeleteContent_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js deleted file mode 100644 index 3e9a34c6492..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_content.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_ContentService_GetContent_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - */ - // const name = 'abc123' - /** - * Optional. Specify content view to make a partial request. - */ - // const view = {} - - // Imports the Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callGetContent() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getContent(request); - console.log(response); - } - - callGetContent(); - // [END dataplex_v1_generated_ContentService_GetContent_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js deleted file mode 100644 index 11d73bf6398..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START dataplex_v1_generated_ContentService_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 Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await dataplexClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.list_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js deleted file mode 100644 index 6ca7fc6b45d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.list_content.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_ContentService_ListContent_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callListContent() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listContentAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListContent(); - // [END dataplex_v1_generated_ContentService_ListContent_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js deleted file mode 100644 index ec86722bce1..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START dataplex_v1_generated_ContentService_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 Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await dataplexClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js deleted file mode 100644 index b4c66a3da57..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START dataplex_v1_generated_ContentService_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 Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await dataplexClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END dataplex_v1_generated_ContentService_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-dataplex/v1/samples/generated/v1/content_service.update_content.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js deleted file mode 100644 index 8c3d748a88b..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/content_service.update_content.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, content) { - // [START dataplex_v1_generated_ContentService_UpdateContent_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const content = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {ContentServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new ContentServiceClient(); - - async function callUpdateContent() { - // Construct request - const request = { - updateMask, - content, - }; - - // Run request - const response = await dataplexClient.updateContent(request); - console.log(response); - } - - callUpdateContent(); - // [END dataplex_v1_generated_ContentService_UpdateContent_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js deleted file mode 100644 index a3047036d18..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.create_data_scan.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataScan, dataScanId) { - // [START dataplex_v1_generated_DataScanService_CreateDataScan_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Required. DataScan resource. - */ - // const dataScan = {} - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - */ - // const dataScanId = 'abc123' - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callCreateDataScan() { - // Construct request - const request = { - parent, - dataScan, - dataScanId, - }; - - // Run request - const [operation] = await dataplexClient.createDataScan(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataScan(); - // [END dataplex_v1_generated_DataScanService_CreateDataScan_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js deleted file mode 100644 index fdbd0d18eeb..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.delete_data_scan.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataScanService_DeleteDataScan_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callDeleteDataScan() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteDataScan(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataScan(); - // [END dataplex_v1_generated_DataScanService_DeleteDataScan_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js deleted file mode 100644 index 34f43533abb..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.generate_data_quality_rules.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require 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 must be one of the following: - * * The name of a data scan with at least one successful, completed data - * profiling job - * * The name of a successful, completed data profiling job (a data scan job - * where the job type is data profiling) - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callGenerateDataQualityRules() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.generateDataQualityRules(request); - console.log(response); - } - - callGenerateDataQualityRules(); - // [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js deleted file mode 100644 index 5a9642bc214..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataScanService_GetDataScan_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const name = 'abc123' - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - */ - // const view = {} - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callGetDataScan() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getDataScan(request); - console.log(response); - } - - callGetDataScan(); - // [END dataplex_v1_generated_DataScanService_GetDataScan_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js deleted file mode 100644 index 506a56e8e80..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.get_data_scan_job.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataScanService_GetDataScanJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const name = 'abc123' - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - */ - // const view = {} - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callGetDataScanJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getDataScanJob(request); - console.log(response); - } - - callGetDataScanJob(); - // [END dataplex_v1_generated_DataScanService_GetDataScanJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js deleted file mode 100644 index ff5e026674b..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scan_jobs.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataScanService_ListDataScanJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callListDataScanJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listDataScanJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataScanJobs(); - // [END dataplex_v1_generated_DataScanService_ListDataScanJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js deleted file mode 100644 index 9907d0d8a84..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.list_data_scans.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataScanService_ListDataScans_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callListDataScans() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listDataScansAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataScans(); - // [END dataplex_v1_generated_DataScanService_ListDataScans_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js deleted file mode 100644 index 410e2e8d15a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.run_data_scan.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataScanService_RunDataScan_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callRunDataScan() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.runDataScan(request); - console.log(response); - } - - callRunDataScan(); - // [END dataplex_v1_generated_DataScanService_RunDataScan_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js deleted file mode 100644 index a1ff3edbf48..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_scan_service.update_data_scan.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(dataScan, updateMask) { - // [START dataplex_v1_generated_DataScanService_UpdateDataScan_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - */ - // const dataScan = {} - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataScanServiceClient(); - - async function callUpdateDataScan() { - // Construct request - const request = { - dataScan, - updateMask, - }; - - // Run request - const [operation] = await dataplexClient.updateDataScan(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDataScan(); - // [END dataplex_v1_generated_DataScanService_UpdateDataScan_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js deleted file mode 100644 index ea7ed823838..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute.js +++ /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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, dataAttributeId, dataAttribute) { - // [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - */ - // const parent = 'abc123' - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - */ - // const dataAttributeId = 'abc123' - /** - * Required. DataAttribute resource. - */ - // const dataAttribute = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callCreateDataAttribute() { - // Construct request - const request = { - parent, - dataAttributeId, - dataAttribute, - }; - - // Run request - const [operation] = await dataplexClient.createDataAttribute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataAttribute(); - // [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js deleted file mode 100644 index c76700164b8..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js +++ /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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, dataAttributeBindingId, dataAttributeBinding) { - // [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - */ - // const parent = 'abc123' - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - */ - // const dataAttributeBindingId = 'abc123' - /** - * Required. DataAttributeBinding resource. - */ - // const dataAttributeBinding = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callCreateDataAttributeBinding() { - // Construct request - const request = { - parent, - dataAttributeBindingId, - dataAttributeBinding, - }; - - // Run request - const [operation] = await dataplexClient.createDataAttributeBinding(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataAttributeBinding(); - // [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js deleted file mode 100644 index 2e4cd38d232..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, dataTaxonomyId, dataTaxonomy) { - // [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - */ - // const dataTaxonomyId = 'abc123' - /** - * Required. DataTaxonomy resource. - */ - // const dataTaxonomy = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callCreateDataTaxonomy() { - // Construct request - const request = { - parent, - dataTaxonomyId, - dataTaxonomy, - }; - - // Run request - const [operation] = await dataplexClient.createDataTaxonomy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDataTaxonomy(); - // [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js deleted file mode 100644 index 2b11f86cbfc..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - */ - // const name = 'abc123' - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callDeleteDataAttribute() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteDataAttribute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataAttribute(); - // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js deleted file mode 100644 index 517371a0777..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_attribute_binding.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, etag) { - // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - */ - // const name = 'abc123' - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callDeleteDataAttributeBinding() { - // Construct request - const request = { - name, - etag, - }; - - // Run request - const [operation] = await dataplexClient.deleteDataAttributeBinding(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataAttributeBinding(); - // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js deleted file mode 100644 index 6c3827fcaeb..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - */ - // const name = 'abc123' - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callDeleteDataTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteDataTaxonomy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDataTaxonomy(); - // [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js deleted file mode 100644 index d5b719fc1d1..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callGetDataAttribute() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getDataAttribute(request); - console.log(response); - } - - callGetDataAttribute(); - // [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js deleted file mode 100644 index 9085c21f040..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_attribute_binding.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callGetDataAttributeBinding() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getDataAttributeBinding(request); - console.log(response); - } - - callGetDataAttributeBinding(); - // [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js deleted file mode 100644 index bcca5a65396..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.get_data_taxonomy.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callGetDataTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getDataTaxonomy(request); - console.log(response); - } - - callGetDataTaxonomy(); - // [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js deleted file mode 100644 index 1fa010d1e8d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attribute_bindings.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callListDataAttributeBindings() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listDataAttributeBindingsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataAttributeBindings(); - // [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js deleted file mode 100644 index 7d126c61f99..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_attributes.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callListDataAttributes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listDataAttributesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataAttributes(); - // [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js deleted file mode 100644 index cbc2328e142..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.list_data_taxonomies.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callListDataTaxonomies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listDataTaxonomiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataTaxonomies(); - // [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js deleted file mode 100644 index e881ec18650..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, dataAttribute) { - // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Only fields specified in `update_mask` are updated. - */ - // const dataAttribute = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callUpdateDataAttribute() { - // Construct request - const request = { - updateMask, - dataAttribute, - }; - - // Run request - const [operation] = await dataplexClient.updateDataAttribute(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDataAttribute(); - // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js deleted file mode 100644 index 027d4cd3b82..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, dataAttributeBinding) { - // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Only fields specified in `update_mask` are updated. - */ - // const dataAttributeBinding = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callUpdateDataAttributeBinding() { - // Construct request - const request = { - updateMask, - dataAttributeBinding, - }; - - // Run request - const [operation] = await dataplexClient.updateDataAttributeBinding(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDataAttributeBinding(); - // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js deleted file mode 100644 index 58f476aff67..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, dataTaxonomy) { - // [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Only fields specified in `update_mask` are updated. - */ - // const dataTaxonomy = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataTaxonomyServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataTaxonomyServiceClient(); - - async function callUpdateDataTaxonomy() { - // Construct request - const request = { - updateMask, - dataTaxonomy, - }; - - // Run request - const [operation] = await dataplexClient.updateDataTaxonomy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDataTaxonomy(); - // [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js deleted file mode 100644 index f04b5cc5eba..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.cancel_job.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_CancelJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCancelJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.cancelJob(request); - console.log(response); - } - - callCancelJob(); - // [END dataplex_v1_generated_DataplexService_CancelJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js deleted file mode 100644 index 3634e2ad50a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_asset.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, assetId, asset) { - // [START dataplex_v1_generated_DataplexService_CreateAsset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const parent = 'abc123' - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - */ - // const assetId = 'abc123' - /** - * Required. Asset resource. - */ - // const asset = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCreateAsset() { - // Construct request - const request = { - parent, - assetId, - asset, - }; - - // Run request - const [operation] = await dataplexClient.createAsset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAsset(); - // [END dataplex_v1_generated_DataplexService_CreateAsset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js deleted file mode 100644 index 269b372ca28..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_environment.js +++ /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 -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, environmentId, environment) { - // [START dataplex_v1_generated_DataplexService_CreateEnvironment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - */ - // const environmentId = 'abc123' - /** - * Required. Environment resource. - */ - // const environment = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCreateEnvironment() { - // Construct request - const request = { - parent, - environmentId, - environment, - }; - - // Run request - const [operation] = await dataplexClient.createEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEnvironment(); - // [END dataplex_v1_generated_DataplexService_CreateEnvironment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js deleted file mode 100644 index 8876b055350..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_lake.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, lakeId, lake) { - // [START dataplex_v1_generated_DataplexService_CreateLake_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - */ - // const lakeId = 'abc123' - /** - * Required. Lake resource - */ - // const lake = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCreateLake() { - // Construct request - const request = { - parent, - lakeId, - lake, - }; - - // Run request - const [operation] = await dataplexClient.createLake(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateLake(); - // [END dataplex_v1_generated_DataplexService_CreateLake_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js deleted file mode 100644 index 0903bf59a4f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_task.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, taskId, task) { - // [START dataplex_v1_generated_DataplexService_CreateTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Required. Task identifier. - */ - // const taskId = 'abc123' - /** - * Required. Task resource. - */ - // const task = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCreateTask() { - // Construct request - const request = { - parent, - taskId, - task, - }; - - // Run request - const [operation] = await dataplexClient.createTask(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateTask(); - // [END dataplex_v1_generated_DataplexService_CreateTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js deleted file mode 100644 index b350112fa1e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.create_zone.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, zoneId, zone) { - // [START dataplex_v1_generated_DataplexService_CreateZone_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - */ - // const zoneId = 'abc123' - /** - * Required. Zone resource. - */ - // const zone = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callCreateZone() { - // Construct request - const request = { - parent, - zoneId, - zone, - }; - - // Run request - const [operation] = await dataplexClient.createZone(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateZone(); - // [END dataplex_v1_generated_DataplexService_CreateZone_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js deleted file mode 100644 index 1ac115ecb35..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_asset.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_DeleteAsset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callDeleteAsset() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteAsset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAsset(); - // [END dataplex_v1_generated_DataplexService_DeleteAsset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js deleted file mode 100644 index 58a24f27eb2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_environment.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_DeleteEnvironment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callDeleteEnvironment() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEnvironment(); - // [END dataplex_v1_generated_DataplexService_DeleteEnvironment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js deleted file mode 100644 index 95c2e5214e2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_lake.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_DeleteLake_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callDeleteLake() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteLake(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteLake(); - // [END dataplex_v1_generated_DataplexService_DeleteLake_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js deleted file mode 100644 index 4e3571b1477..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_task.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_DeleteTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callDeleteTask() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteTask(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTask(); - // [END dataplex_v1_generated_DataplexService_DeleteTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js deleted file mode 100644 index cfba3cf2c48..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.delete_zone.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_DeleteZone_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callDeleteZone() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await dataplexClient.deleteZone(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteZone(); - // [END dataplex_v1_generated_DataplexService_DeleteZone_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js deleted file mode 100644 index df3b4531b0a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_asset.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetAsset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetAsset() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getAsset(request); - console.log(response); - } - - callGetAsset(); - // [END dataplex_v1_generated_DataplexService_GetAsset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js deleted file mode 100644 index db19c3b6d2d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_environment.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetEnvironment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetEnvironment() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getEnvironment(request); - console.log(response); - } - - callGetEnvironment(); - // [END dataplex_v1_generated_DataplexService_GetEnvironment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js deleted file mode 100644 index 83695490013..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_job.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetJob() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getJob(request); - console.log(response); - } - - callGetJob(); - // [END dataplex_v1_generated_DataplexService_GetJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js deleted file mode 100644 index 956687ba77e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_lake.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetLake_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetLake() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getLake(request); - console.log(response); - } - - callGetLake(); - // [END dataplex_v1_generated_DataplexService_GetLake_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js deleted file mode 100644 index 040e5c918b3..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_task.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetTask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getTask(request); - console.log(response); - } - - callGetTask(); - // [END dataplex_v1_generated_DataplexService_GetTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js deleted file mode 100644 index 65347857025..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.get_zone.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_GetZone_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callGetZone() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getZone(request); - console.log(response); - } - - callGetZone(); - // [END dataplex_v1_generated_DataplexService_GetZone_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js deleted file mode 100644 index 478790a848a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_asset_actions.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListAssetActions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListAssetActions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listAssetActionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAssetActions(); - // [END dataplex_v1_generated_DataplexService_ListAssetActions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js deleted file mode 100644 index 92566694726..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_assets.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListAssets_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListAssets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listAssetsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAssets(); - // [END dataplex_v1_generated_DataplexService_ListAssets_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js deleted file mode 100644 index 50f38a27114..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_environments.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListEnvironments_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListEnvironments() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listEnvironmentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEnvironments(); - // [END dataplex_v1_generated_DataplexService_ListEnvironments_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js deleted file mode 100644 index 9dce7612afb..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_jobs.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListJobs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListJobs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listJobsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListJobs(); - // [END dataplex_v1_generated_DataplexService_ListJobs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js deleted file mode 100644 index 10e0159f325..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lake_actions.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListLakeActions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListLakeActions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listLakeActionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListLakeActions(); - // [END dataplex_v1_generated_DataplexService_ListLakeActions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js deleted file mode 100644 index 99680c71e0f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_lakes.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListLakes_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListLakes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listLakesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListLakes(); - // [END dataplex_v1_generated_DataplexService_ListLakes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js deleted file mode 100644 index 6b2489fd3d2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_sessions.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListSessions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListSessions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listSessionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSessions(); - // [END dataplex_v1_generated_DataplexService_ListSessions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js deleted file mode 100644 index fce1ffe161d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_tasks.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListTasks_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListTasks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listTasksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTasks(); - // [END dataplex_v1_generated_DataplexService_ListTasks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js deleted file mode 100644 index 7e043a720db..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zone_actions.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListZoneActions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListZoneActions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listZoneActionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListZoneActions(); - // [END dataplex_v1_generated_DataplexService_ListZoneActions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js deleted file mode 100644 index 1cc0e5bf291..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.list_zones.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_DataplexService_ListZones_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter request. - */ - // const filter = 'abc123' - /** - * Optional. Order by fields for the result. - */ - // const orderBy = 'abc123' - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callListZones() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listZonesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListZones(); - // [END dataplex_v1_generated_DataplexService_ListZones_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js deleted file mode 100644 index f6167a71666..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.run_task.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_DataplexService_RunTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - */ - // const name = 'abc123' - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - */ - // const labels = [1,2,3,4] - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - */ - // const args = [1,2,3,4] - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callRunTask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.runTask(request); - console.log(response); - } - - callRunTask(); - // [END dataplex_v1_generated_DataplexService_RunTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js deleted file mode 100644 index 037a3cdb416..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_asset.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, asset) { - // [START dataplex_v1_generated_DataplexService_UpdateAsset_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const asset = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callUpdateAsset() { - // Construct request - const request = { - updateMask, - asset, - }; - - // Run request - const [operation] = await dataplexClient.updateAsset(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAsset(); - // [END dataplex_v1_generated_DataplexService_UpdateAsset_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js deleted file mode 100644 index 3aeab58822c..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_environment.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, environment) { - // [START dataplex_v1_generated_DataplexService_UpdateEnvironment_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const environment = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callUpdateEnvironment() { - // Construct request - const request = { - updateMask, - environment, - }; - - // Run request - const [operation] = await dataplexClient.updateEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateEnvironment(); - // [END dataplex_v1_generated_DataplexService_UpdateEnvironment_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js deleted file mode 100644 index dcf0b238495..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_lake.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, lake) { - // [START dataplex_v1_generated_DataplexService_UpdateLake_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const lake = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callUpdateLake() { - // Construct request - const request = { - updateMask, - lake, - }; - - // Run request - const [operation] = await dataplexClient.updateLake(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateLake(); - // [END dataplex_v1_generated_DataplexService_UpdateLake_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js deleted file mode 100644 index 17e32a7a66f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_task.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, task) { - // [START dataplex_v1_generated_DataplexService_UpdateTask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const task = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callUpdateTask() { - // Construct request - const request = { - updateMask, - task, - }; - - // Run request - const [operation] = await dataplexClient.updateTask(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateTask(); - // [END dataplex_v1_generated_DataplexService_UpdateTask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js deleted file mode 100644 index 3d2ad7a38a2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/dataplex_service.update_zone.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, zone) { - // [START dataplex_v1_generated_DataplexService_UpdateZone_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Mask of fields to update. - */ - // const updateMask = {} - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - */ - // const zone = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new DataplexServiceClient(); - - async function callUpdateZone() { - // Construct request - const request = { - updateMask, - zone, - }; - - // Run request - const [operation] = await dataplexClient.updateZone(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateZone(); - // [END dataplex_v1_generated_DataplexService_UpdateZone_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js deleted file mode 100644 index 098730ad285..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_entity.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, entity) { - // [START dataplex_v1_generated_MetadataService_CreateEntity_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const parent = 'abc123' - /** - * Required. Entity resource. - */ - // const entity = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callCreateEntity() { - // Construct request - const request = { - parent, - entity, - }; - - // Run request - const response = await dataplexClient.createEntity(request); - console.log(response); - } - - callCreateEntity(); - // [END dataplex_v1_generated_MetadataService_CreateEntity_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js deleted file mode 100644 index 3152314d87d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.create_partition.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, partition) { - // [START dataplex_v1_generated_MetadataService_CreatePartition_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - */ - // const parent = 'abc123' - /** - * Required. Partition resource. - */ - // const partition = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callCreatePartition() { - // Construct request - const request = { - parent, - partition, - }; - - // Run request - const response = await dataplexClient.createPartition(request); - console.log(response); - } - - callCreatePartition(); - // [END dataplex_v1_generated_MetadataService_CreatePartition_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js deleted file mode 100644 index 8d757a39cf9..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_entity.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, etag) { - // [START dataplex_v1_generated_MetadataService_DeleteEntity_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - */ - // const name = 'abc123' - /** - * Required. The etag associated with the entity, which can be retrieved with - * a GetEntity request. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callDeleteEntity() { - // Construct request - const request = { - name, - etag, - }; - - // Run request - const response = await dataplexClient.deleteEntity(request); - console.log(response); - } - - callDeleteEntity(); - // [END dataplex_v1_generated_MetadataService_DeleteEntity_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js deleted file mode 100644 index 115a87472c2..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.delete_partition.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_MetadataService_DeletePartition_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - */ - // const name = 'abc123' - /** - * Optional. The etag associated with the partition. - */ - // const etag = 'abc123' - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callDeletePartition() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.deletePartition(request); - console.log(response); - } - - callDeletePartition(); - // [END dataplex_v1_generated_MetadataService_DeletePartition_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js deleted file mode 100644 index 217959d5b97..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_entity.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_MetadataService_GetEntity_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - */ - // const name = 'abc123' - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - */ - // const view = {} - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callGetEntity() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getEntity(request); - console.log(response); - } - - callGetEntity(); - // [END dataplex_v1_generated_MetadataService_GetEntity_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js deleted file mode 100644 index d2d7d512b9d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.get_partition.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START dataplex_v1_generated_MetadataService_GetPartition_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - */ - // const name = 'abc123' - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callGetPartition() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await dataplexClient.getPartition(request); - console.log(response); - } - - callGetPartition(); - // [END dataplex_v1_generated_MetadataService_GetPartition_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js deleted file mode 100644 index 7a3de4ab2f5..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_entities.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, view) { - // [START dataplex_v1_generated_MetadataService_ListEntities_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - */ - // const parent = 'abc123' - /** - * Required. Specify the entity view to make a partial list request. - */ - // const view = {} - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - */ - // const pageToken = 'abc123' - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callListEntities() { - // Construct request - const request = { - parent, - view, - }; - - // Run request - const iterable = dataplexClient.listEntitiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntities(); - // [END dataplex_v1_generated_MetadataService_ListEntities_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js deleted file mode 100644 index 1f91b49e053..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.list_partitions.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START dataplex_v1_generated_MetadataService_ListPartitions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - */ - // const parent = 'abc123' - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - */ - // const pageSize = 1234 - /** - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - */ - // const filter = 'abc123' - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callListPartitions() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = dataplexClient.listPartitionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPartitions(); - // [END dataplex_v1_generated_MetadataService_ListPartitions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js deleted file mode 100644 index a1c7ce1c3ca..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/metadata_service.update_entity.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entity) { - // [START dataplex_v1_generated_MetadataService_UpdateEntity_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Update description. - */ - // const entity = {} - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - */ - // const validateOnly = true - - // Imports the Dataplex library - const {MetadataServiceClient} = require('@google-cloud/dataplex').v1; - - // Instantiates a client - const dataplexClient = new MetadataServiceClient(); - - async function callUpdateEntity() { - // Construct request - const request = { - entity, - }; - - // Run request - const response = await dataplexClient.updateEntity(request); - console.log(response); - } - - callUpdateEntity(); - // [END dataplex_v1_generated_MetadataService_UpdateEntity_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json deleted file mode 100644 index b1497dcdec6..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json +++ /dev/null @@ -1,4763 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-dataplex", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.dataplex.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryType_async", - "title": "CatalogService createEntryType Sample", - "origin": "API_DEFINITION", - "description": " Creates an EntryType.", - "canonical": true, - "file": "catalog_service.create_entry_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_type_id", - "type": "TYPE_STRING" - }, - { - "name": "entry_type", - "type": ".google.cloud.dataplex.v1.EntryType" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CreateEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryType_async", - "title": "CatalogService updateEntryType Sample", - "origin": "API_DEFINITION", - "description": " Updates an EntryType.", - "canonical": true, - "file": "catalog_service.update_entry_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", - "async": true, - "parameters": [ - { - "name": "entry_type", - "type": ".google.cloud.dataplex.v1.EntryType" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "UpdateEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryType_async", - "title": "CatalogService deleteEntryType Sample", - "origin": "API_DEFINITION", - "description": " Deletes an EntryType.", - "canonical": true, - "file": "catalog_service.delete_entry_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "DeleteEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_ListEntryTypes_async", - "title": "CatalogService listEntryTypes Sample", - "origin": "API_DEFINITION", - "description": " Lists EntryType resources in a project and location.", - "canonical": true, - "file": "catalog_service.list_entry_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntryTypes", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEntryTypesResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "ListEntryTypes", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_GetEntryType_async", - "title": "CatalogService getEntryType Sample", - "origin": "API_DEFINITION", - "description": " Gets an EntryType.", - "canonical": true, - "file": "catalog_service.get_entry_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.EntryType", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "GetEntryType", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_CreateAspectType_async", - "title": "CatalogService createAspectType Sample", - "origin": "API_DEFINITION", - "description": " Creates an AspectType.", - "canonical": true, - "file": "catalog_service.create_aspect_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "aspect_type_id", - "type": "TYPE_STRING" - }, - { - "name": "aspect_type", - "type": ".google.cloud.dataplex.v1.AspectType" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CreateAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_UpdateAspectType_async", - "title": "CatalogService updateAspectType Sample", - "origin": "API_DEFINITION", - "description": " Updates an AspectType.", - "canonical": true, - "file": "catalog_service.update_aspect_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", - "async": true, - "parameters": [ - { - "name": "aspect_type", - "type": ".google.cloud.dataplex.v1.AspectType" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "UpdateAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_DeleteAspectType_async", - "title": "CatalogService deleteAspectType Sample", - "origin": "API_DEFINITION", - "description": " Deletes an AspectType.", - "canonical": true, - "file": "catalog_service.delete_aspect_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "DeleteAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_ListAspectTypes_async", - "title": "CatalogService listAspectTypes Sample", - "origin": "API_DEFINITION", - "description": " Lists AspectType resources in a project and location.", - "canonical": true, - "file": "catalog_service.list_aspect_types.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAspectTypes", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListAspectTypesResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "ListAspectTypes", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_GetAspectType_async", - "title": "CatalogService getAspectType Sample", - "origin": "API_DEFINITION", - "description": " Gets an AspectType.", - "canonical": true, - "file": "catalog_service.get_aspect_type.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetAspectType", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.AspectType", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "GetAspectType", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetAspectType", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_async", - "title": "CatalogService createEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Creates an EntryGroup.", - "canonical": true, - "file": "catalog_service.create_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_group_id", - "type": "TYPE_STRING" - }, - { - "name": "entry_group", - "type": ".google.cloud.dataplex.v1.EntryGroup" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_async", - "title": "CatalogService updateEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Updates an EntryGroup.", - "canonical": true, - "file": "catalog_service.update_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", - "async": true, - "parameters": [ - { - "name": "entry_group", - "type": ".google.cloud.dataplex.v1.EntryGroup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_async", - "title": "CatalogService deleteEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Deletes an EntryGroup.", - "canonical": true, - "file": "catalog_service.delete_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_ListEntryGroups_async", - "title": "CatalogService listEntryGroups Sample", - "origin": "API_DEFINITION", - "description": " Lists EntryGroup resources in a project and location.", - "canonical": true, - "file": "catalog_service.list_entry_groups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEntryGroupsResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_GetEntryGroup_async", - "title": "CatalogService getEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Gets an EntryGroup.", - "canonical": true, - "file": "catalog_service.get_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.EntryGroup", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_CreateEntry_async", - "title": "CatalogService createEntry Sample", - "origin": "API_DEFINITION", - "description": " Creates an Entry.", - "canonical": true, - "file": "catalog_service.create_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntry", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_id", - "type": "TYPE_STRING" - }, - { - "name": "entry", - "type": ".google.cloud.dataplex.v1.Entry" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entry", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CreateEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateEntry", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntry_async", - "title": "CatalogService updateEntry Sample", - "origin": "API_DEFINITION", - "description": " Updates an Entry.", - "canonical": true, - "file": "catalog_service.update_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", - "async": true, - "parameters": [ - { - "name": "entry", - "type": ".google.cloud.dataplex.v1.Entry" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "delete_missing_aspects", - "type": "TYPE_BOOL" - }, - { - "name": "aspect_keys", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entry", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntry_async", - "title": "CatalogService deleteEntry Sample", - "origin": "API_DEFINITION", - "description": " Deletes an Entry.", - "canonical": true, - "file": "catalog_service.delete_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entry", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_ListEntries_async", - "title": "CatalogService listEntries Sample", - "origin": "API_DEFINITION", - "description": " Lists Entries within an EntryGroup.", - "canonical": true, - "file": "catalog_service.list_entries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 86, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntries", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntries", - "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.dataplex.v1.ListEntriesResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "ListEntries", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListEntries", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_GetEntry_async", - "title": "CatalogService getEntry Sample", - "origin": "API_DEFINITION", - "description": " Gets an Entry. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", - "canonical": true, - "file": "catalog_service.get_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.EntryView" - }, - { - "name": "aspect_types", - "type": "TYPE_STRING[]" - }, - { - "name": "paths", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entry", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "GetEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetEntry", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_LookupEntry_async", - "title": "CatalogService lookupEntry Sample", - "origin": "API_DEFINITION", - "description": " Looks up a single Entry by name using the permission on the source system. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", - "canonical": true, - "file": "catalog_service.lookup_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.LookupEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.EntryView" - }, - { - "name": "aspect_types", - "type": "TYPE_STRING[]" - }, - { - "name": "paths", - "type": "TYPE_STRING[]" - }, - { - "name": "entry", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entry", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "LookupEntry", - "fullName": "google.cloud.dataplex.v1.CatalogService.LookupEntry", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_SearchEntries_async", - "title": "CatalogService searchEntries Sample", - "origin": "API_DEFINITION", - "description": " Searches for Entries matching the given query and scope.", - "canonical": true, - "file": "catalog_service.search_entries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchEntries", - "fullName": "google.cloud.dataplex.v1.CatalogService.SearchEntries", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "scope", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.SearchEntriesResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "SearchEntries", - "fullName": "google.cloud.dataplex.v1.CatalogService.SearchEntries", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_CreateMetadataJob_async", - "title": "CatalogService createMetadataJob Sample", - "origin": "API_DEFINITION", - "description": " Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.", - "canonical": true, - "file": "catalog_service.create_metadata_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "metadata_job", - "type": ".google.cloud.dataplex.v1.MetadataJob" - }, - { - "name": "metadata_job_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CreateMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_GetMetadataJob_async", - "title": "CatalogService getMetadataJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a metadata job.", - "canonical": true, - "file": "catalog_service.get_metadata_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.MetadataJob", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "GetMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_ListMetadataJobs_async", - "title": "CatalogService listMetadataJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists metadata jobs.", - "canonical": true, - "file": "catalog_service.list_metadata_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMetadataJobs", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListMetadataJobsResponse", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "ListMetadataJobs", - "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_CatalogService_CancelMetadataJob_async", - "title": "CatalogService cancelMetadataJob Sample", - "origin": "API_DEFINITION", - "description": " Cancels a metadata job. If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.", - "canonical": true, - "file": "catalog_service.cancel_metadata_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "CatalogServiceClient", - "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" - }, - "method": { - "shortName": "CancelMetadataJob", - "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", - "service": { - "shortName": "CatalogService", - "fullName": "google.cloud.dataplex.v1.CatalogService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", - "title": "CatalogService createContent Sample", - "origin": "API_DEFINITION", - "description": " Create a content.", - "canonical": true, - "file": "content_service.create_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "content", - "type": ".google.cloud.dataplex.v1.Content" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "CreateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.CreateContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_UpdateContent_async", - "title": "CatalogService updateContent Sample", - "origin": "API_DEFINITION", - "description": " Update a content. Only supports full resource update.", - "canonical": true, - "file": "content_service.update_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "content", - "type": ".google.cloud.dataplex.v1.Content" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "UpdateContent", - "fullName": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_DeleteContent_async", - "title": "CatalogService deleteContent Sample", - "origin": "API_DEFINITION", - "description": " Delete a content.", - "canonical": true, - "file": "content_service.delete_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteContent", - "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "DeleteContent", - "fullName": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_GetContent_async", - "title": "CatalogService getContent Sample", - "origin": "API_DEFINITION", - "description": " Get a content resource.", - "canonical": true, - "file": "content_service.get_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetContent", - "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetContentRequest.ContentView" - } - ], - "resultType": ".google.cloud.dataplex.v1.Content", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "GetContent", - "fullName": "google.cloud.dataplex.v1.ContentService.GetContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_GetIamPolicy_async", - "title": "CatalogService getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a contentitem 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. Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.", - "canonical": true, - "file": "content_service.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_SetIamPolicy_async", - "title": "CatalogService setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on the specified contentitem resource. Replaces any existing policy. Caller must have Google IAM `dataplex.content.setIamPolicy` permission on the resource.", - "canonical": true, - "file": "content_service.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.dataplex.v1.ContentService.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": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_TestIamPermissions_async", - "title": "CatalogService 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 (a `NOT_FOUND` error is not returned). A caller is not required to have Google IAM permission to make this request. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "canonical": true, - "file": "content_service.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_ContentService_ListContent_async", - "title": "CatalogService listContent Sample", - "origin": "API_DEFINITION", - "description": " List content.", - "canonical": true, - "file": "content_service.list_content.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListContent", - "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", - "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.dataplex.v1.ListContentResponse", - "client": { - "shortName": "ContentServiceClient", - "fullName": "google.cloud.dataplex.v1.ContentServiceClient" - }, - "method": { - "shortName": "ListContent", - "fullName": "google.cloud.dataplex.v1.ContentService.ListContent", - "service": { - "shortName": "ContentService", - "fullName": "google.cloud.dataplex.v1.ContentService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateLake_async", - "title": "CatalogService createLake Sample", - "origin": "API_DEFINITION", - "description": " Creates a lake resource.", - "canonical": true, - "file": "dataplex_service.create_lake.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "lake_id", - "type": "TYPE_STRING" - }, - { - "name": "lake", - "type": ".google.cloud.dataplex.v1.Lake" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CreateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateLake_async", - "title": "CatalogService updateLake Sample", - "origin": "API_DEFINITION", - "description": " Updates a lake resource.", - "canonical": true, - "file": "dataplex_service.update_lake.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "lake", - "type": ".google.cloud.dataplex.v1.Lake" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "UpdateLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteLake_async", - "title": "CatalogService deleteLake Sample", - "origin": "API_DEFINITION", - "description": " Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", - "canonical": true, - "file": "dataplex_service.delete_lake.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "DeleteLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListLakes_async", - "title": "CatalogService listLakes Sample", - "origin": "API_DEFINITION", - "description": " Lists lake resources in a project and location.", - "canonical": true, - "file": "dataplex_service.list_lakes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLakes", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListLakesResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListLakes", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetLake_async", - "title": "CatalogService getLake Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a lake resource.", - "canonical": true, - "file": "dataplex_service.get_lake.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Lake", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetLake", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetLake", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListLakeActions_async", - "title": "CatalogService listLakeActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in a lake.", - "canonical": true, - "file": "dataplex_service.list_lake_actions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLakeActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListLakeActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateZone_async", - "title": "CatalogService createZone Sample", - "origin": "API_DEFINITION", - "description": " Creates a zone resource within a lake.", - "canonical": true, - "file": "dataplex_service.create_zone.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "zone_id", - "type": "TYPE_STRING" - }, - { - "name": "zone", - "type": ".google.cloud.dataplex.v1.Zone" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CreateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateZone_async", - "title": "CatalogService updateZone Sample", - "origin": "API_DEFINITION", - "description": " Updates a zone resource.", - "canonical": true, - "file": "dataplex_service.update_zone.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "zone", - "type": ".google.cloud.dataplex.v1.Zone" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "UpdateZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteZone_async", - "title": "CatalogService deleteZone Sample", - "origin": "API_DEFINITION", - "description": " Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", - "canonical": true, - "file": "dataplex_service.delete_zone.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "DeleteZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListZones_async", - "title": "CatalogService listZones Sample", - "origin": "API_DEFINITION", - "description": " Lists zone resources in a lake.", - "canonical": true, - "file": "dataplex_service.list_zones.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListZones", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListZonesResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListZones", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZones", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetZone_async", - "title": "CatalogService getZone Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a zone resource.", - "canonical": true, - "file": "dataplex_service.get_zone.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Zone", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetZone", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetZone", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListZoneActions_async", - "title": "CatalogService listZoneActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in a zone.", - "canonical": true, - "file": "dataplex_service.list_zone_actions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListZoneActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListZoneActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateAsset_async", - "title": "CatalogService createAsset Sample", - "origin": "API_DEFINITION", - "description": " Creates an asset resource.", - "canonical": true, - "file": "dataplex_service.create_asset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "asset_id", - "type": "TYPE_STRING" - }, - { - "name": "asset", - "type": ".google.cloud.dataplex.v1.Asset" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CreateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateAsset_async", - "title": "CatalogService updateAsset Sample", - "origin": "API_DEFINITION", - "description": " Updates an asset resource.", - "canonical": true, - "file": "dataplex_service.update_asset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "asset", - "type": ".google.cloud.dataplex.v1.Asset" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "UpdateAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteAsset_async", - "title": "CatalogService deleteAsset Sample", - "origin": "API_DEFINITION", - "description": " Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", - "canonical": true, - "file": "dataplex_service.delete_asset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "DeleteAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListAssets_async", - "title": "CatalogService listAssets Sample", - "origin": "API_DEFINITION", - "description": " Lists asset resources in a zone.", - "canonical": true, - "file": "dataplex_service.list_assets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAssets", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListAssetsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListAssets", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetAsset_async", - "title": "CatalogService getAsset Sample", - "origin": "API_DEFINITION", - "description": " Retrieves an asset resource.", - "canonical": true, - "file": "dataplex_service.get_asset.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Asset", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetAsset", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListAssetActions_async", - "title": "CatalogService listAssetActions Sample", - "origin": "API_DEFINITION", - "description": " Lists action resources in an asset.", - "canonical": true, - "file": "dataplex_service.list_asset_actions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAssetActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListActionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListAssetActions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateTask_async", - "title": "CatalogService createTask Sample", - "origin": "API_DEFINITION", - "description": " Creates a task resource within a lake.", - "canonical": true, - "file": "dataplex_service.create_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "task_id", - "type": "TYPE_STRING" - }, - { - "name": "task", - "type": ".google.cloud.dataplex.v1.Task" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CreateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateTask_async", - "title": "CatalogService updateTask Sample", - "origin": "API_DEFINITION", - "description": " Update the task resource.", - "canonical": true, - "file": "dataplex_service.update_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "task", - "type": ".google.cloud.dataplex.v1.Task" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "UpdateTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteTask_async", - "title": "CatalogService deleteTask Sample", - "origin": "API_DEFINITION", - "description": " Delete the task resource.", - "canonical": true, - "file": "dataplex_service.delete_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "DeleteTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListTasks_async", - "title": "CatalogService listTasks Sample", - "origin": "API_DEFINITION", - "description": " Lists tasks under the given lake.", - "canonical": true, - "file": "dataplex_service.list_tasks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTasks", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListTasksResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListTasks", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetTask_async", - "title": "CatalogService getTask Sample", - "origin": "API_DEFINITION", - "description": " Get task resource.", - "canonical": true, - "file": "dataplex_service.get_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Task", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListJobs_async", - "title": "CatalogService listJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists Jobs under the given task.", - "canonical": true, - "file": "dataplex_service.list_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListJobs", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListJobsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListJobs", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_RunTask_async", - "title": "CatalogService runTask Sample", - "origin": "API_DEFINITION", - "description": " Run an on demand execution of a Task.", - "canonical": true, - "file": "dataplex_service.run_task.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "args", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.cloud.dataplex.v1.RunTaskResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "RunTask", - "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", - "title": "CatalogService getJob Sample", - "origin": "API_DEFINITION", - "description": " Get job resource.", - "canonical": true, - "file": "dataplex_service.get_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Job", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetJob", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CancelJob_async", - "title": "CatalogService cancelJob Sample", - "origin": "API_DEFINITION", - "description": " Cancel jobs running for the task resource.", - "canonical": true, - "file": "dataplex_service.cancel_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CancelJob", - "fullName": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_CreateEnvironment_async", - "title": "CatalogService createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create an environment resource.", - "canonical": true, - "file": "dataplex_service.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment_id", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.dataplex.v1.Environment" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_async", - "title": "CatalogService updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update the environment resource.", - "canonical": true, - "file": "dataplex_service.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "environment", - "type": ".google.cloud.dataplex.v1.Environment" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_async", - "title": "CatalogService deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", - "canonical": true, - "file": "dataplex_service.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListEnvironments_async", - "title": "CatalogService listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " Lists environments under the given lake.", - "canonical": true, - "file": "dataplex_service.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEnvironmentsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_GetEnvironment_async", - "title": "CatalogService getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get environment resource.", - "canonical": true, - "file": "dataplex_service.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Environment", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataplexService_ListSessions_async", - "title": "CatalogService listSessions Sample", - "origin": "API_DEFINITION", - "description": " Lists session resources in an environment.", - "canonical": true, - "file": "dataplex_service.list_sessions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSessions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "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.dataplex.v1.ListSessionsResponse", - "client": { - "shortName": "DataplexServiceClient", - "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" - }, - "method": { - "shortName": "ListSessions", - "fullName": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "service": { - "shortName": "DataplexService", - "fullName": "google.cloud.dataplex.v1.DataplexService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_CreateDataScan_async", - "title": "CatalogService createDataScan Sample", - "origin": "API_DEFINITION", - "description": " Creates a DataScan resource.", - "canonical": true, - "file": "data_scan_service.create_data_scan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_scan", - "type": ".google.cloud.dataplex.v1.DataScan" - }, - { - "name": "data_scan_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "CreateDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_UpdateDataScan_async", - "title": "CatalogService updateDataScan Sample", - "origin": "API_DEFINITION", - "description": " Updates a DataScan resource.", - "canonical": true, - "file": "data_scan_service.update_data_scan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", - "async": true, - "parameters": [ - { - "name": "data_scan", - "type": ".google.cloud.dataplex.v1.DataScan" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "UpdateDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_DeleteDataScan_async", - "title": "CatalogService deleteDataScan Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataScan resource.", - "canonical": true, - "file": "data_scan_service.delete_data_scan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "DeleteDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_GetDataScan_async", - "title": "CatalogService getDataScan Sample", - "origin": "API_DEFINITION", - "description": " Gets a DataScan resource.", - "canonical": true, - "file": "data_scan_service.get_data_scan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView" - } - ], - "resultType": ".google.cloud.dataplex.v1.DataScan", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "GetDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_ListDataScans_async", - "title": "CatalogService listDataScans Sample", - "origin": "API_DEFINITION", - "description": " Lists DataScans.", - "canonical": true, - "file": "data_scan_service.list_data_scans.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataScans", - "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListDataScansResponse", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "ListDataScans", - "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_RunDataScan_async", - "title": "CatalogService runDataScan Sample", - "origin": "API_DEFINITION", - "description": " Runs an on-demand execution of a DataScan", - "canonical": true, - "file": "data_scan_service.run_data_scan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.RunDataScanResponse", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "RunDataScan", - "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_GetDataScanJob_async", - "title": "CatalogService getDataScanJob Sample", - "origin": "API_DEFINITION", - "description": " Gets a DataScanJob resource.", - "canonical": true, - "file": "data_scan_service.get_data_scan_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataScanJob", - "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView" - } - ], - "resultType": ".google.cloud.dataplex.v1.DataScanJob", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "GetDataScanJob", - "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_async", - "title": "CatalogService listDataScanJobs Sample", - "origin": "API_DEFINITION", - "description": " Lists DataScanJobs under the given DataScan.", - "canonical": true, - "file": "data_scan_service.list_data_scan_jobs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataScanJobs", - "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", - "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.dataplex.v1.ListDataScanJobsResponse", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "ListDataScanJobs", - "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async", - "title": "CatalogService generateDataQualityRules Sample", - "origin": "API_DEFINITION", - "description": " Generates recommended data quality rules based on the results of a data profiling scan. Use the recommendations to build rules for a data quality scan.", - "canonical": true, - "file": "data_scan_service.generate_data_quality_rules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateDataQualityRules", - "fullName": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.GenerateDataQualityRulesResponse", - "client": { - "shortName": "DataScanServiceClient", - "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" - }, - "method": { - "shortName": "GenerateDataQualityRules", - "fullName": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", - "service": { - "shortName": "DataScanService", - "fullName": "google.cloud.dataplex.v1.DataScanService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async", - "title": "CatalogService createDataTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Create a DataTaxonomy resource.", - "canonical": true, - "file": "data_taxonomy_service.create_data_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_taxonomy_id", - "type": "TYPE_STRING" - }, - { - "name": "data_taxonomy", - "type": ".google.cloud.dataplex.v1.DataTaxonomy" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "CreateDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async", - "title": "CatalogService updateDataTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Updates a DataTaxonomy resource.", - "canonical": true, - "file": "data_taxonomy_service.update_data_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_taxonomy", - "type": ".google.cloud.dataplex.v1.DataTaxonomy" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "UpdateDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async", - "title": "CatalogService deleteDataTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before the DataTaxonomy can be deleted.", - "canonical": true, - "file": "data_taxonomy_service.delete_data_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "DeleteDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async", - "title": "CatalogService listDataTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Lists DataTaxonomy resources in a project and location.", - "canonical": true, - "file": "data_taxonomy_service.list_data_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataTaxonomies", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListDataTaxonomiesResponse", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "ListDataTaxonomies", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async", - "title": "CatalogService getDataTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a DataTaxonomy resource.", - "canonical": true, - "file": "data_taxonomy_service.get_data_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.DataTaxonomy", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "GetDataTaxonomy", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async", - "title": "CatalogService createDataAttributeBinding Sample", - "origin": "API_DEFINITION", - "description": " Create a DataAttributeBinding resource.", - "canonical": true, - "file": "data_taxonomy_service.create_data_attribute_binding.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_attribute_binding_id", - "type": "TYPE_STRING" - }, - { - "name": "data_attribute_binding", - "type": ".google.cloud.dataplex.v1.DataAttributeBinding" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "CreateDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async", - "title": "CatalogService updateDataAttributeBinding Sample", - "origin": "API_DEFINITION", - "description": " Updates a DataAttributeBinding resource.", - "canonical": true, - "file": "data_taxonomy_service.update_data_attribute_binding.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_attribute_binding", - "type": ".google.cloud.dataplex.v1.DataAttributeBinding" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "UpdateDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async", - "title": "CatalogService deleteDataAttributeBinding Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be deleted before the DataAttributeBinding can be deleted.", - "canonical": true, - "file": "data_taxonomy_service.delete_data_attribute_binding.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "DeleteDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async", - "title": "CatalogService listDataAttributeBindings Sample", - "origin": "API_DEFINITION", - "description": " Lists DataAttributeBinding resources in a project and location.", - "canonical": true, - "file": "data_taxonomy_service.list_data_attribute_bindings.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataAttributeBindings", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListDataAttributeBindingsResponse", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "ListDataAttributeBindings", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async", - "title": "CatalogService getDataAttributeBinding Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a DataAttributeBinding resource.", - "canonical": true, - "file": "data_taxonomy_service.get_data_attribute_binding.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.DataAttributeBinding", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "GetDataAttributeBinding", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async", - "title": "CatalogService createDataAttribute Sample", - "origin": "API_DEFINITION", - "description": " Create a DataAttribute resource.", - "canonical": true, - "file": "data_taxonomy_service.create_data_attribute.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "data_attribute_id", - "type": "TYPE_STRING" - }, - { - "name": "data_attribute", - "type": ".google.cloud.dataplex.v1.DataAttribute" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "CreateDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async", - "title": "CatalogService updateDataAttribute Sample", - "origin": "API_DEFINITION", - "description": " Updates a DataAttribute resource.", - "canonical": true, - "file": "data_taxonomy_service.update_data_attribute.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_attribute", - "type": ".google.cloud.dataplex.v1.DataAttribute" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "UpdateDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async", - "title": "CatalogService deleteDataAttribute Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Data Attribute resource.", - "canonical": true, - "file": "data_taxonomy_service.delete_data_attribute.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "DeleteDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async", - "title": "CatalogService listDataAttributes Sample", - "origin": "API_DEFINITION", - "description": " Lists Data Attribute resources in a DataTaxonomy.", - "canonical": true, - "file": "data_taxonomy_service.list_data_attributes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataAttributes", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListDataAttributesResponse", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "ListDataAttributes", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async", - "title": "CatalogService getDataAttribute Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a Data Attribute resource.", - "canonical": true, - "file": "data_taxonomy_service.get_data_attribute.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.DataAttribute", - "client": { - "shortName": "DataTaxonomyServiceClient", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyServiceClient" - }, - "method": { - "shortName": "GetDataAttribute", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", - "service": { - "shortName": "DataTaxonomyService", - "fullName": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", - "title": "CatalogService createEntity Sample", - "origin": "API_DEFINITION", - "description": " Create a metadata entity.", - "canonical": true, - "file": "metadata_service.create_entity.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entity", - "type": ".google.cloud.dataplex.v1.Entity" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_UpdateEntity_async", - "title": "CatalogService updateEntity Sample", - "origin": "API_DEFINITION", - "description": " Update a metadata entity. Only supports full resource update.", - "canonical": true, - "file": "metadata_service.update_entity.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "async": true, - "parameters": [ - { - "name": "entity", - "type": ".google.cloud.dataplex.v1.Entity" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "UpdateEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_DeleteEntity_async", - "title": "CatalogService deleteEntity Sample", - "origin": "API_DEFINITION", - "description": " Delete a metadata entity.", - "canonical": true, - "file": "metadata_service.delete_entity.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeleteEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_GetEntity_async", - "title": "CatalogService getEntity Sample", - "origin": "API_DEFINITION", - "description": " Get a metadata entity.", - "canonical": true, - "file": "metadata_service.get_entity.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.GetEntityRequest.EntityView" - } - ], - "resultType": ".google.cloud.dataplex.v1.Entity", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetEntity", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_ListEntities_async", - "title": "CatalogService listEntities Sample", - "origin": "API_DEFINITION", - "description": " List metadata entities in a zone.", - "canonical": true, - "file": "metadata_service.list_entities.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntities", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.ListEntitiesResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListEntities", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_CreatePartition_async", - "title": "CatalogService createPartition Sample", - "origin": "API_DEFINITION", - "description": " Create a metadata partition.", - "canonical": true, - "file": "metadata_service.create_partition.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "partition", - "type": ".google.cloud.dataplex.v1.Partition" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.dataplex.v1.Partition", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "CreatePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_DeletePartition_async", - "title": "CatalogService deletePartition Sample", - "origin": "API_DEFINITION", - "description": " Delete a metadata partition.", - "canonical": true, - "file": "metadata_service.delete_partition.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "DeletePartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_GetPartition_async", - "title": "CatalogService getPartition Sample", - "origin": "API_DEFINITION", - "description": " Get a metadata partition of an entity.", - "canonical": true, - "file": "metadata_service.get_partition.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.dataplex.v1.Partition", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "GetPartition", - "fullName": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - }, - { - "regionTag": "dataplex_v1_generated_MetadataService_ListPartitions_async", - "title": "CatalogService listPartitions Sample", - "origin": "API_DEFINITION", - "description": " List metadata partitions of an entity.", - "canonical": true, - "file": "metadata_service.list_partitions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPartitions", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "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.dataplex.v1.ListPartitionsResponse", - "client": { - "shortName": "MetadataServiceClient", - "fullName": "google.cloud.dataplex.v1.MetadataServiceClient" - }, - "method": { - "shortName": "ListPartitions", - "fullName": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "service": { - "shortName": "MetadataService", - "fullName": "google.cloud.dataplex.v1.MetadataService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts deleted file mode 100644 index 500f50c7e11..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -const CatalogServiceClient = v1.CatalogServiceClient; -type CatalogServiceClient = v1.CatalogServiceClient; -const ContentServiceClient = v1.ContentServiceClient; -type ContentServiceClient = v1.ContentServiceClient; -const DataplexServiceClient = v1.DataplexServiceClient; -type DataplexServiceClient = v1.DataplexServiceClient; -const DataScanServiceClient = v1.DataScanServiceClient; -type DataScanServiceClient = v1.DataScanServiceClient; -const DataTaxonomyServiceClient = v1.DataTaxonomyServiceClient; -type DataTaxonomyServiceClient = v1.DataTaxonomyServiceClient; -const MetadataServiceClient = v1.MetadataServiceClient; -type MetadataServiceClient = v1.MetadataServiceClient; -export {v1, CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient}; -export default {v1, CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts deleted file mode 100644 index ce0489240a4..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client.ts +++ /dev/null @@ -1,5390 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/catalog_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './catalog_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The primary resources offered by this service are EntryGroups, EntryTypes, - * AspectTypes, and Entries. They collectively let data administrators organize, - * manage, secure, and catalog data located across cloud projects in their - * organization in a variety of storage systems, including Cloud Storage and - * BigQuery. - * @class - * @memberof v1 - */ -export class CatalogServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - catalogServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of CatalogServiceClient. - * - * @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 CatalogServiceClient({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 CatalogServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listEntryTypes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entryTypes'), - listAspectTypes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'aspectTypes'), - listEntryGroups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entryGroups'), - listEntries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entries'), - searchEntries: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'), - listMetadataJobs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'metadataJobs') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createEntryTypeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.EntryType') as gax.protobuf.Type; - const createEntryTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateEntryTypeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.EntryType') as gax.protobuf.Type; - const updateEntryTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteEntryTypeResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteEntryTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createAspectTypeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.AspectType') as gax.protobuf.Type; - const createAspectTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateAspectTypeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.AspectType') as gax.protobuf.Type; - const updateAspectTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAspectTypeResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAspectTypeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createEntryGroupResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.EntryGroup') as gax.protobuf.Type; - const createEntryGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateEntryGroupResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.EntryGroup') as gax.protobuf.Type; - const updateEntryGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteEntryGroupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteEntryGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createMetadataJobResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.MetadataJob') as gax.protobuf.Type; - const createMetadataJobMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createEntryType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createEntryTypeResponse.decode.bind(createEntryTypeResponse), - createEntryTypeMetadata.decode.bind(createEntryTypeMetadata)), - updateEntryType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateEntryTypeResponse.decode.bind(updateEntryTypeResponse), - updateEntryTypeMetadata.decode.bind(updateEntryTypeMetadata)), - deleteEntryType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteEntryTypeResponse.decode.bind(deleteEntryTypeResponse), - deleteEntryTypeMetadata.decode.bind(deleteEntryTypeMetadata)), - createAspectType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAspectTypeResponse.decode.bind(createAspectTypeResponse), - createAspectTypeMetadata.decode.bind(createAspectTypeMetadata)), - updateAspectType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAspectTypeResponse.decode.bind(updateAspectTypeResponse), - updateAspectTypeMetadata.decode.bind(updateAspectTypeMetadata)), - deleteAspectType: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAspectTypeResponse.decode.bind(deleteAspectTypeResponse), - deleteAspectTypeMetadata.decode.bind(deleteAspectTypeMetadata)), - createEntryGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createEntryGroupResponse.decode.bind(createEntryGroupResponse), - createEntryGroupMetadata.decode.bind(createEntryGroupMetadata)), - updateEntryGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateEntryGroupResponse.decode.bind(updateEntryGroupResponse), - updateEntryGroupMetadata.decode.bind(updateEntryGroupMetadata)), - deleteEntryGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteEntryGroupResponse.decode.bind(deleteEntryGroupResponse), - deleteEntryGroupMetadata.decode.bind(deleteEntryGroupMetadata)), - createMetadataJob: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createMetadataJobResponse.decode.bind(createMetadataJobResponse), - createMetadataJobMetadata.decode.bind(createMetadataJobMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.CatalogService', 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.catalogServiceStub) { - return this.catalogServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.CatalogService. - this.catalogServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.CatalogService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.CatalogService, - 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 catalogServiceStubMethods = - ['createEntryType', 'updateEntryType', 'deleteEntryType', 'listEntryTypes', 'getEntryType', 'createAspectType', 'updateAspectType', 'deleteAspectType', 'listAspectTypes', 'getAspectType', 'createEntryGroup', 'updateEntryGroup', 'deleteEntryGroup', 'listEntryGroups', 'getEntryGroup', 'createEntry', 'updateEntry', 'deleteEntry', 'listEntries', 'getEntry', 'lookupEntry', 'searchEntries', 'createMetadataJob', 'getMetadataJob', 'listMetadataJobs', 'cancelMetadataJob']; - for (const methodName of catalogServiceStubMethods) { - const callPromise = this.catalogServiceStub.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.catalogServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Gets an EntryType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_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.dataplex.v1.EntryType|EntryType}. - * Please see the {@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/catalog_service.get_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_GetEntryType_async - */ - getEntryType( - request?: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|undefined, {}|undefined - ]>; - getEntryType( - request: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, - {}|null|undefined>): void; - getEntryType( - request: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, - {}|null|undefined>): void; - getEntryType( - request?: protos.google.cloud.dataplex.v1.IGetEntryTypeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryType, - protos.google.cloud.dataplex.v1.IGetEntryTypeRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getEntryType(request, options, callback); - } -/** - * Gets an AspectType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_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.dataplex.v1.AspectType|AspectType}. - * Please see the {@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/catalog_service.get_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_GetAspectType_async - */ - getAspectType( - request?: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|undefined, {}|undefined - ]>; - getAspectType( - request: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, - {}|null|undefined>): void; - getAspectType( - request: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, - {}|null|undefined>): void; - getAspectType( - request?: protos.google.cloud.dataplex.v1.IGetAspectTypeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IAspectType, - protos.google.cloud.dataplex.v1.IGetAspectTypeRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getAspectType(request, options, callback); - } -/** - * Gets an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.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/catalog_service.get_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_GetEntryGroup_async - */ - getEntryGroup( - request?: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|undefined, {}|undefined - ]>; - getEntryGroup( - request: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, - {}|null|undefined>): void; - getEntryGroup( - request: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, - {}|null|undefined>): void; - getEntryGroup( - request?: protos.google.cloud.dataplex.v1.IGetEntryGroupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.v1.IGetEntryGroupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryGroup, - protos.google.cloud.dataplex.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); - } -/** - * Creates an Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param {string} request.entryId - * Required. Entry identifier. It has to be unique within an Entry Group. - * - * Entries corresponding to Google Cloud resources use an Entry ID format - * based on [full resource - * names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a full resource name of the resource without the - * prefix double slashes in the API service name part of the full resource - * name. This allows retrieval of entries using their associated resource - * name. - * - * For example, if the full resource name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * - * It is also suggested to follow the same convention for entries - * corresponding to resources from providers or systems other than Google - * Cloud. - * - * The maximum size of the field is 4000 characters. - * @param {google.cloud.dataplex.v1.Entry} request.entry - * Required. Entry resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.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/catalog_service.create_entry.js - * region_tag:dataplex_v1_generated_CatalogService_CreateEntry_async - */ - createEntry( - request?: protos.google.cloud.dataplex.v1.ICreateEntryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ICreateEntryRequest|undefined, {}|undefined - ]>; - createEntry( - request: protos.google.cloud.dataplex.v1.ICreateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, - {}|null|undefined>): void; - createEntry( - request: protos.google.cloud.dataplex.v1.ICreateEntryRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, - {}|null|undefined>): void; - createEntry( - request?: protos.google.cloud.dataplex.v1.ICreateEntryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ICreateEntryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.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 Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.Entry} request.entry - * Required. Entry resource. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * - * If the update_mask is empty, the service will update all modifiable fields - * present in the request. - * @param {boolean} [request.allowMissing] - * Optional. If set to true and the entry doesn't exist, the service will - * create it. - * @param {boolean} [request.deleteMissingAspects] - * Optional. If set to true and the aspect_keys specify aspect ranges, the - * service deletes any existing aspects from that range that weren't provided - * in the request. - * @param {string[]} [request.aspectKeys] - * Optional. The map keys of the Aspects which the service should modify. It - * supports the following syntaxes: - * - * * `` - matches an aspect of the given type and empty - * path. - * * `@path` - matches an aspect of the given type and - * specified path. For example, to attach an aspect to a field that is - * specified by the `schema` aspect, the path should have the format - * `Schema.`. - * * `*` - matches aspects of the given type for all - * paths. - * * `*@path` - matches aspects of all types on the given path. - * - * The service will not remove existing aspects matching the syntax unless - * `delete_missing_aspects` is set to true. - * - * If this field is left empty, the service treats it as specifying - * exactly those Aspects present in the 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 an object representing {@link protos.google.cloud.dataplex.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/catalog_service.update_entry.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateEntry_async - */ - updateEntry( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IUpdateEntryRequest|undefined, {}|undefined - ]>; - updateEntry( - request: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, - {}|null|undefined>): void; - updateEntry( - request: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, - {}|null|undefined>): void; - updateEntry( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IUpdateEntryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.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 Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.delete_entry.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteEntry_async - */ - deleteEntry( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IDeleteEntryRequest|undefined, {}|undefined - ]>; - deleteEntry( - request: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, - {}|null|undefined>): void; - deleteEntry( - request: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, - {}|null|undefined>): void; - deleteEntry( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IDeleteEntryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.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. - * - * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is - * changing. For more information, see [Changes to BigQuery metadata stored in - * Dataplex - * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param {google.cloud.dataplex.v1.EntryView} [request.view] - * Optional. View to control which parts of an entry the service should - * return. - * @param {string[]} [request.aspectTypes] - * Optional. Limits the aspects returned to the provided aspect types. - * It only works for CUSTOM view. - * @param {string[]} [request.paths] - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. It only works for CUSTOM view. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.get_entry.js - * region_tag:dataplex_v1_generated_CatalogService_GetEntry_async - */ - getEntry( - request?: protos.google.cloud.dataplex.v1.IGetEntryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IGetEntryRequest|undefined, {}|undefined - ]>; - getEntry( - request: protos.google.cloud.dataplex.v1.IGetEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, - {}|null|undefined>): void; - getEntry( - request: protos.google.cloud.dataplex.v1.IGetEntryRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, - {}|null|undefined>): void; - getEntry( - request?: protos.google.cloud.dataplex.v1.IGetEntryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.IGetEntryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.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); - } -/** - * Looks up a single Entry by name using the permission on the source system. - * - * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is - * changing. For more information, see [Changes to BigQuery metadata stored in - * Dataplex - * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param {google.cloud.dataplex.v1.EntryView} [request.view] - * Optional. View to control which parts of an entry the service should - * return. - * @param {string[]} [request.aspectTypes] - * Optional. Limits the aspects returned to the provided aspect types. - * It only works for CUSTOM view. - * @param {string[]} [request.paths] - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. It only works for CUSTOM view. - * @param {string} request.entry - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.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/catalog_service.lookup_entry.js - * region_tag:dataplex_v1_generated_CatalogService_LookupEntry_async - */ - lookupEntry( - request?: protos.google.cloud.dataplex.v1.ILookupEntryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ILookupEntryRequest|undefined, {}|undefined - ]>; - lookupEntry( - request: protos.google.cloud.dataplex.v1.ILookupEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, - {}|null|undefined>): void; - lookupEntry( - request: protos.google.cloud.dataplex.v1.ILookupEntryRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, - {}|null|undefined>): void; - lookupEntry( - request?: protos.google.cloud.dataplex.v1.ILookupEntryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.v1.ILookupEntryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry, - protos.google.cloud.dataplex.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 || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.lookupEntry(request, options, callback); - } -/** - * Gets a metadata job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the metadata job, in the format - * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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.dataplex.v1.MetadataJob|MetadataJob}. - * Please see the {@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/catalog_service.get_metadata_job.js - * region_tag:dataplex_v1_generated_CatalogService_GetMetadataJob_async - */ - getMetadataJob( - request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|undefined, {}|undefined - ]>; - getMetadataJob( - request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, - {}|null|undefined>): void; - getMetadataJob( - request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, - {}|null|undefined>): void; - getMetadataJob( - request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IMetadataJob, - protos.google.cloud.dataplex.v1.IGetMetadataJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getMetadataJob(request, options, callback); - } -/** - * Cancels a metadata job. - * - * If you cancel a metadata import job that is in progress, the changes in the - * job might be partially applied. We recommend that you reset the state of - * the entry groups in your project by running another metadata job that - * reverts the changes from the canceled job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the job, in the format - * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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/v1/catalog_service.cancel_metadata_job.js - * region_tag:dataplex_v1_generated_CatalogService_CancelMetadataJob_async - */ - cancelMetadataJob( - request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|undefined, {}|undefined - ]>; - cancelMetadataJob( - request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, - {}|null|undefined>): void; - cancelMetadataJob( - request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, - {}|null|undefined>): void; - cancelMetadataJob( - request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.cancelMetadataJob(request, options, callback); - } - -/** - * Creates an EntryType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a Google Cloud region. - * @param {string} request.entryTypeId - * Required. EntryType identifier. - * @param {google.cloud.dataplex.v1.EntryType} request.entryType - * Required. EntryType Resource. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.create_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_CreateEntryType_async - */ - createEntryType( - request?: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createEntryType( - request: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEntryType( - request: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEntryType( - request?: protos.google.cloud.dataplex.v1.ICreateEntryTypeRequest, - 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.createEntryType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createEntryType()`. - * @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/catalog_service.create_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_CreateEntryType_async - */ - async checkCreateEntryTypeProgress(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.createEntryType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an EntryType. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.EntryType} request.entryType - * Required. EntryType Resource. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.update_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryType_async - */ - updateEntryType( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateEntryType( - request: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEntryType( - request: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEntryType( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryTypeRequest, - 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({ - 'entry_type.name': request.entryType!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntryType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateEntryType()`. - * @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/catalog_service.update_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryType_async - */ - async checkUpdateEntryTypeProgress(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.updateEntryType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes an EntryType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * @param {string} [request.etag] - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is 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/catalog_service.delete_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryType_async - */ - deleteEntryType( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteEntryType( - request: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEntryType( - request: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEntryType( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryTypeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteEntryType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteEntryType()`. - * @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/catalog_service.delete_entry_type.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryType_async - */ - async checkDeleteEntryTypeProgress(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.deleteEntryType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates an AspectType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a Google Cloud region. - * @param {string} request.aspectTypeId - * Required. AspectType identifier. - * @param {google.cloud.dataplex.v1.AspectType} request.aspectType - * Required. AspectType Resource. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.create_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_CreateAspectType_async - */ - createAspectType( - request?: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAspectType( - request: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAspectType( - request: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAspectType( - request?: protos.google.cloud.dataplex.v1.ICreateAspectTypeRequest, - 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.createAspectType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAspectType()`. - * @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/catalog_service.create_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_CreateAspectType_async - */ - async checkCreateAspectTypeProgress(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.createAspectType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an AspectType. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.AspectType} request.aspectType - * Required. AspectType Resource - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.update_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateAspectType_async - */ - updateAspectType( - request?: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAspectType( - request: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAspectType( - request: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAspectType( - request?: protos.google.cloud.dataplex.v1.IUpdateAspectTypeRequest, - 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({ - 'aspect_type.name': request.aspectType!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAspectType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAspectType()`. - * @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/catalog_service.update_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateAspectType_async - */ - async checkUpdateAspectTypeProgress(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.updateAspectType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes an AspectType. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * @param {string} [request.etag] - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error - * response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is 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/catalog_service.delete_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteAspectType_async - */ - deleteAspectType( - request?: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAspectType( - request: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAspectType( - request: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAspectType( - request?: protos.google.cloud.dataplex.v1.IDeleteAspectTypeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteAspectType(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAspectType()`. - * @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/catalog_service.delete_aspect_type.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteAspectType_async - */ - async checkDeleteAspectTypeProgress(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.deleteAspectType, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {string} request.entryGroupId - * Required. EntryGroup identifier. - * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup - * Required. EntryGroup Resource. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.create_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_CreateEntryGroup_async - */ - createEntryGroup( - request?: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createEntryGroup( - request: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEntryGroup( - request: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEntryGroup( - request?: protos.google.cloud.dataplex.v1.ICreateEntryGroupRequest, - 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.createEntryGroup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createEntryGroup()`. - * @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/catalog_service.create_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_CreateEntryGroup_async - */ - async checkCreateEntryGroupProgress(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.createEntryGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup - * Required. EntryGroup Resource. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request, without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.update_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryGroup_async - */ - updateEntryGroup( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateEntryGroup( - request: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEntryGroup( - request: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEntryGroup( - request?: protos.google.cloud.dataplex.v1.IUpdateEntryGroupRequest, - 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({ - 'entry_group.name': request.entryGroup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntryGroup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateEntryGroup()`. - * @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/catalog_service.update_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_UpdateEntryGroup_async - */ - async checkUpdateEntryGroupProgress(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.updateEntryGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * @param {string} [request.etag] - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error - * response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is 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/catalog_service.delete_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryGroup_async - */ - deleteEntryGroup( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteEntryGroup( - request: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEntryGroup( - request: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEntryGroup( - request?: protos.google.cloud.dataplex.v1.IDeleteEntryGroupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteEntryGroup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteEntryGroup()`. - * @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/catalog_service.delete_entry_group.js - * region_tag:dataplex_v1_generated_CatalogService_DeleteEntryGroup_async - */ - async checkDeleteEntryGroupProgress(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.deleteEntryGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a metadata job. For example, use a metadata job to import Dataplex - * Catalog entries and aspects from a third-party system into Dataplex. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent location, in the format - * `projects/{project_id_or_number}/locations/{location_id}` - * @param {google.cloud.dataplex.v1.MetadataJob} request.metadataJob - * Required. The metadata job resource. - * @param {string} [request.metadataJobId] - * Optional. The metadata job ID. If not provided, a unique ID is generated - * with the prefix `metadata-job-`. - * @param {boolean} [request.validateOnly] - * Optional. The service validates the request without performing any - * mutations. The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/catalog_service.create_metadata_job.js - * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async - */ - createMetadataJob( - request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createMetadataJob( - request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createMetadataJob( - request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createMetadataJob( - request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, - 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.createMetadataJob(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createMetadataJob()`. - * @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/catalog_service.create_metadata_job.js - * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async - */ - async checkCreateMetadataJobProgress(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.createMetadataJob, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists EntryType resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provided to `ListEntryTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.EntryType|EntryType}. - * 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 `listEntryTypesAsync()` - * 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. - */ - listEntryTypes( - request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryType[], - protos.google.cloud.dataplex.v1.IListEntryTypesRequest|null, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse - ]>; - listEntryTypes( - request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryType>): void; - listEntryTypes( - request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryType>): void; - listEntryTypes( - request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryType>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryType>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryType[], - protos.google.cloud.dataplex.v1.IListEntryTypesRequest|null, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listEntryTypes(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 resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provided to `ListEntryTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.EntryType|EntryType} 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 `listEntryTypesAsync()` - * 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. - */ - listEntryTypesStream( - request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - 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['listEntryTypes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryTypes.createStream( - this.innerApiCalls.listEntryTypes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEntryTypes`, 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 resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provided to `ListEntryTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.EntryType|EntryType}. 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/catalog_service.list_entry_types.js - * region_tag:dataplex_v1_generated_CatalogService_ListEntryTypes_async - */ - listEntryTypesAsync( - request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - 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['listEntryTypes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryTypes.asyncIterate( - this.innerApiCalls['listEntryTypes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists AspectType resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * AspectTypes. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListAspectTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.AspectType|AspectType}. - * 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 `listAspectTypesAsync()` - * 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. - */ - listAspectTypes( - request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAspectType[], - protos.google.cloud.dataplex.v1.IListAspectTypesRequest|null, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse - ]>; - listAspectTypes( - request: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAspectType>): void; - listAspectTypes( - request: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAspectType>): void; - listAspectTypes( - request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAspectType>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAspectType>): - Promise<[ - protos.google.cloud.dataplex.v1.IAspectType[], - protos.google.cloud.dataplex.v1.IListAspectTypesRequest|null, - protos.google.cloud.dataplex.v1.IListAspectTypesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listAspectTypes(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 resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * AspectTypes. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListAspectTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.AspectType|AspectType} 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 `listAspectTypesAsync()` - * 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. - */ - listAspectTypesStream( - request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - 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['listAspectTypes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAspectTypes.createStream( - this.innerApiCalls.listAspectTypes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAspectTypes`, 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 resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * AspectTypes. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListAspectTypes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * labels.key1 = "value1" - * * labels:key1 - * * name = "value" - * - * These restrictions can be conjoined with AND, OR, and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Orders the result by `name` or `create_time` fields. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.AspectType|AspectType}. 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/catalog_service.list_aspect_types.js - * region_tag:dataplex_v1_generated_CatalogService_ListAspectTypes_async - */ - listAspectTypesAsync( - request?: protos.google.cloud.dataplex.v1.IListAspectTypesRequest, - 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['listAspectTypes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAspectTypes.asyncIterate( - this.innerApiCalls['listAspectTypes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists EntryGroup resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryGroups. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListEntryGroups` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.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.dataplex.v1.IListEntryGroupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryGroup[], - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest|null, - protos.google.cloud.dataplex.v1.IListEntryGroupsResponse - ]>; - listEntryGroups( - request: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryGroup>): void; - listEntryGroups( - request: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryGroup>): void; - listEntryGroups( - request?: protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryGroup>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest, - protos.google.cloud.dataplex.v1.IListEntryGroupsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntryGroup>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntryGroup[], - protos.google.cloud.dataplex.v1.IListEntryGroupsRequest|null, - protos.google.cloud.dataplex.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 resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryGroups. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListEntryGroups` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.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.dataplex.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 resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a Google Cloud region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, the service returns at most 10 - * EntryGroups. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters you provide to `ListEntryGroups` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.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/catalog_service.list_entry_groups.js - * region_tag:dataplex_v1_generated_CatalogService_ListEntryGroups_async - */ - listEntryGroupsAsync( - request?: protos.google.cloud.dataplex.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 within an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param {number} [request.pageSize] - * Optional. Number of items to return per page. If there are remaining - * results, the service returns a next_page_token. If unspecified, the service - * returns at most 10 Entries. The maximum value is 100; values above 100 will - * be coerced to 100. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.filter] - * Optional. A filter on the entries to return. Filters are case-sensitive. - * You can filter the request by the following fields: - * - * * entry_type - * * entry_source.display_name - * - * The comparison operators are =, !=, <, >, <=, >=. The service compares - * strings according to lexical order. - * - * You can use the logical operators AND, OR, NOT in the filter. - * - * You can use Wildcard "*", but for entry_type you need to provide the - * full project id or number. - * - * Example filter expressions: - * - * * "entry_source.display_name=AnExampleDisplayName" - * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * * "NOT entry_source.display_name=AnotherExampleDisplayName" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.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.dataplex.v1.IListEntriesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry[], - protos.google.cloud.dataplex.v1.IListEntriesRequest|null, - protos.google.cloud.dataplex.v1.IListEntriesResponse - ]>; - listEntries( - request: protos.google.cloud.dataplex.v1.IListEntriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntriesRequest, - protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntry>): void; - listEntries( - request: protos.google.cloud.dataplex.v1.IListEntriesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntriesRequest, - protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntry>): void; - listEntries( - request?: protos.google.cloud.dataplex.v1.IListEntriesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntriesRequest, - protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntry>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntriesRequest, - protos.google.cloud.dataplex.v1.IListEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntry>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntry[], - protos.google.cloud.dataplex.v1.IListEntriesRequest|null, - protos.google.cloud.dataplex.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 resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param {number} [request.pageSize] - * Optional. Number of items to return per page. If there are remaining - * results, the service returns a next_page_token. If unspecified, the service - * returns at most 10 Entries. The maximum value is 100; values above 100 will - * be coerced to 100. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.filter] - * Optional. A filter on the entries to return. Filters are case-sensitive. - * You can filter the request by the following fields: - * - * * entry_type - * * entry_source.display_name - * - * The comparison operators are =, !=, <, >, <=, >=. The service compares - * strings according to lexical order. - * - * You can use the logical operators AND, OR, NOT in the filter. - * - * You can use Wildcard "*", but for entry_type you need to provide the - * full project id or number. - * - * Example filter expressions: - * - * * "entry_source.display_name=AnExampleDisplayName" - * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * * "NOT entry_source.display_name=AnotherExampleDisplayName" - * @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.dataplex.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.dataplex.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 resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param {number} [request.pageSize] - * Optional. Number of items to return per page. If there are remaining - * results, the service returns a next_page_token. If unspecified, the service - * returns at most 10 Entries. The maximum value is 100; values above 100 will - * be coerced to 100. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.filter] - * Optional. A filter on the entries to return. Filters are case-sensitive. - * You can filter the request by the following fields: - * - * * entry_type - * * entry_source.display_name - * - * The comparison operators are =, !=, <, >, <=, >=. The service compares - * strings according to lexical order. - * - * You can use the logical operators AND, OR, NOT in the filter. - * - * You can use Wildcard "*", but for entry_type you need to provide the - * full project id or number. - * - * Example filter expressions: - * - * * "entry_source.display_name=AnExampleDisplayName" - * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * * "NOT entry_source.display_name=AnotherExampleDisplayName" - * @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.dataplex.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/catalog_service.list_entries.js - * region_tag:dataplex_v1_generated_CatalogService_ListEntries_async - */ - listEntriesAsync( - request?: protos.google.cloud.dataplex.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; - } - /** - * Searches for Entries matching the given query and scope. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param {string} request.query - * Required. The query against which entries in scope should be matched. - * @param {number} [request.pageSize] - * 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. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `SearchEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.orderBy] - * Optional. Specifies the ordering of results. - * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. It must - * either be `organizations/` or `projects/`. If it is - * unspecified, it defaults to the organization where the project provided in - * `name` is located. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.SearchEntriesResult|SearchEntriesResult}. - * 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 `searchEntriesAsync()` - * 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. - */ - searchEntries( - request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ISearchEntriesResult[], - protos.google.cloud.dataplex.v1.ISearchEntriesRequest|null, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse - ]>; - searchEntries( - request: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISearchEntriesResult>): void; - searchEntries( - request: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISearchEntriesResult>): void; - searchEntries( - request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISearchEntriesResult>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISearchEntriesResult>): - Promise<[ - protos.google.cloud.dataplex.v1.ISearchEntriesResult[], - protos.google.cloud.dataplex.v1.ISearchEntriesRequest|null, - protos.google.cloud.dataplex.v1.ISearchEntriesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.searchEntries(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.name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param {string} request.query - * Required. The query against which entries in scope should be matched. - * @param {number} [request.pageSize] - * 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. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `SearchEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.orderBy] - * Optional. Specifies the ordering of results. - * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. It must - * either be `organizations/` or `projects/`. If it is - * unspecified, it defaults to the organization where the project provided in - * `name` is located. - * @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.dataplex.v1.SearchEntriesResult|SearchEntriesResult} 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 `searchEntriesAsync()` - * 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. - */ - searchEntriesStream( - request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['searchEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchEntries.createStream( - this.innerApiCalls.searchEntries as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `searchEntries`, 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.name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param {string} request.query - * Required. The query against which entries in scope should be matched. - * @param {number} [request.pageSize] - * 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. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `SearchEntries` call. Provide - * this to retrieve the subsequent page. - * @param {string} [request.orderBy] - * Optional. Specifies the ordering of results. - * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. It must - * either be `organizations/` or `projects/`. If it is - * unspecified, it defaults to the organization where the project provided in - * `name` is located. - * @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.dataplex.v1.SearchEntriesResult|SearchEntriesResult}. 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/catalog_service.search_entries.js - * region_tag:dataplex_v1_generated_CatalogService_SearchEntries_async - */ - searchEntriesAsync( - request?: protos.google.cloud.dataplex.v1.ISearchEntriesRequest, - 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({ - 'name': request.name ?? '', - }); - const defaultCallSettings = this._defaults['searchEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchEntries.asyncIterate( - this.innerApiCalls['searchEntries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists metadata jobs. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent location, in the format - * `projects/{project_id_or_number}/locations/{location_id}` - * @param {number} [request.pageSize] - * Optional. The maximum number of metadata jobs to return. The service might - * return fewer jobs than this value. If unspecified, at most 10 jobs are - * returned. The maximum value is 1,000. - * @param {string} [request.pageToken] - * Optional. The page token received from a previous `ListMetadataJobs` call. - * Provide this token to retrieve the subsequent page of results. When - * paginating, all other parameters that are provided to the - * `ListMetadataJobs` request must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * `labels.key1 = "value1"` - * * `labels:key1` - * * `name = "value"` - * - * You can combine filters with `AND`, `OR`, and `NOT` operators. - * @param {string} [request.orderBy] - * Optional. The field to sort the results by, either `name` or `create_time`. - * If not specified, the ordering is undefined. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.MetadataJob|MetadataJob}. - * 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 `listMetadataJobsAsync()` - * 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. - */ - listMetadataJobs( - request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IMetadataJob[], - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest|null, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse - ]>; - listMetadataJobs( - request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IMetadataJob>): void; - listMetadataJobs( - request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IMetadataJob>): void; - listMetadataJobs( - request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IMetadataJob>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IMetadataJob>): - Promise<[ - protos.google.cloud.dataplex.v1.IMetadataJob[], - protos.google.cloud.dataplex.v1.IListMetadataJobsRequest|null, - protos.google.cloud.dataplex.v1.IListMetadataJobsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listMetadataJobs(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 resource name of the parent location, in the format - * `projects/{project_id_or_number}/locations/{location_id}` - * @param {number} [request.pageSize] - * Optional. The maximum number of metadata jobs to return. The service might - * return fewer jobs than this value. If unspecified, at most 10 jobs are - * returned. The maximum value is 1,000. - * @param {string} [request.pageToken] - * Optional. The page token received from a previous `ListMetadataJobs` call. - * Provide this token to retrieve the subsequent page of results. When - * paginating, all other parameters that are provided to the - * `ListMetadataJobs` request must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * `labels.key1 = "value1"` - * * `labels:key1` - * * `name = "value"` - * - * You can combine filters with `AND`, `OR`, and `NOT` operators. - * @param {string} [request.orderBy] - * Optional. The field to sort the results by, either `name` or `create_time`. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.MetadataJob|MetadataJob} 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 `listMetadataJobsAsync()` - * 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. - */ - listMetadataJobsStream( - request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - 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['listMetadataJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listMetadataJobs.createStream( - this.innerApiCalls.listMetadataJobs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listMetadataJobs`, 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 resource name of the parent location, in the format - * `projects/{project_id_or_number}/locations/{location_id}` - * @param {number} [request.pageSize] - * Optional. The maximum number of metadata jobs to return. The service might - * return fewer jobs than this value. If unspecified, at most 10 jobs are - * returned. The maximum value is 1,000. - * @param {string} [request.pageToken] - * Optional. The page token received from a previous `ListMetadataJobs` call. - * Provide this token to retrieve the subsequent page of results. When - * paginating, all other parameters that are provided to the - * `ListMetadataJobs` request must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The service supports the following formats: - * - * * `labels.key1 = "value1"` - * * `labels:key1` - * * `name = "value"` - * - * You can combine filters with `AND`, `OR`, and `NOT` operators. - * @param {string} [request.orderBy] - * Optional. The field to sort the results by, either `name` or `create_time`. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.MetadataJob|MetadataJob}. 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/catalog_service.list_metadata_jobs.js - * region_tag:dataplex_v1_generated_CatalogService_ListMetadataJobs_async - */ - listMetadataJobsAsync( - request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, - 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['listMetadataJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listMetadataJobs.asyncIterate( - this.innerApiCalls['listMetadataJobs'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * 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 metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.catalogServiceStub && !this._terminated) { - return this.catalogServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json deleted file mode 100644 index 4d0adc34635..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_client_config.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.CatalogService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "resource_exhausted_unavailable": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateEntryType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntryType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntryType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEntryTypes": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetEntryType": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateAspectType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAspectType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAspectType": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListAspectTypes": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetAspectType": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEntryGroups": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEntries": { - "timeout_millis": 20000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetEntry": { - "timeout_millis": 20000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "LookupEntry": { - "timeout_millis": 20000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "SearchEntries": { - "timeout_millis": 60000, - "retry_codes_name": "resource_exhausted_unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateMetadataJob": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetMetadataJob": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListMetadataJobs": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CancelMetadataJob": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/catalog_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts deleted file mode 100644 index 82719a249c3..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client.ts +++ /dev/null @@ -1,2911 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/content_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './content_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * ContentService manages Notebook and SQL Scripts for Dataplex. - * @class - * @memberof v1 - */ -export class ContentServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - contentServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ContentServiceClient. - * - * @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 ContentServiceClient({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 ContentServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listContent: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'content') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - - this.descriptors.longrunning = { - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.ContentService', 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.contentServiceStub) { - return this.contentServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.ContentService. - this.contentServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.ContentService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.ContentService, - 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 contentServiceStubMethods = - ['createContent', 'updateContent', 'deleteContent', 'getContent', 'getIamPolicy', 'setIamPolicy', 'testIamPermissions', 'listContent']; - for (const methodName of contentServiceStubMethods) { - const callPromise = this.contentServiceStub.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.contentServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Create a content. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param {google.cloud.dataplex.v1.Content} request.content - * Required. Content resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. - * Please see the {@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/content_service.create_content.js - * region_tag:dataplex_v1_generated_ContentService_CreateContent_async - */ - createContent( - request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|undefined, {}|undefined - ]>; - createContent( - request: protos.google.cloud.dataplex.v1.ICreateContentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, - {}|null|undefined>): void; - createContent( - request: protos.google.cloud.dataplex.v1.ICreateContentRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, - {}|null|undefined>): void; - createContent( - request?: protos.google.cloud.dataplex.v1.ICreateContentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.ICreateContentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.createContent(request, options, callback); - } -/** - * Update a content. Only supports full resource update. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Content} request.content - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. - * Please see the {@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/content_service.update_content.js - * region_tag:dataplex_v1_generated_ContentService_UpdateContent_async - */ - updateContent( - request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|undefined, {}|undefined - ]>; - updateContent( - request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, - {}|null|undefined>): void; - updateContent( - request: protos.google.cloud.dataplex.v1.IUpdateContentRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, - {}|null|undefined>): void; - updateContent( - request?: protos.google.cloud.dataplex.v1.IUpdateContentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IUpdateContentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'content.name': request.content!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateContent(request, options, callback); - } -/** - * Delete a content. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_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/v1/content_service.delete_content.js - * region_tag:dataplex_v1_generated_ContentService_DeleteContent_async - */ - deleteContent( - request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|undefined, {}|undefined - ]>; - deleteContent( - request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, - {}|null|undefined>): void; - deleteContent( - request: protos.google.cloud.dataplex.v1.IDeleteContentRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, - {}|null|undefined>): void; - deleteContent( - request?: protos.google.cloud.dataplex.v1.IDeleteContentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteContentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.deleteContent(request, options, callback); - } -/** - * Get a content resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @param {google.cloud.dataplex.v1.GetContentRequest.ContentView} [request.view] - * Optional. Specify content view to make a partial 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 an object representing {@link protos.google.cloud.dataplex.v1.Content|Content}. - * Please see the {@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/content_service.get_content.js - * region_tag:dataplex_v1_generated_ContentService_GetContent_async - */ - getContent( - request?: protos.google.cloud.dataplex.v1.IGetContentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|undefined, {}|undefined - ]>; - getContent( - request: protos.google.cloud.dataplex.v1.IGetContentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, - {}|null|undefined>): void; - getContent( - request: protos.google.cloud.dataplex.v1.IGetContentRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, - {}|null|undefined>): void; - getContent( - request?: protos.google.cloud.dataplex.v1.IGetContentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IContent, - protos.google.cloud.dataplex.v1.IGetContentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getContent(request, options, callback); - } -/** - * Gets the access control policy for a contentitem 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. - * - * Caller must have Google IAM `dataplex.content.getIamPolicy` permission - * on the resource. - * - * @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/content_service.get_iam_policy.js - * region_tag:dataplex_v1_generated_ContentService_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 access control policy on the specified contentitem resource. - * Replaces any existing policy. - * - * Caller must have Google IAM `dataplex.content.setIamPolicy` permission - * on the resource. - * - * @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/content_service.set_iam_policy.js - * region_tag:dataplex_v1_generated_ContentService_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 caller's permissions on a resource. - * If the resource does not exist, an empty set of - * permissions is returned (a `NOT_FOUND` error is not returned). - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [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/content_service.test_iam_permissions.js - * region_tag:dataplex_v1_generated_ContentService_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); - } - - /** - * List content. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Content|Content}. - * 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 `listContentAsync()` - * 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. - */ - listContent( - request?: protos.google.cloud.dataplex.v1.IListContentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IContent[], - protos.google.cloud.dataplex.v1.IListContentRequest|null, - protos.google.cloud.dataplex.v1.IListContentResponse - ]>; - listContent( - request: protos.google.cloud.dataplex.v1.IListContentRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListContentRequest, - protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, - protos.google.cloud.dataplex.v1.IContent>): void; - listContent( - request: protos.google.cloud.dataplex.v1.IListContentRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListContentRequest, - protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, - protos.google.cloud.dataplex.v1.IContent>): void; - listContent( - request?: protos.google.cloud.dataplex.v1.IListContentRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListContentRequest, - protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, - protos.google.cloud.dataplex.v1.IContent>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListContentRequest, - protos.google.cloud.dataplex.v1.IListContentResponse|null|undefined, - protos.google.cloud.dataplex.v1.IContent>): - Promise<[ - protos.google.cloud.dataplex.v1.IContent[], - protos.google.cloud.dataplex.v1.IListContentRequest|null, - protos.google.cloud.dataplex.v1.IListContentResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listContent(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 resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @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.dataplex.v1.Content|Content} 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 `listContentAsync()` - * 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. - */ - listContentStream( - request?: protos.google.cloud.dataplex.v1.IListContentRequest, - 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['listContent']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listContent.createStream( - this.innerApiCalls.listContent as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listContent`, 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 resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @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.dataplex.v1.Content|Content}. 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/content_service.list_content.js - * region_tag:dataplex_v1_generated_ContentService_ListContent_async - */ - listContentAsync( - request?: protos.google.cloud.dataplex.v1.IListContentRequest, - 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['listContent']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listContent.asyncIterate( - this.innerApiCalls['listContent'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * Return a fully-qualified metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.contentServiceStub && !this._terminated) { - return this.contentServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json deleted file mode 100644 index 2f8dc65d04f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_client_config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.ContentService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateContent": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateContent": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteContent": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetContent": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListContent": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/content_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts deleted file mode 100644 index 5138db58007..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client.ts +++ /dev/null @@ -1,3271 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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_scan_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './data_scan_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * DataScanService manages DataScan resources which can be configured to run - * various types of data scanning workload and generate enriched metadata (e.g. - * Data Profile, Data Quality) for the data source. - * @class - * @memberof v1 - */ -export class DataScanServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - dataScanServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DataScanServiceClient. - * - * @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 DataScanServiceClient({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 DataScanServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listDataScans: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataScans'), - listDataScanJobs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataScanJobs') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createDataScanResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataScan') as gax.protobuf.Type; - const createDataScanMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataScanResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataScan') as gax.protobuf.Type; - const updateDataScanMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDataScanResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteDataScanMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createDataScan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDataScanResponse.decode.bind(createDataScanResponse), - createDataScanMetadata.decode.bind(createDataScanMetadata)), - updateDataScan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataScanResponse.decode.bind(updateDataScanResponse), - updateDataScanMetadata.decode.bind(updateDataScanMetadata)), - deleteDataScan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDataScanResponse.decode.bind(deleteDataScanResponse), - deleteDataScanMetadata.decode.bind(deleteDataScanMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.DataScanService', 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.dataScanServiceStub) { - return this.dataScanServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.DataScanService. - this.dataScanServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataScanService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.DataScanService, - 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 dataScanServiceStubMethods = - ['createDataScan', 'updateDataScan', 'deleteDataScan', 'getDataScan', 'listDataScans', 'runDataScan', 'getDataScanJob', 'listDataScanJobs', 'generateDataQualityRules']; - for (const methodName of dataScanServiceStubMethods) { - const callPromise = this.dataScanServiceStub.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.dataScanServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Gets a DataScan resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} [request.view] - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.DataScan|DataScan}. - * Please see the {@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_scan_service.get_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_GetDataScan_async - */ - getDataScan( - request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|undefined, {}|undefined - ]>; - getDataScan( - request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, - {}|null|undefined>): void; - getDataScan( - request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, - {}|null|undefined>): void; - getDataScan( - request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScan, - protos.google.cloud.dataplex.v1.IGetDataScanRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getDataScan(request, options, callback); - } -/** - * Runs an on-demand execution of a DataScan - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Only **OnDemand** data scans are 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.dataplex.v1.RunDataScanResponse|RunDataScanResponse}. - * Please see the {@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_scan_service.run_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_RunDataScan_async - */ - runDataScan( - request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|undefined, {}|undefined - ]>; - runDataScan( - request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, - {}|null|undefined>): void; - runDataScan( - request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, - {}|null|undefined>): void; - runDataScan( - request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IRunDataScanResponse, - protos.google.cloud.dataplex.v1.IRunDataScanRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.runDataScan(request, options, callback); - } -/** - * Gets a DataScanJob resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} [request.view] - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.DataScanJob|DataScanJob}. - * Please see the {@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_scan_service.get_data_scan_job.js - * region_tag:dataplex_v1_generated_DataScanService_GetDataScanJob_async - */ - getDataScanJob( - request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|undefined, {}|undefined - ]>; - getDataScanJob( - request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, - {}|null|undefined>): void; - getDataScanJob( - request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, - {}|null|undefined>): void; - getDataScanJob( - request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScanJob, - protos.google.cloud.dataplex.v1.IGetDataScanJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getDataScanJob(request, options, callback); - } -/** - * Generates recommended data quality rules based on the results of a data - * profiling scan. - * - * Use the recommendations to build rules for a data quality scan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name must be one of the following: - * - * * The name of a data scan with at least one successful, completed data - * profiling job - * * The name of a successful, completed data profiling job (a data scan job - * where the job type is data profiling) - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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.dataplex.v1.GenerateDataQualityRulesResponse|GenerateDataQualityRulesResponse}. - * Please see the {@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_scan_service.generate_data_quality_rules.js - * region_tag:dataplex_v1_generated_DataScanService_GenerateDataQualityRules_async - */ - generateDataQualityRules( - request?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|undefined, {}|undefined - ]>; - generateDataQualityRules( - request: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, - {}|null|undefined>): void; - generateDataQualityRules( - request: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, - {}|null|undefined>): void; - generateDataQualityRules( - request?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse, - protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.generateDataQualityRules(request, options, callback); - } - -/** - * Creates a DataScan resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {google.cloud.dataplex.v1.DataScan} request.dataScan - * Required. DataScan resource. - * @param {string} request.dataScanId - * Required. DataScan identifier. - * - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_scan_service.create_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async - */ - createDataScan( - request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDataScan( - request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataScan( - request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataScan( - request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, - 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.createDataScan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createDataScan()`. - * @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_scan_service.create_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async - */ - async checkCreateDataScanProgress(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.createDataScan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a DataScan resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.DataScan} request.dataScan - * Required. DataScan resource to be updated. - * - * Only fields specified in `update_mask` are updated. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_scan_service.update_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async - */ - updateDataScan( - request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataScan( - request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataScan( - request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataScan( - request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, - 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({ - 'data_scan.name': request.dataScan!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataScan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataScan()`. - * @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_scan_service.update_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async - */ - async checkUpdateDataScanProgress(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.updateDataScan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a DataScan resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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_scan_service.delete_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async - */ - deleteDataScan( - request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDataScan( - request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataScan( - request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataScan( - request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteDataScan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteDataScan()`. - * @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_scan_service.delete_data_scan.js - * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async - */ - async checkDeleteDataScanProgress(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.deleteDataScan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists DataScans. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataScan|DataScan}. - * 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 `listDataScansAsync()` - * 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. - */ - listDataScans( - request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScan[], - protos.google.cloud.dataplex.v1.IListDataScansRequest|null, - protos.google.cloud.dataplex.v1.IListDataScansResponse - ]>; - listDataScans( - request: protos.google.cloud.dataplex.v1.IListDataScansRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScansRequest, - protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScan>): void; - listDataScans( - request: protos.google.cloud.dataplex.v1.IListDataScansRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScansRequest, - protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScan>): void; - listDataScans( - request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScansRequest, - protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScan>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScansRequest, - protos.google.cloud.dataplex.v1.IListDataScansResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScan>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScan[], - protos.google.cloud.dataplex.v1.IListDataScansRequest|null, - protos.google.cloud.dataplex.v1.IListDataScansResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDataScans(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 resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.DataScan|DataScan} 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 `listDataScansAsync()` - * 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. - */ - listDataScansStream( - request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, - 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['listDataScans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataScans.createStream( - this.innerApiCalls.listDataScans as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataScans`, 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 resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @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.dataplex.v1.DataScan|DataScan}. 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_scan_service.list_data_scans.js - * region_tag:dataplex_v1_generated_DataScanService_ListDataScans_async - */ - listDataScansAsync( - request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, - 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['listDataScans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataScans.asyncIterate( - this.innerApiCalls['listDataScans'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists DataScanJobs under the given DataScan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * - * Allowed fields are: - * - * - `start_time` - * - `end_time` - * - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataScanJob|DataScanJob}. - * 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 `listDataScanJobsAsync()` - * 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. - */ - listDataScanJobs( - request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScanJob[], - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest|null, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse - ]>; - listDataScanJobs( - request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScanJob>): void; - listDataScanJobs( - request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScanJob>): void; - listDataScanJobs( - request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScanJob>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataScanJob>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataScanJob[], - protos.google.cloud.dataplex.v1.IListDataScanJobsRequest|null, - protos.google.cloud.dataplex.v1.IListDataScanJobsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDataScanJobs(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 resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * - * Allowed fields are: - * - * - `start_time` - * - `end_time` - * - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * @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.dataplex.v1.DataScanJob|DataScanJob} 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 `listDataScanJobsAsync()` - * 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. - */ - listDataScanJobsStream( - request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - 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['listDataScanJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataScanJobs.createStream( - this.innerApiCalls.listDataScanJobs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataScanJobs`, 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 resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * - * Allowed fields are: - * - * - `start_time` - * - `end_time` - * - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * @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.dataplex.v1.DataScanJob|DataScanJob}. 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_scan_service.list_data_scan_jobs.js - * region_tag:dataplex_v1_generated_DataScanService_ListDataScanJobs_async - */ - listDataScanJobsAsync( - request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, - 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['listDataScanJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataScanJobs.asyncIterate( - this.innerApiCalls['listDataScanJobs'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * 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 metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.dataScanServiceStub && !this._terminated) { - return this.dataScanServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json deleted file mode 100644 index 7b3caf2548d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_client_config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataScanService": { - "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": { - "CreateDataScan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDataScan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDataScan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDataScan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataScans": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RunDataScan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDataScanJob": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataScanJobs": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateDataQualityRules": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_scan_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts deleted file mode 100644 index f02ca8047dc..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client.ts +++ /dev/null @@ -1,3974 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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_taxonomy_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './data_taxonomy_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * DataTaxonomyService enables attribute-based governance. The resources - * currently offered include DataTaxonomy and DataAttribute. - * @class - * @memberof v1 - */ -export class DataTaxonomyServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - dataTaxonomyServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DataTaxonomyServiceClient. - * - * @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 DataTaxonomyServiceClient({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 DataTaxonomyServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listDataTaxonomies: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataTaxonomies'), - listDataAttributeBindings: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAttributeBindings'), - listDataAttributes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataAttributes') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createDataTaxonomyResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataTaxonomy') as gax.protobuf.Type; - const createDataTaxonomyMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataTaxonomyResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataTaxonomy') as gax.protobuf.Type; - const updateDataTaxonomyMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDataTaxonomyResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteDataTaxonomyMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createDataAttributeBindingResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataAttributeBinding') as gax.protobuf.Type; - const createDataAttributeBindingMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataAttributeBindingResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataAttributeBinding') as gax.protobuf.Type; - const updateDataAttributeBindingMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDataAttributeBindingResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteDataAttributeBindingMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createDataAttributeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataAttribute') as gax.protobuf.Type; - const createDataAttributeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataAttributeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.DataAttribute') as gax.protobuf.Type; - const updateDataAttributeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDataAttributeResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteDataAttributeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createDataTaxonomy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDataTaxonomyResponse.decode.bind(createDataTaxonomyResponse), - createDataTaxonomyMetadata.decode.bind(createDataTaxonomyMetadata)), - updateDataTaxonomy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataTaxonomyResponse.decode.bind(updateDataTaxonomyResponse), - updateDataTaxonomyMetadata.decode.bind(updateDataTaxonomyMetadata)), - deleteDataTaxonomy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDataTaxonomyResponse.decode.bind(deleteDataTaxonomyResponse), - deleteDataTaxonomyMetadata.decode.bind(deleteDataTaxonomyMetadata)), - createDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDataAttributeBindingResponse.decode.bind(createDataAttributeBindingResponse), - createDataAttributeBindingMetadata.decode.bind(createDataAttributeBindingMetadata)), - updateDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataAttributeBindingResponse.decode.bind(updateDataAttributeBindingResponse), - updateDataAttributeBindingMetadata.decode.bind(updateDataAttributeBindingMetadata)), - deleteDataAttributeBinding: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDataAttributeBindingResponse.decode.bind(deleteDataAttributeBindingResponse), - deleteDataAttributeBindingMetadata.decode.bind(deleteDataAttributeBindingMetadata)), - createDataAttribute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDataAttributeResponse.decode.bind(createDataAttributeResponse), - createDataAttributeMetadata.decode.bind(createDataAttributeMetadata)), - updateDataAttribute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataAttributeResponse.decode.bind(updateDataAttributeResponse), - updateDataAttributeMetadata.decode.bind(updateDataAttributeMetadata)), - deleteDataAttribute: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDataAttributeResponse.decode.bind(deleteDataAttributeResponse), - deleteDataAttributeMetadata.decode.bind(deleteDataAttributeMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.DataTaxonomyService', 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.dataTaxonomyServiceStub) { - return this.dataTaxonomyServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.DataTaxonomyService. - this.dataTaxonomyServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataTaxonomyService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.DataTaxonomyService, - 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 dataTaxonomyServiceStubMethods = - ['createDataTaxonomy', 'updateDataTaxonomy', 'deleteDataTaxonomy', 'listDataTaxonomies', 'getDataTaxonomy', 'createDataAttributeBinding', 'updateDataAttributeBinding', 'deleteDataAttributeBinding', 'listDataAttributeBindings', 'getDataAttributeBinding', 'createDataAttribute', 'updateDataAttribute', 'deleteDataAttribute', 'listDataAttributes', 'getDataAttribute']; - for (const methodName of dataTaxonomyServiceStubMethods) { - const callPromise = this.dataTaxonomyServiceStub.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.dataTaxonomyServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Retrieves a DataTaxonomy resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_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.dataplex.v1.DataTaxonomy|DataTaxonomy}. - * Please see the {@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_taxonomy_service.get_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async - */ - getDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|undefined, {}|undefined - ]>; - getDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, - {}|null|undefined>): void; - getDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, - {}|null|undefined>): void; - getDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataTaxonomy, - protos.google.cloud.dataplex.v1.IGetDataTaxonomyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getDataTaxonomy(request, options, callback); - } -/** - * Retrieves a DataAttributeBinding resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. - * Please see the {@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_taxonomy_service.get_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async - */ - getDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|undefined, {}|undefined - ]>; - getDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, - {}|null|undefined>): void; - getDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, - {}|null|undefined>): void; - getDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttributeBinding, - protos.google.cloud.dataplex.v1.IGetDataAttributeBindingRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getDataAttributeBinding(request, options, callback); - } -/** - * Retrieves a Data Attribute resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_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.dataplex.v1.DataAttribute|DataAttribute}. - * Please see the {@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_taxonomy_service.get_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async - */ - getDataAttribute( - request?: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|undefined, {}|undefined - ]>; - getDataAttribute( - request: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, - {}|null|undefined>): void; - getDataAttribute( - request: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, - {}|null|undefined>): void; - getDataAttribute( - request?: protos.google.cloud.dataplex.v1.IGetDataAttributeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttribute, - protos.google.cloud.dataplex.v1.IGetDataAttributeRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getDataAttribute(request, options, callback); - } - -/** - * Create a DataTaxonomy resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {string} request.dataTaxonomyId - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * @param {google.cloud.dataplex.v1.DataTaxonomy} request.dataTaxonomy - * Required. DataTaxonomy resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.create_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async - */ - createDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDataTaxonomy( - request: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataTaxonomy( - request: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.ICreateDataTaxonomyRequest, - 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.createDataTaxonomy(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createDataTaxonomy()`. - * @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_taxonomy_service.create_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async - */ - async checkCreateDataTaxonomyProgress(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.createDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a DataTaxonomy resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.DataTaxonomy} request.dataTaxonomy - * Required. Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.update_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async - */ - updateDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IUpdateDataTaxonomyRequest, - 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({ - 'data_taxonomy.name': request.dataTaxonomy!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataTaxonomy(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataTaxonomy()`. - * @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_taxonomy_service.update_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async - */ - async checkUpdateDataTaxonomyProgress(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.updateDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - * must be deleted before the DataTaxonomy can be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param {string} [request.etag] - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.delete_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async - */ - deleteDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataTaxonomy( - request: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataTaxonomy( - request?: protos.google.cloud.dataplex.v1.IDeleteDataTaxonomyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteDataTaxonomy(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteDataTaxonomy()`. - * @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_taxonomy_service.delete_data_taxonomy.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async - */ - async checkDeleteDataTaxonomyProgress(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.deleteDataTaxonomy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a DataAttributeBinding resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * @param {string} request.dataAttributeBindingId - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * @param {google.cloud.dataplex.v1.DataAttributeBinding} request.dataAttributeBinding - * Required. DataAttributeBinding resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.create_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async - */ - createDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeBindingRequest, - 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.createDataAttributeBinding(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createDataAttributeBinding()`. - * @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_taxonomy_service.create_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async - */ - async checkCreateDataAttributeBindingProgress(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.createDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a DataAttributeBinding resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.DataAttributeBinding} request.dataAttributeBinding - * Required. Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.update_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async - */ - updateDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeBindingRequest, - 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({ - 'data_attribute_binding.name': request.dataAttributeBinding!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataAttributeBinding(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataAttributeBinding()`. - * @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_taxonomy_service.update_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async - */ - async checkUpdateDataAttributeBindingProgress(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.updateDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a DataAttributeBinding resource. All attributes within the - * DataAttributeBinding must be deleted before the DataAttributeBinding can be - * deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @param {string} request.etag - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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_taxonomy_service.delete_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async - */ - deleteDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataAttributeBinding( - request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataAttributeBinding( - request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeBindingRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteDataAttributeBinding(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteDataAttributeBinding()`. - * @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_taxonomy_service.delete_data_attribute_binding.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async - */ - async checkDeleteDataAttributeBindingProgress(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.deleteDataAttributeBinding, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a DataAttribute resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param {string} request.dataAttributeId - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * @param {google.cloud.dataplex.v1.DataAttribute} request.dataAttribute - * Required. DataAttribute resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.create_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async - */ - createDataAttribute( - request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDataAttribute( - request: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataAttribute( - request: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDataAttribute( - request?: protos.google.cloud.dataplex.v1.ICreateDataAttributeRequest, - 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.createDataAttribute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createDataAttribute()`. - * @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_taxonomy_service.create_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async - */ - async checkCreateDataAttributeProgress(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.createDataAttribute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a DataAttribute resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.DataAttribute} request.dataAttribute - * Required. Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/data_taxonomy_service.update_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async - */ - updateDataAttribute( - request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataAttribute( - request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataAttribute( - request: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataAttribute( - request?: protos.google.cloud.dataplex.v1.IUpdateDataAttributeRequest, - 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({ - 'data_attribute.name': request.dataAttribute!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataAttribute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataAttribute()`. - * @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_taxonomy_service.update_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async - */ - async checkUpdateDataAttributeProgress(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.updateDataAttribute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a Data Attribute resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @param {string} [request.etag] - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is 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_taxonomy_service.delete_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async - */ - deleteDataAttribute( - request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDataAttribute( - request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataAttribute( - request: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDataAttribute( - request?: protos.google.cloud.dataplex.v1.IDeleteDataAttributeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteDataAttribute(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteDataAttribute()`. - * @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_taxonomy_service.delete_data_attribute.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async - */ - async checkDeleteDataAttributeProgress(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.deleteDataAttribute, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists DataTaxonomy resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataTaxonomy|DataTaxonomy}. - * 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 `listDataTaxonomiesAsync()` - * 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. - */ - listDataTaxonomies( - request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataTaxonomy[], - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest|null, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse - ]>; - listDataTaxonomies( - request: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataTaxonomy>): void; - listDataTaxonomies( - request: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataTaxonomy>): void; - listDataTaxonomies( - request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataTaxonomy>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataTaxonomy>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataTaxonomy[], - protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest|null, - protos.google.cloud.dataplex.v1.IListDataTaxonomiesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDataTaxonomies(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 resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataTaxonomy|DataTaxonomy} 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 `listDataTaxonomiesAsync()` - * 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. - */ - listDataTaxonomiesStream( - request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - 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['listDataTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataTaxonomies.createStream( - this.innerApiCalls.listDataTaxonomies as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataTaxonomies`, 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 resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataTaxonomy|DataTaxonomy}. 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_taxonomy_service.list_data_taxonomies.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async - */ - listDataTaxonomiesAsync( - request?: protos.google.cloud.dataplex.v1.IListDataTaxonomiesRequest, - 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['listDataTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataTaxonomies.asyncIterate( - this.innerApiCalls['listDataTaxonomies'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists DataAttributeBinding resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. - * 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 `listDataAttributeBindingsAsync()` - * 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. - */ - listDataAttributeBindings( - request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttributeBinding[], - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest|null, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse - ]>; - listDataAttributeBindings( - request: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttributeBinding>): void; - listDataAttributeBindings( - request: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttributeBinding>): void; - listDataAttributeBindings( - request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttributeBinding>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttributeBinding>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttributeBinding[], - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest|null, - protos.google.cloud.dataplex.v1.IListDataAttributeBindingsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDataAttributeBindings(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 resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataAttributeBinding|DataAttributeBinding} 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 `listDataAttributeBindingsAsync()` - * 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. - */ - listDataAttributeBindingsStream( - request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - 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['listDataAttributeBindings']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataAttributeBindings.createStream( - this.innerApiCalls.listDataAttributeBindings as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataAttributeBindings`, 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 resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataAttributeBinding|DataAttributeBinding}. 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_taxonomy_service.list_data_attribute_bindings.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async - */ - listDataAttributeBindingsAsync( - request?: protos.google.cloud.dataplex.v1.IListDataAttributeBindingsRequest, - 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['listDataAttributeBindings']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataAttributeBindings.asyncIterate( - this.innerApiCalls['listDataAttributeBindings'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Data Attribute resources in a DataTaxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.DataAttribute|DataAttribute}. - * 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 `listDataAttributesAsync()` - * 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. - */ - listDataAttributes( - request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttribute[], - protos.google.cloud.dataplex.v1.IListDataAttributesRequest|null, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse - ]>; - listDataAttributes( - request: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttribute>): void; - listDataAttributes( - request: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttribute>): void; - listDataAttributes( - request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttribute>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IDataAttribute>): - Promise<[ - protos.google.cloud.dataplex.v1.IDataAttribute[], - protos.google.cloud.dataplex.v1.IListDataAttributesRequest|null, - protos.google.cloud.dataplex.v1.IListDataAttributesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDataAttributes(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 resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataAttribute|DataAttribute} 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 `listDataAttributesAsync()` - * 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. - */ - listDataAttributesStream( - request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - 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['listDataAttributes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataAttributes.createStream( - this.innerApiCalls.listDataAttributes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataAttributes`, 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 resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param {number} [request.pageSize] - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.DataAttribute|DataAttribute}. 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_taxonomy_service.list_data_attributes.js - * region_tag:dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async - */ - listDataAttributesAsync( - request?: protos.google.cloud.dataplex.v1.IListDataAttributesRequest, - 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['listDataAttributes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataAttributes.asyncIterate( - this.innerApiCalls['listDataAttributes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * 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 metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.dataTaxonomyServiceStub && !this._terminated) { - return this.dataTaxonomyServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json deleted file mode 100644 index 27640f6111a..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_client_config.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataTaxonomyService": { - "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": { - "CreateDataTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDataTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDataTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataTaxonomies": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDataTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateDataAttributeBinding": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDataAttributeBinding": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDataAttributeBinding": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataAttributeBindings": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDataAttributeBinding": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateDataAttribute": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDataAttribute": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDataAttribute": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataAttributes": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetDataAttribute": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/data_taxonomy_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts deleted file mode 100644 index 9b7d3ed8a21..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client.ts +++ /dev/null @@ -1,6322 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/dataplex_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './dataplex_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Dataplex service provides data lakes as a service. The primary resources - * offered by this service are Lakes, Zones and Assets which collectively allow - * a data administrator to organize, manage, secure and catalog data across - * their organization located across cloud projects in a variety of storage - * systems including Cloud Storage and BigQuery. - * @class - * @memberof v1 - */ -export class DataplexServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - dataplexServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DataplexServiceClient. - * - * @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 DataplexServiceClient({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 DataplexServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listLakes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'lakes'), - listLakeActions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), - listZones: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'zones'), - listZoneActions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), - listAssets: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'assets'), - listAssetActions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'actions'), - listTasks: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'tasks'), - listJobs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobs'), - listEnvironments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), - listSessions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createLakeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Lake') as gax.protobuf.Type; - const createLakeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateLakeResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Lake') as gax.protobuf.Type; - const updateLakeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteLakeResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteLakeMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createZoneResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Zone') as gax.protobuf.Type; - const createZoneMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateZoneResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Zone') as gax.protobuf.Type; - const updateZoneMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteZoneResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteZoneMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createAssetResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Asset') as gax.protobuf.Type; - const createAssetMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateAssetResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Asset') as gax.protobuf.Type; - const updateAssetMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAssetResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAssetMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createTaskResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Task') as gax.protobuf.Type; - const createTaskMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateTaskResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Task') as gax.protobuf.Type; - const updateTaskMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteTaskResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteTaskMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const createEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Environment') as gax.protobuf.Type; - const createEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const updateEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.Environment') as gax.protobuf.Type; - const updateEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - const deleteEnvironmentResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.dataplex.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createLake: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createLakeResponse.decode.bind(createLakeResponse), - createLakeMetadata.decode.bind(createLakeMetadata)), - updateLake: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateLakeResponse.decode.bind(updateLakeResponse), - updateLakeMetadata.decode.bind(updateLakeMetadata)), - deleteLake: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteLakeResponse.decode.bind(deleteLakeResponse), - deleteLakeMetadata.decode.bind(deleteLakeMetadata)), - createZone: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createZoneResponse.decode.bind(createZoneResponse), - createZoneMetadata.decode.bind(createZoneMetadata)), - updateZone: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateZoneResponse.decode.bind(updateZoneResponse), - updateZoneMetadata.decode.bind(updateZoneMetadata)), - deleteZone: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteZoneResponse.decode.bind(deleteZoneResponse), - deleteZoneMetadata.decode.bind(deleteZoneMetadata)), - createAsset: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAssetResponse.decode.bind(createAssetResponse), - createAssetMetadata.decode.bind(createAssetMetadata)), - updateAsset: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAssetResponse.decode.bind(updateAssetResponse), - updateAssetMetadata.decode.bind(updateAssetMetadata)), - deleteAsset: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAssetResponse.decode.bind(deleteAssetResponse), - deleteAssetMetadata.decode.bind(deleteAssetMetadata)), - createTask: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createTaskResponse.decode.bind(createTaskResponse), - createTaskMetadata.decode.bind(createTaskMetadata)), - updateTask: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateTaskResponse.decode.bind(updateTaskResponse), - updateTaskMetadata.decode.bind(updateTaskMetadata)), - deleteTask: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteTaskResponse.decode.bind(deleteTaskResponse), - deleteTaskMetadata.decode.bind(deleteTaskMetadata)), - createEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createEnvironmentResponse.decode.bind(createEnvironmentResponse), - createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), - updateEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), - updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), - deleteEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), - deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.DataplexService', 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.dataplexServiceStub) { - return this.dataplexServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.DataplexService. - this.dataplexServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.DataplexService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.DataplexService, - 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 dataplexServiceStubMethods = - ['createLake', 'updateLake', 'deleteLake', 'listLakes', 'getLake', 'listLakeActions', 'createZone', 'updateZone', 'deleteZone', 'listZones', 'getZone', 'listZoneActions', 'createAsset', 'updateAsset', 'deleteAsset', 'listAssets', 'getAsset', 'listAssetActions', 'createTask', 'updateTask', 'deleteTask', 'listTasks', 'getTask', 'listJobs', 'runTask', 'getJob', 'cancelJob', 'createEnvironment', 'updateEnvironment', 'deleteEnvironment', 'listEnvironments', 'getEnvironment', 'listSessions']; - for (const methodName of dataplexServiceStubMethods) { - const callPromise = this.dataplexServiceStub.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.dataplexServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Retrieves a lake resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_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.dataplex.v1.Lake|Lake}. - * Please see the {@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/dataplex_service.get_lake.js - * region_tag:dataplex_v1_generated_DataplexService_GetLake_async - */ - getLake( - request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|undefined, {}|undefined - ]>; - getLake( - request: protos.google.cloud.dataplex.v1.IGetLakeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, - {}|null|undefined>): void; - getLake( - request: protos.google.cloud.dataplex.v1.IGetLakeRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, - {}|null|undefined>): void; - getLake( - request?: protos.google.cloud.dataplex.v1.IGetLakeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.ILake, - protos.google.cloud.dataplex.v1.IGetLakeRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getLake(request, options, callback); - } -/** - * Retrieves a zone resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.dataplex.v1.Zone|Zone}. - * Please see the {@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/dataplex_service.get_zone.js - * region_tag:dataplex_v1_generated_DataplexService_GetZone_async - */ - getZone( - request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|undefined, {}|undefined - ]>; - getZone( - request: protos.google.cloud.dataplex.v1.IGetZoneRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, - {}|null|undefined>): void; - getZone( - request: protos.google.cloud.dataplex.v1.IGetZoneRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, - {}|null|undefined>): void; - getZone( - request?: protos.google.cloud.dataplex.v1.IGetZoneRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IZone, - protos.google.cloud.dataplex.v1.IGetZoneRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getZone(request, options, callback); - } -/** - * Retrieves an asset resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_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.dataplex.v1.Asset|Asset}. - * Please see the {@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/dataplex_service.get_asset.js - * region_tag:dataplex_v1_generated_DataplexService_GetAsset_async - */ - getAsset( - request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|undefined, {}|undefined - ]>; - getAsset( - request: protos.google.cloud.dataplex.v1.IGetAssetRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, - {}|null|undefined>): void; - getAsset( - request: protos.google.cloud.dataplex.v1.IGetAssetRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, - {}|null|undefined>): void; - getAsset( - request?: protos.google.cloud.dataplex.v1.IGetAssetRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IAsset, - protos.google.cloud.dataplex.v1.IGetAssetRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getAsset(request, options, callback); - } -/** - * Get task resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_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.dataplex.v1.Task|Task}. - * Please see the {@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/dataplex_service.get_task.js - * region_tag:dataplex_v1_generated_DataplexService_GetTask_async - */ - getTask( - request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|undefined, {}|undefined - ]>; - getTask( - request: protos.google.cloud.dataplex.v1.IGetTaskRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, - {}|null|undefined>): void; - getTask( - request: protos.google.cloud.dataplex.v1.IGetTaskRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, - {}|null|undefined>): void; - getTask( - request?: protos.google.cloud.dataplex.v1.IGetTaskRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.ITask, - protos.google.cloud.dataplex.v1.IGetTaskRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getTask(request, options, callback); - } -/** - * Run an on demand execution of a Task. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param {number[]} [request.labels] - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * @param {number[]} [request.args] - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be 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.dataplex.v1.RunTaskResponse|RunTaskResponse}. - * Please see the {@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/dataplex_service.run_task.js - * region_tag:dataplex_v1_generated_DataplexService_RunTask_async - */ - runTask( - request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|undefined, {}|undefined - ]>; - runTask( - request: protos.google.cloud.dataplex.v1.IRunTaskRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, - {}|null|undefined>): void; - runTask( - request: protos.google.cloud.dataplex.v1.IRunTaskRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, - {}|null|undefined>): void; - runTask( - request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IRunTaskResponse, - protos.google.cloud.dataplex.v1.IRunTaskRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.runTask(request, options, callback); - } -/** - * Get job resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_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.dataplex.v1.Job|Job}. - * Please see the {@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/dataplex_service.get_job.js - * region_tag:dataplex_v1_generated_DataplexService_GetJob_async - */ - getJob( - request?: protos.google.cloud.dataplex.v1.IGetJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|undefined, {}|undefined - ]>; - getJob( - request: protos.google.cloud.dataplex.v1.IGetJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, - {}|null|undefined>): void; - getJob( - request: protos.google.cloud.dataplex.v1.IGetJobRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, - {}|null|undefined>): void; - getJob( - request?: protos.google.cloud.dataplex.v1.IGetJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IJob, - protos.google.cloud.dataplex.v1.IGetJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getJob(request, options, callback); - } -/** - * Cancel jobs running for the task resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_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/v1/dataplex_service.cancel_job.js - * region_tag:dataplex_v1_generated_DataplexService_CancelJob_async - */ - cancelJob( - request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|undefined, {}|undefined - ]>; - cancelJob( - request: protos.google.cloud.dataplex.v1.ICancelJobRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, - {}|null|undefined>): void; - cancelJob( - request: protos.google.cloud.dataplex.v1.ICancelJobRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, - {}|null|undefined>): void; - cancelJob( - request?: protos.google.cloud.dataplex.v1.ICancelJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.ICancelJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.cancelJob(request, options, callback); - } -/** - * Get environment resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_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.dataplex.v1.Environment|Environment}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.get_environment.js - * region_tag:dataplex_v1_generated_DataplexService_GetEnvironment_async - */ - getEnvironment( - request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>; - getEnvironment( - request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request?: protos.google.cloud.dataplex.v1.IGetEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEnvironment, - protos.google.cloud.dataplex.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getEnvironment(request, options, callback); - } - -/** - * Creates a lake resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param {string} request.lakeId - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param {google.cloud.dataplex.v1.Lake} request.lake - * Required. Lake resource - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_lake.js - * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async - */ - createLake( - request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createLake( - request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createLake( - request: protos.google.cloud.dataplex.v1.ICreateLakeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createLake( - request?: protos.google.cloud.dataplex.v1.ICreateLakeRequest, - 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.createLake(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createLake()`. - * @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/dataplex_service.create_lake.js - * region_tag:dataplex_v1_generated_DataplexService_CreateLake_async - */ - async checkCreateLakeProgress(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.createLake, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a lake resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Lake} request.lake - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_lake.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async - */ - updateLake( - request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateLake( - request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateLake( - request: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateLake( - request?: protos.google.cloud.dataplex.v1.IUpdateLakeRequest, - 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({ - 'lake.name': request.lake!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateLake(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateLake()`. - * @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/dataplex_service.update_lake.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateLake_async - */ - async checkUpdateLakeProgress(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.updateLake, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a lake resource. All zones within the lake must be deleted before - * the lake can be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_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/dataplex_service.delete_lake.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async - */ - deleteLake( - request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteLake( - request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteLake( - request: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteLake( - request?: protos.google.cloud.dataplex.v1.IDeleteLakeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteLake(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteLake()`. - * @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/dataplex_service.delete_lake.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteLake_async - */ - async checkDeleteLakeProgress(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.deleteLake, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a zone resource within a lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {string} request.zoneId - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * @param {google.cloud.dataplex.v1.Zone} request.zone - * Required. Zone resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_zone.js - * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async - */ - createZone( - request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createZone( - request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createZone( - request: protos.google.cloud.dataplex.v1.ICreateZoneRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createZone( - request?: protos.google.cloud.dataplex.v1.ICreateZoneRequest, - 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.createZone(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createZone()`. - * @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/dataplex_service.create_zone.js - * region_tag:dataplex_v1_generated_DataplexService_CreateZone_async - */ - async checkCreateZoneProgress(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.createZone, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a zone resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Zone} request.zone - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_zone.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async - */ - updateZone( - request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateZone( - request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateZone( - request: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateZone( - request?: protos.google.cloud.dataplex.v1.IUpdateZoneRequest, - 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({ - 'zone.name': request.zone!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateZone(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateZone()`. - * @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/dataplex_service.update_zone.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateZone_async - */ - async checkUpdateZoneProgress(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.updateZone, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a zone resource. All assets within a zone must be deleted before - * the zone can be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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/dataplex_service.delete_zone.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async - */ - deleteZone( - request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteZone( - request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteZone( - request: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteZone( - request?: protos.google.cloud.dataplex.v1.IDeleteZoneRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteZone(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteZone()`. - * @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/dataplex_service.delete_zone.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteZone_async - */ - async checkDeleteZoneProgress(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.deleteZone, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates an asset resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {string} request.assetId - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * @param {google.cloud.dataplex.v1.Asset} request.asset - * Required. Asset resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_asset.js - * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async - */ - createAsset( - request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAsset( - request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAsset( - request: protos.google.cloud.dataplex.v1.ICreateAssetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAsset( - request?: protos.google.cloud.dataplex.v1.ICreateAssetRequest, - 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.createAsset(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAsset()`. - * @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/dataplex_service.create_asset.js - * region_tag:dataplex_v1_generated_DataplexService_CreateAsset_async - */ - async checkCreateAssetProgress(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.createAsset, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an asset resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Asset} request.asset - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_asset.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async - */ - updateAsset( - request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAsset( - request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAsset( - request: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAsset( - request?: protos.google.cloud.dataplex.v1.IUpdateAssetRequest, - 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({ - 'asset.name': request.asset!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAsset(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAsset()`. - * @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/dataplex_service.update_asset.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateAsset_async - */ - async checkUpdateAssetProgress(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.updateAsset, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes an asset resource. The referenced storage resource is detached - * (default) or deleted based on the associated Lifecycle policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_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/dataplex_service.delete_asset.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async - */ - deleteAsset( - request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAsset( - request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAsset( - request: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAsset( - request?: protos.google.cloud.dataplex.v1.IDeleteAssetRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteAsset(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAsset()`. - * @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/dataplex_service.delete_asset.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteAsset_async - */ - async checkDeleteAssetProgress(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.deleteAsset, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a task resource within a lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {string} request.taskId - * Required. Task identifier. - * @param {google.cloud.dataplex.v1.Task} request.task - * Required. Task resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_task.js - * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async - */ - createTask( - request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createTask( - request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTask( - request: protos.google.cloud.dataplex.v1.ICreateTaskRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTask( - request?: protos.google.cloud.dataplex.v1.ICreateTaskRequest, - 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.createTask(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createTask()`. - * @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/dataplex_service.create_task.js - * region_tag:dataplex_v1_generated_DataplexService_CreateTask_async - */ - async checkCreateTaskProgress(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.createTask, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Update the task resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Task} request.task - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_task.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async - */ - updateTask( - request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateTask( - request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTask( - request: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTask( - request?: protos.google.cloud.dataplex.v1.IUpdateTaskRequest, - 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({ - 'task.name': request.task!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTask(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateTask()`. - * @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/dataplex_service.update_task.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateTask_async - */ - async checkUpdateTaskProgress(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.updateTask, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Delete the task resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_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/dataplex_service.delete_task.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async - */ - deleteTask( - request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteTask( - request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteTask( - request: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteTask( - request?: protos.google.cloud.dataplex.v1.IDeleteTaskRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteTask(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteTask()`. - * @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/dataplex_service.delete_task.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteTask_async - */ - async checkDeleteTaskProgress(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.deleteTask, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create an environment resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param {string} request.environmentId - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * @param {google.cloud.dataplex.v1.Environment} request.environment - * Required. Environment resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_environment.js - * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async - */ - createEnvironment( - request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createEnvironment( - request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request?: protos.google.cloud.dataplex.v1.ICreateEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.create_environment.js - * region_tag:dataplex_v1_generated_DataplexService_CreateEnvironment_async - */ - async checkCreateEnvironmentProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Update the environment resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.dataplex.v1.Environment} request.environment - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_environment.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async - */ - updateEnvironment( - request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateEnvironment( - request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request?: protos.google.cloud.dataplex.v1.IUpdateEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'environment.name': request.environment!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.update_environment.js - * region_tag:dataplex_v1_generated_DataplexService_UpdateEnvironment_async - */ - async checkUpdateEnvironmentProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Delete the environment resource. All the child resources must have been - * deleted before environment deletion can be initiated. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_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/dataplex_service.delete_environment.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async - */ - deleteEnvironment( - request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteEnvironment( - request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request?: protos.google.cloud.dataplex.v1.IDeleteEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteEnvironment()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.delete_environment.js - * region_tag:dataplex_v1_generated_DataplexService_DeleteEnvironment_async - */ - async checkDeleteEnvironmentProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists lake resources in a project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Lake|Lake}. - * 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 `listLakesAsync()` - * 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. - */ - listLakes( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ILake[], - protos.google.cloud.dataplex.v1.IListLakesRequest|null, - protos.google.cloud.dataplex.v1.IListLakesResponse - ]>; - listLakes( - request: protos.google.cloud.dataplex.v1.IListLakesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ILake>): void; - listLakes( - request: protos.google.cloud.dataplex.v1.IListLakesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ILake>): void; - listLakes( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ILake>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakesRequest, - protos.google.cloud.dataplex.v1.IListLakesResponse|null|undefined, - protos.google.cloud.dataplex.v1.ILake>): - Promise<[ - protos.google.cloud.dataplex.v1.ILake[], - protos.google.cloud.dataplex.v1.IListLakesRequest|null, - protos.google.cloud.dataplex.v1.IListLakesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listLakes(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 resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Lake|Lake} 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 `listLakesAsync()` - * 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. - */ - listLakesStream( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, - 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['listLakes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listLakes.createStream( - this.innerApiCalls.listLakes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listLakes`, 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 resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Lake|Lake}. 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/dataplex_service.list_lakes.js - * region_tag:dataplex_v1_generated_DataplexService_ListLakes_async - */ - listLakesAsync( - request?: protos.google.cloud.dataplex.v1.IListLakesRequest, - 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['listLakes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listLakes.asyncIterate( - this.innerApiCalls['listLakes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists action resources in a lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. - * 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 `listLakeActionsAsync()` - * 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. - */ - listLakeActions( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListLakeActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>; - listLakeActions( - request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listLakeActions( - request: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listLakeActions( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListLakeActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listLakeActions(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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listLakeActionsAsync()` - * 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. - */ - listLakeActionsStream( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - 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['listLakeActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listLakeActions.createStream( - this.innerApiCalls.listLakeActions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listLakeActions`, 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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_lake_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListLakeActions_async - */ - listLakeActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListLakeActionsRequest, - 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['listLakeActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listLakeActions.asyncIterate( - this.innerApiCalls['listLakeActions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists zone resources in a lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Zone|Zone}. - * 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 `listZonesAsync()` - * 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. - */ - listZones( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IZone[], - protos.google.cloud.dataplex.v1.IListZonesRequest|null, - protos.google.cloud.dataplex.v1.IListZonesResponse - ]>; - listZones( - request: protos.google.cloud.dataplex.v1.IListZonesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IZone>): void; - listZones( - request: protos.google.cloud.dataplex.v1.IListZonesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IZone>): void; - listZones( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IZone>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZonesRequest, - protos.google.cloud.dataplex.v1.IListZonesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IZone>): - Promise<[ - protos.google.cloud.dataplex.v1.IZone[], - protos.google.cloud.dataplex.v1.IListZonesRequest|null, - protos.google.cloud.dataplex.v1.IListZonesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listZones(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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Zone|Zone} 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 `listZonesAsync()` - * 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. - */ - listZonesStream( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, - 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['listZones']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listZones.createStream( - this.innerApiCalls.listZones as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listZones`, 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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Zone|Zone}. 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/dataplex_service.list_zones.js - * region_tag:dataplex_v1_generated_DataplexService_ListZones_async - */ - listZonesAsync( - request?: protos.google.cloud.dataplex.v1.IListZonesRequest, - 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['listZones']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listZones.asyncIterate( - this.innerApiCalls['listZones'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists action resources in a zone. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. - * 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 `listZoneActionsAsync()` - * 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. - */ - listZoneActions( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListZoneActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>; - listZoneActions( - request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listZoneActions( - request: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listZoneActions( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListZoneActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listZoneActions(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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listZoneActionsAsync()` - * 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. - */ - listZoneActionsStream( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - 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['listZoneActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listZoneActions.createStream( - this.innerApiCalls.listZoneActions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listZoneActions`, 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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_zone_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListZoneActions_async - */ - listZoneActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListZoneActionsRequest, - 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['listZoneActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listZoneActions.asyncIterate( - this.innerApiCalls['listZoneActions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists asset resources in a zone. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Asset|Asset}. - * 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 `listAssetsAsync()` - * 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. - */ - listAssets( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAsset[], - protos.google.cloud.dataplex.v1.IListAssetsRequest|null, - protos.google.cloud.dataplex.v1.IListAssetsResponse - ]>; - listAssets( - request: protos.google.cloud.dataplex.v1.IListAssetsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAsset>): void; - listAssets( - request: protos.google.cloud.dataplex.v1.IListAssetsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAsset>): void; - listAssets( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAsset>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetsRequest, - protos.google.cloud.dataplex.v1.IListAssetsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAsset>): - Promise<[ - protos.google.cloud.dataplex.v1.IAsset[], - protos.google.cloud.dataplex.v1.IListAssetsRequest|null, - protos.google.cloud.dataplex.v1.IListAssetsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listAssets(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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Asset|Asset} 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 `listAssetsAsync()` - * 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. - */ - listAssetsStream( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, - 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['listAssets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAssets.createStream( - this.innerApiCalls.listAssets as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAssets`, 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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Asset|Asset}. 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/dataplex_service.list_assets.js - * region_tag:dataplex_v1_generated_DataplexService_ListAssets_async - */ - listAssetsAsync( - request?: protos.google.cloud.dataplex.v1.IListAssetsRequest, - 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['listAssets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAssets.asyncIterate( - this.innerApiCalls['listAssets'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists action resources in an asset. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Action|Action}. - * 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 `listAssetActionsAsync()` - * 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. - */ - listAssetActions( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListAssetActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>; - listAssetActions( - request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listAssetActions( - request: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): void; - listAssetActions( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - protos.google.cloud.dataplex.v1.IListActionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IAction>): - Promise<[ - protos.google.cloud.dataplex.v1.IAction[], - protos.google.cloud.dataplex.v1.IListAssetActionsRequest|null, - protos.google.cloud.dataplex.v1.IListActionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listAssetActions(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 resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Action|Action} 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 `listAssetActionsAsync()` - * 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. - */ - listAssetActionsStream( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - 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['listAssetActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAssetActions.createStream( - this.innerApiCalls.listAssetActions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAssetActions`, 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 resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.dataplex.v1.Action|Action}. 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/dataplex_service.list_asset_actions.js - * region_tag:dataplex_v1_generated_DataplexService_ListAssetActions_async - */ - listAssetActionsAsync( - request?: protos.google.cloud.dataplex.v1.IListAssetActionsRequest, - 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['listAssetActions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAssetActions.asyncIterate( - this.innerApiCalls['listAssetActions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists tasks under the given lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Task|Task}. - * 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 `listTasksAsync()` - * 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. - */ - listTasks( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ITask[], - protos.google.cloud.dataplex.v1.IListTasksRequest|null, - protos.google.cloud.dataplex.v1.IListTasksResponse - ]>; - listTasks( - request: protos.google.cloud.dataplex.v1.IListTasksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, - protos.google.cloud.dataplex.v1.ITask>): void; - listTasks( - request: protos.google.cloud.dataplex.v1.IListTasksRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, - protos.google.cloud.dataplex.v1.ITask>): void; - listTasks( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, - protos.google.cloud.dataplex.v1.ITask>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListTasksRequest, - protos.google.cloud.dataplex.v1.IListTasksResponse|null|undefined, - protos.google.cloud.dataplex.v1.ITask>): - Promise<[ - protos.google.cloud.dataplex.v1.ITask[], - protos.google.cloud.dataplex.v1.IListTasksRequest|null, - protos.google.cloud.dataplex.v1.IListTasksResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listTasks(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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Task|Task} 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 `listTasksAsync()` - * 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. - */ - listTasksStream( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, - 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['listTasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTasks.createStream( - this.innerApiCalls.listTasks as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listTasks`, 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 resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Task|Task}. 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/dataplex_service.list_tasks.js - * region_tag:dataplex_v1_generated_DataplexService_ListTasks_async - */ - listTasksAsync( - request?: protos.google.cloud.dataplex.v1.IListTasksRequest, - 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['listTasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTasks.asyncIterate( - this.innerApiCalls['listTasks'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Jobs under the given task. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Job|Job}. - * 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 `listJobsAsync()` - * 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. - */ - listJobs( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IJob[], - protos.google.cloud.dataplex.v1.IListJobsRequest|null, - protos.google.cloud.dataplex.v1.IListJobsResponse - ]>; - listJobs( - request: protos.google.cloud.dataplex.v1.IListJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IJob>): void; - listJobs( - request: protos.google.cloud.dataplex.v1.IListJobsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IJob>): void; - listJobs( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IJob>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListJobsRequest, - protos.google.cloud.dataplex.v1.IListJobsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IJob>): - Promise<[ - protos.google.cloud.dataplex.v1.IJob[], - protos.google.cloud.dataplex.v1.IListJobsRequest|null, - protos.google.cloud.dataplex.v1.IListJobsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listJobs(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 resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Job|Job} 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 `listJobsAsync()` - * 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. - */ - listJobsStream( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, - 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['listJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobs.createStream( - this.innerApiCalls.listJobs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listJobs`, 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 resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.dataplex.v1.Job|Job}. 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/dataplex_service.list_jobs.js - * region_tag:dataplex_v1_generated_DataplexService_ListJobs_async - */ - listJobsAsync( - request?: protos.google.cloud.dataplex.v1.IListJobsRequest, - 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['listJobs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobs.asyncIterate( - this.innerApiCalls['listJobs'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists environments under the given lake. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Environment|Environment}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listEnvironmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listEnvironments( - request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEnvironment[], - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest|null, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse - ]>; - listEnvironments( - request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEnvironment>): void; - listEnvironments( - request: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEnvironment>): void; - listEnvironments( - request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEnvironment>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEnvironment>): - Promise<[ - protos.google.cloud.dataplex.v1.IEnvironment[], - protos.google.cloud.dataplex.v1.IListEnvironmentsRequest|null, - protos.google.cloud.dataplex.v1.IListEnvironmentsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listEnvironments(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Environment|Environment} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listEnvironmentsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listEnvironmentsStream( - request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEnvironments`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter request. - * @param {string} [request.orderBy] - * Optional. Order by fields for the result. - * @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.dataplex.v1.Environment|Environment}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/dataplex_service.list_environments.js - * region_tag:dataplex_v1_generated_DataplexService_ListEnvironments_async - */ - listEnvironmentsAsync( - request?: protos.google.cloud.dataplex.v1.IListEnvironmentsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.asyncIterate( - this.innerApiCalls['listEnvironments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists session resources in an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * - * mode = ADMIN | USER - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Session|Session}. - * 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 `listSessionsAsync()` - * 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. - */ - listSessions( - request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.ISession[], - protos.google.cloud.dataplex.v1.IListSessionsRequest|null, - protos.google.cloud.dataplex.v1.IListSessionsResponse - ]>; - listSessions( - request: protos.google.cloud.dataplex.v1.IListSessionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListSessionsRequest, - protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISession>): void; - listSessions( - request: protos.google.cloud.dataplex.v1.IListSessionsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListSessionsRequest, - protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISession>): void; - listSessions( - request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListSessionsRequest, - protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISession>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListSessionsRequest, - protos.google.cloud.dataplex.v1.IListSessionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.ISession>): - Promise<[ - protos.google.cloud.dataplex.v1.ISession[], - protos.google.cloud.dataplex.v1.IListSessionsRequest|null, - protos.google.cloud.dataplex.v1.IListSessionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listSessions(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 resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * - * mode = ADMIN | USER - * @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.dataplex.v1.Session|Session} 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 `listSessionsAsync()` - * 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. - */ - listSessionsStream( - request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, - 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['listSessions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSessions.createStream( - this.innerApiCalls.listSessions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listSessions`, 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 resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * @param {string} [request.filter] - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * - * mode = ADMIN | USER - * @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.dataplex.v1.Session|Session}. 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/dataplex_service.list_sessions.js - * region_tag:dataplex_v1_generated_DataplexService_ListSessions_async - */ - listSessionsAsync( - request?: protos.google.cloud.dataplex.v1.IListSessionsRequest, - 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['listSessions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSessions.asyncIterate( - this.innerApiCalls['listSessions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * 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 metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.dataplexServiceStub && !this._terminated) { - return this.dataplexServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json deleted file mode 100644 index c90740bba85..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_client_config.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataplexService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateLake": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateLake": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteLake": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListLakes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetLake": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListLakeActions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateZone": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateZone": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteZone": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListZones": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetZone": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListZoneActions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAssetActions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateTask": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTask": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTask": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "RunTask": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CancelJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListSessions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/dataplex_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json deleted file mode 100644 index a3c2ba6473e..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,1189 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.dataplex.v1", - "libraryPackage": "@google-cloud/dataplex", - "services": { - "CatalogService": { - "clients": { - "grpc": { - "libraryClient": "CatalogServiceClient", - "rpcs": { - "GetEntryType": { - "methods": [ - "getEntryType" - ] - }, - "GetAspectType": { - "methods": [ - "getAspectType" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "GetMetadataJob": { - "methods": [ - "getMetadataJob" - ] - }, - "CancelMetadataJob": { - "methods": [ - "cancelMetadataJob" - ] - }, - "CreateEntryType": { - "methods": [ - "createEntryType" - ] - }, - "UpdateEntryType": { - "methods": [ - "updateEntryType" - ] - }, - "DeleteEntryType": { - "methods": [ - "deleteEntryType" - ] - }, - "CreateAspectType": { - "methods": [ - "createAspectType" - ] - }, - "UpdateAspectType": { - "methods": [ - "updateAspectType" - ] - }, - "DeleteAspectType": { - "methods": [ - "deleteAspectType" - ] - }, - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateMetadataJob": { - "methods": [ - "createMetadataJob" - ] - }, - "ListEntryTypes": { - "methods": [ - "listEntryTypes", - "listEntryTypesStream", - "listEntryTypesAsync" - ] - }, - "ListAspectTypes": { - "methods": [ - "listAspectTypes", - "listAspectTypesStream", - "listAspectTypesAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "SearchEntries": { - "methods": [ - "searchEntries", - "searchEntriesStream", - "searchEntriesAsync" - ] - }, - "ListMetadataJobs": { - "methods": [ - "listMetadataJobs", - "listMetadataJobsStream", - "listMetadataJobsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "CatalogServiceClient", - "rpcs": { - "GetEntryType": { - "methods": [ - "getEntryType" - ] - }, - "GetAspectType": { - "methods": [ - "getAspectType" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "GetMetadataJob": { - "methods": [ - "getMetadataJob" - ] - }, - "CancelMetadataJob": { - "methods": [ - "cancelMetadataJob" - ] - }, - "CreateEntryType": { - "methods": [ - "createEntryType" - ] - }, - "UpdateEntryType": { - "methods": [ - "updateEntryType" - ] - }, - "DeleteEntryType": { - "methods": [ - "deleteEntryType" - ] - }, - "CreateAspectType": { - "methods": [ - "createAspectType" - ] - }, - "UpdateAspectType": { - "methods": [ - "updateAspectType" - ] - }, - "DeleteAspectType": { - "methods": [ - "deleteAspectType" - ] - }, - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateMetadataJob": { - "methods": [ - "createMetadataJob" - ] - }, - "ListEntryTypes": { - "methods": [ - "listEntryTypes", - "listEntryTypesStream", - "listEntryTypesAsync" - ] - }, - "ListAspectTypes": { - "methods": [ - "listAspectTypes", - "listAspectTypesStream", - "listAspectTypesAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "SearchEntries": { - "methods": [ - "searchEntries", - "searchEntriesStream", - "searchEntriesAsync" - ] - }, - "ListMetadataJobs": { - "methods": [ - "listMetadataJobs", - "listMetadataJobsStream", - "listMetadataJobsAsync" - ] - } - } - } - } - }, - "ContentService": { - "clients": { - "grpc": { - "libraryClient": "ContentServiceClient", - "rpcs": { - "CreateContent": { - "methods": [ - "createContent" - ] - }, - "UpdateContent": { - "methods": [ - "updateContent" - ] - }, - "DeleteContent": { - "methods": [ - "deleteContent" - ] - }, - "GetContent": { - "methods": [ - "getContent" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListContent": { - "methods": [ - "listContent", - "listContentStream", - "listContentAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ContentServiceClient", - "rpcs": { - "CreateContent": { - "methods": [ - "createContent" - ] - }, - "UpdateContent": { - "methods": [ - "updateContent" - ] - }, - "DeleteContent": { - "methods": [ - "deleteContent" - ] - }, - "GetContent": { - "methods": [ - "getContent" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListContent": { - "methods": [ - "listContent", - "listContentStream", - "listContentAsync" - ] - } - } - } - } - }, - "DataplexService": { - "clients": { - "grpc": { - "libraryClient": "DataplexServiceClient", - "rpcs": { - "GetLake": { - "methods": [ - "getLake" - ] - }, - "GetZone": { - "methods": [ - "getZone" - ] - }, - "GetAsset": { - "methods": [ - "getAsset" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "RunTask": { - "methods": [ - "runTask" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "CancelJob": { - "methods": [ - "cancelJob" - ] - }, - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "CreateLake": { - "methods": [ - "createLake" - ] - }, - "UpdateLake": { - "methods": [ - "updateLake" - ] - }, - "DeleteLake": { - "methods": [ - "deleteLake" - ] - }, - "CreateZone": { - "methods": [ - "createZone" - ] - }, - "UpdateZone": { - "methods": [ - "updateZone" - ] - }, - "DeleteZone": { - "methods": [ - "deleteZone" - ] - }, - "CreateAsset": { - "methods": [ - "createAsset" - ] - }, - "UpdateAsset": { - "methods": [ - "updateAsset" - ] - }, - "DeleteAsset": { - "methods": [ - "deleteAsset" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "UpdateTask": { - "methods": [ - "updateTask" - ] - }, - "DeleteTask": { - "methods": [ - "deleteTask" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "ListLakes": { - "methods": [ - "listLakes", - "listLakesStream", - "listLakesAsync" - ] - }, - "ListLakeActions": { - "methods": [ - "listLakeActions", - "listLakeActionsStream", - "listLakeActionsAsync" - ] - }, - "ListZones": { - "methods": [ - "listZones", - "listZonesStream", - "listZonesAsync" - ] - }, - "ListZoneActions": { - "methods": [ - "listZoneActions", - "listZoneActionsStream", - "listZoneActionsAsync" - ] - }, - "ListAssets": { - "methods": [ - "listAssets", - "listAssetsStream", - "listAssetsAsync" - ] - }, - "ListAssetActions": { - "methods": [ - "listAssetActions", - "listAssetActionsStream", - "listAssetActionsAsync" - ] - }, - "ListTasks": { - "methods": [ - "listTasks", - "listTasksStream", - "listTasksAsync" - ] - }, - "ListJobs": { - "methods": [ - "listJobs", - "listJobsStream", - "listJobsAsync" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListSessions": { - "methods": [ - "listSessions", - "listSessionsStream", - "listSessionsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DataplexServiceClient", - "rpcs": { - "GetLake": { - "methods": [ - "getLake" - ] - }, - "GetZone": { - "methods": [ - "getZone" - ] - }, - "GetAsset": { - "methods": [ - "getAsset" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "RunTask": { - "methods": [ - "runTask" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "CancelJob": { - "methods": [ - "cancelJob" - ] - }, - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "CreateLake": { - "methods": [ - "createLake" - ] - }, - "UpdateLake": { - "methods": [ - "updateLake" - ] - }, - "DeleteLake": { - "methods": [ - "deleteLake" - ] - }, - "CreateZone": { - "methods": [ - "createZone" - ] - }, - "UpdateZone": { - "methods": [ - "updateZone" - ] - }, - "DeleteZone": { - "methods": [ - "deleteZone" - ] - }, - "CreateAsset": { - "methods": [ - "createAsset" - ] - }, - "UpdateAsset": { - "methods": [ - "updateAsset" - ] - }, - "DeleteAsset": { - "methods": [ - "deleteAsset" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "UpdateTask": { - "methods": [ - "updateTask" - ] - }, - "DeleteTask": { - "methods": [ - "deleteTask" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "ListLakes": { - "methods": [ - "listLakes", - "listLakesStream", - "listLakesAsync" - ] - }, - "ListLakeActions": { - "methods": [ - "listLakeActions", - "listLakeActionsStream", - "listLakeActionsAsync" - ] - }, - "ListZones": { - "methods": [ - "listZones", - "listZonesStream", - "listZonesAsync" - ] - }, - "ListZoneActions": { - "methods": [ - "listZoneActions", - "listZoneActionsStream", - "listZoneActionsAsync" - ] - }, - "ListAssets": { - "methods": [ - "listAssets", - "listAssetsStream", - "listAssetsAsync" - ] - }, - "ListAssetActions": { - "methods": [ - "listAssetActions", - "listAssetActionsStream", - "listAssetActionsAsync" - ] - }, - "ListTasks": { - "methods": [ - "listTasks", - "listTasksStream", - "listTasksAsync" - ] - }, - "ListJobs": { - "methods": [ - "listJobs", - "listJobsStream", - "listJobsAsync" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListSessions": { - "methods": [ - "listSessions", - "listSessionsStream", - "listSessionsAsync" - ] - } - } - } - } - }, - "DataScanService": { - "clients": { - "grpc": { - "libraryClient": "DataScanServiceClient", - "rpcs": { - "GetDataScan": { - "methods": [ - "getDataScan" - ] - }, - "RunDataScan": { - "methods": [ - "runDataScan" - ] - }, - "GetDataScanJob": { - "methods": [ - "getDataScanJob" - ] - }, - "GenerateDataQualityRules": { - "methods": [ - "generateDataQualityRules" - ] - }, - "CreateDataScan": { - "methods": [ - "createDataScan" - ] - }, - "UpdateDataScan": { - "methods": [ - "updateDataScan" - ] - }, - "DeleteDataScan": { - "methods": [ - "deleteDataScan" - ] - }, - "ListDataScans": { - "methods": [ - "listDataScans", - "listDataScansStream", - "listDataScansAsync" - ] - }, - "ListDataScanJobs": { - "methods": [ - "listDataScanJobs", - "listDataScanJobsStream", - "listDataScanJobsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DataScanServiceClient", - "rpcs": { - "GetDataScan": { - "methods": [ - "getDataScan" - ] - }, - "RunDataScan": { - "methods": [ - "runDataScan" - ] - }, - "GetDataScanJob": { - "methods": [ - "getDataScanJob" - ] - }, - "GenerateDataQualityRules": { - "methods": [ - "generateDataQualityRules" - ] - }, - "CreateDataScan": { - "methods": [ - "createDataScan" - ] - }, - "UpdateDataScan": { - "methods": [ - "updateDataScan" - ] - }, - "DeleteDataScan": { - "methods": [ - "deleteDataScan" - ] - }, - "ListDataScans": { - "methods": [ - "listDataScans", - "listDataScansStream", - "listDataScansAsync" - ] - }, - "ListDataScanJobs": { - "methods": [ - "listDataScanJobs", - "listDataScanJobsStream", - "listDataScanJobsAsync" - ] - } - } - } - } - }, - "DataTaxonomyService": { - "clients": { - "grpc": { - "libraryClient": "DataTaxonomyServiceClient", - "rpcs": { - "GetDataTaxonomy": { - "methods": [ - "getDataTaxonomy" - ] - }, - "GetDataAttributeBinding": { - "methods": [ - "getDataAttributeBinding" - ] - }, - "GetDataAttribute": { - "methods": [ - "getDataAttribute" - ] - }, - "CreateDataTaxonomy": { - "methods": [ - "createDataTaxonomy" - ] - }, - "UpdateDataTaxonomy": { - "methods": [ - "updateDataTaxonomy" - ] - }, - "DeleteDataTaxonomy": { - "methods": [ - "deleteDataTaxonomy" - ] - }, - "CreateDataAttributeBinding": { - "methods": [ - "createDataAttributeBinding" - ] - }, - "UpdateDataAttributeBinding": { - "methods": [ - "updateDataAttributeBinding" - ] - }, - "DeleteDataAttributeBinding": { - "methods": [ - "deleteDataAttributeBinding" - ] - }, - "CreateDataAttribute": { - "methods": [ - "createDataAttribute" - ] - }, - "UpdateDataAttribute": { - "methods": [ - "updateDataAttribute" - ] - }, - "DeleteDataAttribute": { - "methods": [ - "deleteDataAttribute" - ] - }, - "ListDataTaxonomies": { - "methods": [ - "listDataTaxonomies", - "listDataTaxonomiesStream", - "listDataTaxonomiesAsync" - ] - }, - "ListDataAttributeBindings": { - "methods": [ - "listDataAttributeBindings", - "listDataAttributeBindingsStream", - "listDataAttributeBindingsAsync" - ] - }, - "ListDataAttributes": { - "methods": [ - "listDataAttributes", - "listDataAttributesStream", - "listDataAttributesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DataTaxonomyServiceClient", - "rpcs": { - "GetDataTaxonomy": { - "methods": [ - "getDataTaxonomy" - ] - }, - "GetDataAttributeBinding": { - "methods": [ - "getDataAttributeBinding" - ] - }, - "GetDataAttribute": { - "methods": [ - "getDataAttribute" - ] - }, - "CreateDataTaxonomy": { - "methods": [ - "createDataTaxonomy" - ] - }, - "UpdateDataTaxonomy": { - "methods": [ - "updateDataTaxonomy" - ] - }, - "DeleteDataTaxonomy": { - "methods": [ - "deleteDataTaxonomy" - ] - }, - "CreateDataAttributeBinding": { - "methods": [ - "createDataAttributeBinding" - ] - }, - "UpdateDataAttributeBinding": { - "methods": [ - "updateDataAttributeBinding" - ] - }, - "DeleteDataAttributeBinding": { - "methods": [ - "deleteDataAttributeBinding" - ] - }, - "CreateDataAttribute": { - "methods": [ - "createDataAttribute" - ] - }, - "UpdateDataAttribute": { - "methods": [ - "updateDataAttribute" - ] - }, - "DeleteDataAttribute": { - "methods": [ - "deleteDataAttribute" - ] - }, - "ListDataTaxonomies": { - "methods": [ - "listDataTaxonomies", - "listDataTaxonomiesStream", - "listDataTaxonomiesAsync" - ] - }, - "ListDataAttributeBindings": { - "methods": [ - "listDataAttributeBindings", - "listDataAttributeBindingsStream", - "listDataAttributeBindingsAsync" - ] - }, - "ListDataAttributes": { - "methods": [ - "listDataAttributes", - "listDataAttributesStream", - "listDataAttributesAsync" - ] - } - } - } - } - }, - "MetadataService": { - "clients": { - "grpc": { - "libraryClient": "MetadataServiceClient", - "rpcs": { - "CreateEntity": { - "methods": [ - "createEntity" - ] - }, - "UpdateEntity": { - "methods": [ - "updateEntity" - ] - }, - "DeleteEntity": { - "methods": [ - "deleteEntity" - ] - }, - "GetEntity": { - "methods": [ - "getEntity" - ] - }, - "CreatePartition": { - "methods": [ - "createPartition" - ] - }, - "DeletePartition": { - "methods": [ - "deletePartition" - ] - }, - "GetPartition": { - "methods": [ - "getPartition" - ] - }, - "ListEntities": { - "methods": [ - "listEntities", - "listEntitiesStream", - "listEntitiesAsync" - ] - }, - "ListPartitions": { - "methods": [ - "listPartitions", - "listPartitionsStream", - "listPartitionsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "MetadataServiceClient", - "rpcs": { - "CreateEntity": { - "methods": [ - "createEntity" - ] - }, - "UpdateEntity": { - "methods": [ - "updateEntity" - ] - }, - "DeleteEntity": { - "methods": [ - "deleteEntity" - ] - }, - "GetEntity": { - "methods": [ - "getEntity" - ] - }, - "CreatePartition": { - "methods": [ - "createPartition" - ] - }, - "DeletePartition": { - "methods": [ - "deletePartition" - ] - }, - "GetPartition": { - "methods": [ - "getPartition" - ] - }, - "ListEntities": { - "methods": [ - "listEntities", - "listEntitiesStream", - "listEntitiesAsync" - ] - }, - "ListPartitions": { - "methods": [ - "listPartitions", - "listPartitionsStream", - "listPartitionsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts deleted file mode 100644 index 99f0bc69c1d..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {CatalogServiceClient} from './catalog_service_client'; -export {ContentServiceClient} from './content_service_client'; -export {DataplexServiceClient} from './dataplex_service_client'; -export {DataScanServiceClient} from './data_scan_service_client'; -export {DataTaxonomyServiceClient} from './data_taxonomy_service_client'; -export {MetadataServiceClient} from './metadata_service_client'; diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts deleted file mode 100644 index 8d7d39f0847..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client.ts +++ /dev/null @@ -1,3147 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, PaginationCallback, GaxCall, LocationsClient, LocationProtos} 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/metadata_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './metadata_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Metadata service manages metadata resources such as tables, filesets and - * partitions. - * @class - * @memberof v1 - */ -export class MetadataServiceClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - metadataServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of MetadataServiceClient. - * - * @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 MetadataServiceClient({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 MetadataServiceClient; - 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 = 'dataplex.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - aspectTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}' - ), - assetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' - ), - contentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' - ), - dataAttributePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}' - ), - dataAttributeBindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}' - ), - dataScanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}' - ), - dataScanJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' - ), - dataTaxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}' - ), - entityPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' - ), - 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}' - ), - entryTypePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryTypes/{entry_type}' - ), - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' - ), - lakePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}' - ), - metadataJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' - ), - partitionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' - ), - projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' - ), - projectLocationLakeZoneActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' - ), - projectLocationLakeZoneAssetActionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' - ), - sessionPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' - ), - taskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' - ), - zonePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' - ), - }; - - // 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 = { - listEntities: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entities'), - listPartitions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'partitions') - }; - - 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.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy',},{get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy',},{get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions',body: '*',},{post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], - },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1/{name=organizations/*/locations/*/operations/*}',}], - }]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - - this.descriptors.longrunning = { - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.dataplex.v1.MetadataService', 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.metadataServiceStub) { - return this.metadataServiceStub; - } - - // Put together the "service stub" for - // google.cloud.dataplex.v1.MetadataService. - this.metadataServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.dataplex.v1.MetadataService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.dataplex.v1.MetadataService, - 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 metadataServiceStubMethods = - ['createEntity', 'updateEntity', 'deleteEntity', 'getEntity', 'listEntities', 'createPartition', 'deletePartition', 'getPartition', 'listPartitions']; - for (const methodName of metadataServiceStubMethods) { - const callPromise = this.metadataServiceStub.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.metadataServiceStub; - } - - /** - * 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 'dataplex.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 'dataplex.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 -- - // ------------------- -/** - * Create a metadata entity. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {google.cloud.dataplex.v1.Entity} request.entity - * Required. Entity resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. - * Please see the {@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/metadata_service.create_entity.js - * region_tag:dataplex_v1_generated_MetadataService_CreateEntity_async - */ - createEntity( - request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|undefined, {}|undefined - ]>; - createEntity( - request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, - {}|null|undefined>): void; - createEntity( - request: protos.google.cloud.dataplex.v1.ICreateEntityRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, - {}|null|undefined>): void; - createEntity( - request?: protos.google.cloud.dataplex.v1.ICreateEntityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.ICreateEntityRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.createEntity(request, options, callback); - } -/** - * Update a metadata entity. Only supports full resource update. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.dataplex.v1.Entity} request.entity - * Required. Update description. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. - * Please see the {@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/metadata_service.update_entity.js - * region_tag:dataplex_v1_generated_MetadataService_UpdateEntity_async - */ - updateEntity( - request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|undefined, {}|undefined - ]>; - updateEntity( - request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, - {}|null|undefined>): void; - updateEntity( - request: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, - {}|null|undefined>): void; - updateEntity( - request?: protos.google.cloud.dataplex.v1.IUpdateEntityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IUpdateEntityRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'entity.name': request.entity!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntity(request, options, callback); - } -/** - * Delete a metadata entity. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param {string} request.etag - * Required. The etag associated with the entity, which can be retrieved with - * a {@link protos.|GetEntity} 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 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/metadata_service.delete_entity.js - * region_tag:dataplex_v1_generated_MetadataService_DeleteEntity_async - */ - deleteEntity( - request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|undefined, {}|undefined - ]>; - deleteEntity( - request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, - {}|null|undefined>): void; - deleteEntity( - request: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, - {}|null|undefined>): void; - deleteEntity( - request?: protos.google.cloud.dataplex.v1.IDeleteEntityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeleteEntityRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.deleteEntity(request, options, callback); - } -/** - * Get a metadata entity. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * @param {google.cloud.dataplex.v1.GetEntityRequest.EntityView} [request.view] - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Entity|Entity}. - * Please see the {@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/metadata_service.get_entity.js - * region_tag:dataplex_v1_generated_MetadataService_GetEntity_async - */ - getEntity( - request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|undefined, {}|undefined - ]>; - getEntity( - request: protos.google.cloud.dataplex.v1.IGetEntityRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, - {}|null|undefined>): void; - getEntity( - request: protos.google.cloud.dataplex.v1.IGetEntityRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, - {}|null|undefined>): void; - getEntity( - request?: protos.google.cloud.dataplex.v1.IGetEntityRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity, - protos.google.cloud.dataplex.v1.IGetEntityRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getEntity(request, options, callback); - } -/** - * Create a metadata partition. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param {google.cloud.dataplex.v1.Partition} request.partition - * Required. Partition resource. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition}. - * Please see the {@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/metadata_service.create_partition.js - * region_tag:dataplex_v1_generated_MetadataService_CreatePartition_async - */ - createPartition( - request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|undefined, {}|undefined - ]>; - createPartition( - request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, - {}|null|undefined>): void; - createPartition( - request: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, - {}|null|undefined>): void; - createPartition( - request?: protos.google.cloud.dataplex.v1.ICreatePartitionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.ICreatePartitionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.createPartition(request, options, callback); - } -/** - * Delete a metadata partition. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param {string} [request.etag] - * Optional. The etag associated with the partition. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for 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/metadata_service.delete_partition.js - * region_tag:dataplex_v1_generated_MetadataService_DeletePartition_async - */ - deletePartition( - request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|undefined, {}|undefined - ]>; - deletePartition( - request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, - {}|null|undefined>): void; - deletePartition( - request: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, - {}|null|undefined>): void; - deletePartition( - request?: protos.google.cloud.dataplex.v1.IDeletePartitionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.dataplex.v1.IDeletePartitionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.deletePartition(request, options, callback); - } -/** - * Get a metadata partition of an entity. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition}. - * Please see the {@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/metadata_service.get_partition.js - * region_tag:dataplex_v1_generated_MetadataService_GetPartition_async - */ - getPartition( - request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|undefined, {}|undefined - ]>; - getPartition( - request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, - {}|null|undefined>): void; - getPartition( - request: protos.google.cloud.dataplex.v1.IGetPartitionRequest, - callback: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, - {}|null|undefined>): void; - getPartition( - request?: protos.google.cloud.dataplex.v1.IGetPartitionRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition, - protos.google.cloud.dataplex.v1.IGetPartitionRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getPartition(request, options, callback); - } - - /** - * List metadata entities in a zone. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view - * Required. Specify the entity view to make a partial list request. - * @param {number} [request.pageSize] - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.Entity|Entity}. - * 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 `listEntitiesAsync()` - * 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. - */ - listEntities( - request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity[], - protos.google.cloud.dataplex.v1.IListEntitiesRequest|null, - protos.google.cloud.dataplex.v1.IListEntitiesResponse - ]>; - listEntities( - request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntitiesRequest, - protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntity>): void; - listEntities( - request: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntitiesRequest, - protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntity>): void; - listEntities( - request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntitiesRequest, - protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntity>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntitiesRequest, - protos.google.cloud.dataplex.v1.IListEntitiesResponse|null|undefined, - protos.google.cloud.dataplex.v1.IEntity>): - Promise<[ - protos.google.cloud.dataplex.v1.IEntity[], - protos.google.cloud.dataplex.v1.IListEntitiesRequest|null, - protos.google.cloud.dataplex.v1.IListEntitiesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listEntities(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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view - * Required. Specify the entity view to make a partial list request. - * @param {number} [request.pageSize] - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * @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.dataplex.v1.Entity|Entity} 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 `listEntitiesAsync()` - * 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. - */ - listEntitiesStream( - request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - 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['listEntities']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntities.createStream( - this.innerApiCalls.listEntities as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEntities`, 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 resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} request.view - * Required. Specify the entity view to make a partial list request. - * @param {number} [request.pageSize] - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * @param {string} [request.filter] - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * @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.dataplex.v1.Entity|Entity}. 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/metadata_service.list_entities.js - * region_tag:dataplex_v1_generated_MetadataService_ListEntities_async - */ - listEntitiesAsync( - request?: protos.google.cloud.dataplex.v1.IListEntitiesRequest, - 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['listEntities']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntities.asyncIterate( - this.innerApiCalls['listEntities'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * List metadata partitions of an entity. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * - * **Notes:** - * - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.Partition|Partition}. - * 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 `listPartitionsAsync()` - * 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. - */ - listPartitions( - request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition[], - protos.google.cloud.dataplex.v1.IListPartitionsRequest|null, - protos.google.cloud.dataplex.v1.IListPartitionsResponse - ]>; - listPartitions( - request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListPartitionsRequest, - protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IPartition>): void; - listPartitions( - request: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListPartitionsRequest, - protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IPartition>): void; - listPartitions( - request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.dataplex.v1.IListPartitionsRequest, - protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IPartition>, - callback?: PaginationCallback< - protos.google.cloud.dataplex.v1.IListPartitionsRequest, - protos.google.cloud.dataplex.v1.IListPartitionsResponse|null|undefined, - protos.google.cloud.dataplex.v1.IPartition>): - Promise<[ - protos.google.cloud.dataplex.v1.IPartition[], - protos.google.cloud.dataplex.v1.IListPartitionsRequest|null, - protos.google.cloud.dataplex.v1.IListPartitionsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listPartitions(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 resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * - * **Notes:** - * - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.dataplex.v1.Partition|Partition} 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 `listPartitionsAsync()` - * 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. - */ - listPartitionsStream( - request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - 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['listPartitions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPartitions.createStream( - this.innerApiCalls.listPartitions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listPartitions`, 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 resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param {number} [request.pageSize] - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * - * **Notes:** - * - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.dataplex.v1.Partition|Partition}. 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/metadata_service.list_partitions.js - * region_tag:dataplex_v1_generated_MetadataService_ListPartitions_async - */ - listPartitionsAsync( - request?: protos.google.cloud.dataplex.v1.IListPartitionsRequest, - 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['listPartitions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPartitions.asyncIterate( - this.innerApiCalls['listPartitions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified aspectType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aspect_type - * @returns {string} Resource name string. - */ - aspectTypePath(project:string,location:string,aspectType:string) { - return this.pathTemplates.aspectTypePathTemplate.render({ - project: project, - location: location, - aspect_type: aspectType, - }); - } - - /** - * Parse the project from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).project; - } - - /** - * Parse the location from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).location; - } - - /** - * Parse the aspect_type from AspectType resource. - * - * @param {string} aspectTypeName - * A fully-qualified path representing AspectType resource. - * @returns {string} A string representing the aspect_type. - */ - matchAspectTypeFromAspectTypeName(aspectTypeName: string) { - return this.pathTemplates.aspectTypePathTemplate.match(aspectTypeName).aspect_type; - } - - /** - * Return a fully-qualified asset resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @returns {string} Resource name string. - */ - assetPath(project:string,location:string,lake:string,zone:string,asset:string) { - return this.pathTemplates.assetPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - }); - } - - /** - * Parse the project from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).project; - } - - /** - * Parse the location from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).location; - } - - /** - * Parse the lake from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).lake; - } - - /** - * Parse the zone from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).zone; - } - - /** - * Parse the asset from Asset resource. - * - * @param {string} assetName - * A fully-qualified path representing Asset resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromAssetName(assetName: string) { - return this.pathTemplates.assetPathTemplate.match(assetName).asset; - } - - /** - * Return a fully-qualified content resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} content - * @returns {string} Resource name string. - */ - contentPath(project:string,location:string,lake:string,content:string) { - return this.pathTemplates.contentPathTemplate.render({ - project: project, - location: location, - lake: lake, - content: content, - }); - } - - /** - * Parse the project from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the project. - */ - matchProjectFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).project; - } - - /** - * Parse the location from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the location. - */ - matchLocationFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).location; - } - - /** - * Parse the lake from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).lake; - } - - /** - * Parse the content from Content resource. - * - * @param {string} contentName - * A fully-qualified path representing Content resource. - * @returns {string} A string representing the content. - */ - matchContentFromContentName(contentName: string) { - return this.pathTemplates.contentPathTemplate.match(contentName).content; - } - - /** - * Return a fully-qualified dataAttribute resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataTaxonomy - * @param {string} data_attribute_id - * @returns {string} Resource name string. - */ - dataAttributePath(project:string,location:string,dataTaxonomy:string,dataAttributeId:string) { - return this.pathTemplates.dataAttributePathTemplate.render({ - project: project, - location: location, - dataTaxonomy: dataTaxonomy, - data_attribute_id: dataAttributeId, - }); - } - - /** - * Parse the project from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).project; - } - - /** - * Parse the location from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).location; - } - - /** - * Parse the dataTaxonomy from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the dataTaxonomy. - */ - matchDataTaxonomyFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).dataTaxonomy; - } - - /** - * Parse the data_attribute_id from DataAttribute resource. - * - * @param {string} dataAttributeName - * A fully-qualified path representing DataAttribute resource. - * @returns {string} A string representing the data_attribute_id. - */ - matchDataAttributeIdFromDataAttributeName(dataAttributeName: string) { - return this.pathTemplates.dataAttributePathTemplate.match(dataAttributeName).data_attribute_id; - } - - /** - * Return a fully-qualified dataAttributeBinding resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_attribute_binding_id - * @returns {string} Resource name string. - */ - dataAttributeBindingPath(project:string,location:string,dataAttributeBindingId:string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.render({ - project: project, - location: location, - data_attribute_binding_id: dataAttributeBindingId, - }); - } - - /** - * Parse the project from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).project; - } - - /** - * Parse the location from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).location; - } - - /** - * Parse the data_attribute_binding_id from DataAttributeBinding resource. - * - * @param {string} dataAttributeBindingName - * A fully-qualified path representing DataAttributeBinding resource. - * @returns {string} A string representing the data_attribute_binding_id. - */ - matchDataAttributeBindingIdFromDataAttributeBindingName(dataAttributeBindingName: string) { - return this.pathTemplates.dataAttributeBindingPathTemplate.match(dataAttributeBindingName).data_attribute_binding_id; - } - - /** - * Return a fully-qualified dataScan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @returns {string} Resource name string. - */ - dataScanPath(project:string,location:string,dataScan:string) { - return this.pathTemplates.dataScanPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - }); - } - - /** - * Parse the project from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; - } - - /** - * Parse the location from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; - } - - /** - * Parse the dataScan from DataScan resource. - * - * @param {string} dataScanName - * A fully-qualified path representing DataScan resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanName(dataScanName: string) { - return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; - } - - /** - * Return a fully-qualified dataScanJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} dataScan - * @param {string} job - * @returns {string} Resource name string. - */ - dataScanJobPath(project:string,location:string,dataScan:string,job:string) { - return this.pathTemplates.dataScanJobPathTemplate.render({ - project: project, - location: location, - dataScan: dataScan, - job: job, - }); - } - - /** - * Parse the project from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).project; - } - - /** - * Parse the location from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).location; - } - - /** - * Parse the dataScan from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the dataScan. - */ - matchDataScanFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).dataScan; - } - - /** - * Parse the job from DataScanJob resource. - * - * @param {string} dataScanJobName - * A fully-qualified path representing DataScanJob resource. - * @returns {string} A string representing the job. - */ - matchJobFromDataScanJobName(dataScanJobName: string) { - return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName).job; - } - - /** - * Return a fully-qualified dataTaxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} data_taxonomy_id - * @returns {string} Resource name string. - */ - dataTaxonomyPath(project:string,location:string,dataTaxonomyId:string) { - return this.pathTemplates.dataTaxonomyPathTemplate.render({ - project: project, - location: location, - data_taxonomy_id: dataTaxonomyId, - }); - } - - /** - * Parse the project from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).project; - } - - /** - * Parse the location from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).location; - } - - /** - * Parse the data_taxonomy_id from DataTaxonomy resource. - * - * @param {string} dataTaxonomyName - * A fully-qualified path representing DataTaxonomy resource. - * @returns {string} A string representing the data_taxonomy_id. - */ - matchDataTaxonomyIdFromDataTaxonomyName(dataTaxonomyName: string) { - return this.pathTemplates.dataTaxonomyPathTemplate.match(dataTaxonomyName).data_taxonomy_id; - } - - /** - * Return a fully-qualified entity resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @returns {string} Resource name string. - */ - entityPath(project:string,location:string,lake:string,zone:string,entity:string) { - return this.pathTemplates.entityPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - }); - } - - /** - * Parse the project from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).project; - } - - /** - * Parse the location from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).location; - } - - /** - * Parse the lake from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).lake; - } - - /** - * Parse the zone from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).zone; - } - - /** - * Parse the entity from Entity resource. - * - * @param {string} entityName - * A fully-qualified path representing Entity resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromEntityName(entityName: string) { - return this.pathTemplates.entityPathTemplate.match(entityName).entity; - } - - /** - * 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 entryType resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_type - * @returns {string} Resource name string. - */ - entryTypePath(project:string,location:string,entryType:string) { - return this.pathTemplates.entryTypePathTemplate.render({ - project: project, - location: location, - entry_type: entryType, - }); - } - - /** - * Parse the project from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).project; - } - - /** - * Parse the location from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).location; - } - - /** - * Parse the entry_type from EntryType resource. - * - * @param {string} entryTypeName - * A fully-qualified path representing EntryType resource. - * @returns {string} A string representing the entry_type. - */ - matchEntryTypeFromEntryTypeName(entryTypeName: string) { - return this.pathTemplates.entryTypePathTemplate.match(entryTypeName).entry_type; - } - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,lake:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the lake from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).lake; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,lake:string,task:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the lake from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).lake; - } - - /** - * Parse the task from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the task. - */ - matchTaskFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).task; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified lake resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @returns {string} Resource name string. - */ - lakePath(project:string,location:string,lake:string) { - return this.pathTemplates.lakePathTemplate.render({ - project: project, - location: location, - lake: lake, - }); - } - - /** - * Parse the project from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).project; - } - - /** - * Parse the location from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).location; - } - - /** - * Parse the lake from Lake resource. - * - * @param {string} lakeName - * A fully-qualified path representing Lake resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromLakeName(lakeName: string) { - return this.pathTemplates.lakePathTemplate.match(lakeName).lake; - } - - /** - * Return a fully-qualified metadataJob resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} metadataJob - * @returns {string} Resource name string. - */ - metadataJobPath(project:string,location:string,metadataJob:string) { - return this.pathTemplates.metadataJobPathTemplate.render({ - project: project, - location: location, - metadataJob: metadataJob, - }); - } - - /** - * Parse the project from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).project; - } - - /** - * Parse the location from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).location; - } - - /** - * Parse the metadataJob from MetadataJob resource. - * - * @param {string} metadataJobName - * A fully-qualified path representing MetadataJob resource. - * @returns {string} A string representing the metadataJob. - */ - matchMetadataJobFromMetadataJobName(metadataJobName: string) { - return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName).metadataJob; - } - - /** - * Return a fully-qualified partition resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} entity - * @param {string} partition - * @returns {string} Resource name string. - */ - partitionPath(project:string,location:string,lake:string,zone:string,entity:string,partition:string) { - return this.pathTemplates.partitionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - entity: entity, - partition: partition, - }); - } - - /** - * Parse the project from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).project; - } - - /** - * Parse the location from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).location; - } - - /** - * Parse the lake from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; - } - - /** - * Parse the zone from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; - } - - /** - * Parse the entity from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the entity. - */ - matchEntityFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; - } - - /** - * Parse the partition from Partition resource. - * - * @param {string} partitionName - * A fully-qualified path representing Partition resource. - * @returns {string} A string representing the partition. - */ - matchPartitionFromPartitionName(partitionName: string) { - return this.pathTemplates.partitionPathTemplate.match(partitionName).partition; - } - - /** - * Return a fully-qualified projectLocationLakeAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeActionPath(project:string,location:string,lake:string,action:string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).lake; - } - - /** - * Parse the action from ProjectLocationLakeAction resource. - * - * @param {string} projectLocationLakeActionName - * A fully-qualified path representing project_location_lake_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeActionName(projectLocationLakeActionName: string) { - return this.pathTemplates.projectLocationLakeActionPathTemplate.match(projectLocationLakeActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneActionPath(project:string,location:string,lake:string,zone:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).zone; - } - - /** - * Parse the action from ProjectLocationLakeZoneAction resource. - * - * @param {string} projectLocationLakeZoneActionName - * A fully-qualified path representing project_location_lake_zone_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneActionName(projectLocationLakeZoneActionName: string) { - return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match(projectLocationLakeZoneActionName).action; - } - - /** - * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @param {string} asset - * @param {string} action - * @returns {string} Resource name string. - */ - projectLocationLakeZoneAssetActionPath(project:string,location:string,lake:string,zone:string,asset:string,action:string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - asset: asset, - action: action, - }); - } - - /** - * Parse the project from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).project; - } - - /** - * Parse the location from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).location; - } - - /** - * Parse the lake from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).lake; - } - - /** - * Parse the zone from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).zone; - } - - /** - * Parse the asset from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the asset. - */ - matchAssetFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).asset; - } - - /** - * Parse the action from ProjectLocationLakeZoneAssetAction resource. - * - * @param {string} projectLocationLakeZoneAssetActionName - * A fully-qualified path representing project_location_lake_zone_asset_action resource. - * @returns {string} A string representing the action. - */ - matchActionFromProjectLocationLakeZoneAssetActionName(projectLocationLakeZoneAssetActionName: string) { - return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match(projectLocationLakeZoneAssetActionName).action; - } - - /** - * Return a fully-qualified session resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} environment - * @param {string} session - * @returns {string} Resource name string. - */ - sessionPath(project:string,location:string,lake:string,environment:string,session:string) { - return this.pathTemplates.sessionPathTemplate.render({ - project: project, - location: location, - lake: lake, - environment: environment, - session: session, - }); - } - - /** - * Parse the project from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).project; - } - - /** - * Parse the location from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).location; - } - - /** - * Parse the lake from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; - } - - /** - * Parse the environment from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).environment; - } - - /** - * Parse the session from Session resource. - * - * @param {string} sessionName - * A fully-qualified path representing Session resource. - * @returns {string} A string representing the session. - */ - matchSessionFromSessionName(sessionName: string) { - return this.pathTemplates.sessionPathTemplate.match(sessionName).session; - } - - /** - * Return a fully-qualified task resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} task - * @returns {string} Resource name string. - */ - taskPath(project:string,location:string,lake:string,task:string) { - return this.pathTemplates.taskPathTemplate.render({ - project: project, - location: location, - lake: lake, - task: task, - }); - } - - /** - * Parse the project from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).project; - } - - /** - * Parse the location from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).location; - } - - /** - * Parse the lake from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).lake; - } - - /** - * Parse the task from Task resource. - * - * @param {string} taskName - * A fully-qualified path representing Task resource. - * @returns {string} A string representing the task. - */ - matchTaskFromTaskName(taskName: string) { - return this.pathTemplates.taskPathTemplate.match(taskName).task; - } - - /** - * Return a fully-qualified zone resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} lake - * @param {string} zone - * @returns {string} Resource name string. - */ - zonePath(project:string,location:string,lake:string,zone:string) { - return this.pathTemplates.zonePathTemplate.render({ - project: project, - location: location, - lake: lake, - zone: zone, - }); - } - - /** - * Parse the project from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the project. - */ - matchProjectFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).project; - } - - /** - * Parse the location from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the location. - */ - matchLocationFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).location; - } - - /** - * Parse the lake from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the lake. - */ - matchLakeFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).lake; - } - - /** - * Parse the zone from Zone resource. - * - * @param {string} zoneName - * A fully-qualified path representing Zone resource. - * @returns {string} A string representing the zone. - */ - matchZoneFromZoneName(zoneName: string) { - return this.pathTemplates.zonePathTemplate.match(zoneName).zone; - } - - /** - * 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.metadataServiceStub && !this._terminated) { - return this.metadataServiceStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json deleted file mode 100644 index f588dd54b21..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_client_config.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.MetadataService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntity": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEntity": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListEntities": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreatePartition": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeletePartition": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPartition": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListPartitions": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json b/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json deleted file mode 100644 index 69e0b730c9f..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/src/v1/metadata_service_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/dataplex/v1/analyze.proto", - "../../protos/google/cloud/dataplex/v1/catalog.proto", - "../../protos/google/cloud/dataplex/v1/content.proto", - "../../protos/google/cloud/dataplex/v1/data_discovery.proto", - "../../protos/google/cloud/dataplex/v1/data_profile.proto", - "../../protos/google/cloud/dataplex/v1/data_quality.proto", - "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", - "../../protos/google/cloud/dataplex/v1/datascans.proto", - "../../protos/google/cloud/dataplex/v1/logs.proto", - "../../protos/google/cloud/dataplex/v1/metadata.proto", - "../../protos/google/cloud/dataplex/v1/processing.proto", - "../../protos/google/cloud/dataplex/v1/resources.proto", - "../../protos/google/cloud/dataplex/v1/security.proto", - "../../protos/google/cloud/dataplex/v1/service.proto", - "../../protos/google/cloud/dataplex/v1/tasks.proto" -] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 1c5aac6a3e9..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const dataplex = require('@google-cloud/dataplex'); - -function main() { - const catalogServiceClient = new dataplex.CatalogServiceClient(); - const contentServiceClient = new dataplex.ContentServiceClient(); - const dataplexServiceClient = new dataplex.DataplexServiceClient(); - const dataScanServiceClient = new dataplex.DataScanServiceClient(); - const dataTaxonomyServiceClient = new dataplex.DataTaxonomyServiceClient(); - const metadataServiceClient = new dataplex.MetadataServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 3a56d307879..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {CatalogServiceClient, ContentServiceClient, DataplexServiceClient, DataScanServiceClient, DataTaxonomyServiceClient, MetadataServiceClient} from '@google-cloud/dataplex'; - -// check that the client class type name can be used -function doStuffWithCatalogServiceClient(client: CatalogServiceClient) { - client.close(); -} -function doStuffWithContentServiceClient(client: ContentServiceClient) { - client.close(); -} -function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { - client.close(); -} -function doStuffWithDataScanServiceClient(client: DataScanServiceClient) { - client.close(); -} -function doStuffWithDataTaxonomyServiceClient(client: DataTaxonomyServiceClient) { - client.close(); -} -function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const catalogServiceClient = new CatalogServiceClient(); - doStuffWithCatalogServiceClient(catalogServiceClient); - // check that the client instance can be created - const contentServiceClient = new ContentServiceClient(); - doStuffWithContentServiceClient(contentServiceClient); - // check that the client instance can be created - const dataplexServiceClient = new DataplexServiceClient(); - doStuffWithDataplexServiceClient(dataplexServiceClient); - // check that the client instance can be created - const dataScanServiceClient = new DataScanServiceClient(); - doStuffWithDataScanServiceClient(dataScanServiceClient); - // check that the client instance can be created - const dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - doStuffWithDataTaxonomyServiceClient(dataTaxonomyServiceClient); - // check that the client instance can be created - const metadataServiceClient = new MetadataServiceClient(); - doStuffWithMetadataServiceClient(metadataServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts b/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts deleted file mode 100644 index 02bce026bf8..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_catalog_service_v1.ts +++ /dev/null @@ -1,6095 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as catalogserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.CatalogServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient(); - 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 = catalogserviceModule.v1.CatalogServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = catalogserviceModule.v1.CatalogServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 catalogserviceModule.v1.CatalogServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = catalogserviceModule.v1.CatalogServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.catalogServiceStub, undefined); - await client.initialize(); - assert(client.catalogServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.catalogServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.catalogServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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 catalogserviceModule.v1.CatalogServiceClient({ - 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('getEntryType', () => { - it('invokes getEntryType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.EntryType() - ); - client.innerApiCalls.getEntryType = stubSimpleCall(expectedResponse); - const [response] = await client.getEntryType(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.EntryType() - ); - client.innerApiCalls.getEntryType = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntryType( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntryType|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryType with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntryType = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntryType(request), expectedError); - const actualRequest = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryType with closed client', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntryType(request), expectedError); - }); - }); - - describe('getAspectType', () => { - it('invokes getAspectType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.AspectType() - ); - client.innerApiCalls.getAspectType = stubSimpleCall(expectedResponse); - const [response] = await client.getAspectType(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAspectType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.AspectType() - ); - client.innerApiCalls.getAspectType = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAspectType( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAspectType|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAspectType with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAspectType = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAspectType(request), expectedError); - const actualRequest = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAspectType with closed client', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAspectType(request), expectedError); - }); - }); - - describe('getEntryGroup', () => { - it('invokes getEntryGroup without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntryGroup( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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('createEntry', () => { - it('invokes createEntry without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.createEntry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntry( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryRequest', ['entry', 'name']); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryRequest', ['entry', 'name']); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.updateEntry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntry( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - 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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.deleteEntry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntry( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntry|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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.getEntry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntry( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.LookupEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.lookupEntry = stubSimpleCall(expectedResponse); - const [response] = await client.lookupEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupEntry without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.LookupEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entry() - ); - client.innerApiCalls.lookupEntry = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lookupEntry( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntry|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupEntry with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.LookupEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.lookupEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.lookupEntry(request), expectedError); - const actualRequest = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.lookupEntry as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes lookupEntry with closed client', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.LookupEntryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.LookupEntryRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - }); - - describe('getMetadataJob', () => { - it('invokes getMetadataJob without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.MetadataJob() - ); - client.innerApiCalls.getMetadataJob = stubSimpleCall(expectedResponse); - const [response] = await client.getMetadataJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadataJob without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.MetadataJob() - ); - client.innerApiCalls.getMetadataJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMetadataJob( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IMetadataJob|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadataJob with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMetadataJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getMetadataJob(request), expectedError); - const actualRequest = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMetadataJob with closed client', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getMetadataJob(request), expectedError); - }); - }); - - describe('cancelMetadataJob', () => { - it('invokes cancelMetadataJob without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelMetadataJob = stubSimpleCall(expectedResponse); - const [response] = await client.cancelMetadataJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelMetadataJob without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelMetadataJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelMetadataJob( - 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.cancelMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelMetadataJob with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelMetadataJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelMetadataJob(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelMetadataJob with closed client', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelMetadataJobRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelMetadataJob(request), expectedError); - }); - }); - - describe('createEntryType', () => { - it('invokes createEntryType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEntryType = stubLongRunningCall(expectedResponse); - const [operation] = await client.createEntryType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEntryType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntryType( - 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.createEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createEntryType(request), expectedError); - const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createEntryType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateEntryTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateEntryTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateEntryTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateEntryTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateEntryType', () => { - it('invokes updateEntryType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() - ); - request.entryType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); - request.entryType.name = defaultValue1; - const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEntryType = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateEntryType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() - ); - request.entryType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); - request.entryType.name = defaultValue1; - const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEntryType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntryType( - 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.updateEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() - ); - request.entryType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); - request.entryType.name = defaultValue1; - const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateEntryType(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryTypeRequest() - ); - request.entryType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryTypeRequest', ['entryType', 'name']); - request.entryType.name = defaultValue1; - const expectedHeaderRequestParams = `entry_type.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateEntryType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateEntryTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateEntryTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateEntryTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateEntryTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteEntryType', () => { - it('invokes deleteEntryType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEntryType = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteEntryType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEntryType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntryType( - 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.deleteEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteEntryType(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteEntryType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntryType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteEntryTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteEntryTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteEntryTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteEntryTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAspectType', () => { - it('invokes createAspectType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAspectType = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAspectType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAspectType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAspectType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAspectType( - 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.createAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAspectType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAspectType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAspectType(request), expectedError); - const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAspectType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAspectTypeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAspectType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAspectType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAspectTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateAspectTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAspectTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateAspectTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAspectType', () => { - it('invokes updateAspectType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() - ); - request.aspectType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); - request.aspectType.name = defaultValue1; - const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAspectType = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAspectType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAspectType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() - ); - request.aspectType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); - request.aspectType.name = defaultValue1; - const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAspectType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAspectType( - 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.updateAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAspectType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() - ); - request.aspectType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); - request.aspectType.name = defaultValue1; - const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAspectType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAspectType(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAspectType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAspectTypeRequest() - ); - request.aspectType ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAspectTypeRequest', ['aspectType', 'name']); - request.aspectType.name = defaultValue1; - const expectedHeaderRequestParams = `aspect_type.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAspectType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAspectType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAspectTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateAspectTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAspectTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateAspectTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAspectType', () => { - it('invokes deleteAspectType without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAspectType = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAspectType(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAspectType without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAspectType = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAspectType( - 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.deleteAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAspectType with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAspectType = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAspectType(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAspectType with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAspectTypeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAspectTypeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAspectType = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAspectType(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAspectType as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAspectTypeProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteAspectTypeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAspectTypeProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteAspectTypeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createEntryGroup', () => { - it('invokes createEntryGroup without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEntryGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.createEntryGroup(request); - const [response] = await operation.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 without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEntryGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntryGroup( - 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.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 call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryGroup = stubLongRunningCall(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 LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntryGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createEntryGroup(request); - await assert.rejects(operation.promise(), 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 checkCreateEntryGroupProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateEntryGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateEntryGroupProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateEntryGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateEntryGroup', () => { - it('invokes updateEntryGroup without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEntryGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateEntryGroup(request); - const [response] = await operation.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 without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEntryGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntryGroup( - 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.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 call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryGroup = stubLongRunningCall(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 LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntryGroupRequest', ['entryGroup', 'name']); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateEntryGroup(request); - await assert.rejects(operation.promise(), 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 checkUpdateEntryGroupProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateEntryGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateEntryGroupProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkUpdateEntryGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteEntryGroup', () => { - it('invokes deleteEntryGroup without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteEntryGroup(request); - const [response] = await operation.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 without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEntryGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntryGroup( - 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.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 call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(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 LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntryGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteEntryGroup(request); - await assert.rejects(operation.promise(), 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 checkDeleteEntryGroupProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteEntryGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteEntryGroupProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkDeleteEntryGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createMetadataJob', () => { - it('invokes createMetadataJob without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createMetadataJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.createMetadataJob(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMetadataJob without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createMetadataJob = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createMetadataJob( - 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.createMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMetadataJob with call error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMetadataJob = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createMetadataJob(request), expectedError); - const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMetadataJob with LRO error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMetadataJob = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createMetadataJob(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMetadataJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateMetadataJobProgress without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateMetadataJobProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateMetadataJobProgress with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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.checkCreateMetadataJobProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listEntryTypes', () => { - it('invokes listEntryTypes without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.innerApiCalls.listEntryTypes = stubSimpleCall(expectedResponse); - const [response] = await client.listEntryTypes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryTypes without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.innerApiCalls.listEntryTypes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntryTypes( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntryType[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryTypes with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntryTypes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEntryTypes(request), expectedError); - const actualRequest = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntryTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryTypesStream without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.descriptors.page.listEntryTypes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEntryTypesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.EntryType[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.EntryType) => { - 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.listEntryTypes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEntryTypes, request)); - assert( - (client.descriptors.page.listEntryTypes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntryTypesStream with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryTypes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEntryTypesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.EntryType[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.EntryType) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEntryTypes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEntryTypes, request)); - assert( - (client.descriptors.page.listEntryTypes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryTypes without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.descriptors.page.listEntryTypes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IEntryType[] = []; - const iterable = client.listEntryTypesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryTypes with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryTypes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEntryTypesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IEntryType[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEntryTypes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAspectTypes', () => { - it('invokes listAspectTypes without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - ]; - client.innerApiCalls.listAspectTypes = stubSimpleCall(expectedResponse); - const [response] = await client.listAspectTypes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAspectTypes without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - ]; - client.innerApiCalls.listAspectTypes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAspectTypes( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAspectType[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAspectTypes with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAspectTypes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAspectTypes(request), expectedError); - const actualRequest = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAspectTypes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAspectTypesStream without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - ]; - client.descriptors.page.listAspectTypes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAspectTypesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.AspectType[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.AspectType) => { - 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.listAspectTypes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAspectTypes, request)); - assert( - (client.descriptors.page.listAspectTypes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAspectTypesStream with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAspectTypes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAspectTypesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.AspectType[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.AspectType) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAspectTypes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAspectTypes, request)); - assert( - (client.descriptors.page.listAspectTypes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAspectTypes without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.AspectType()), - ]; - client.descriptors.page.listAspectTypes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAspectType[] = []; - const iterable = client.listAspectTypesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAspectTypes with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAspectTypesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAspectTypesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAspectTypes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAspectTypesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAspectType[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAspectTypes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEntryGroups', () => { - it('invokes listEntryGroups without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - ]; - client.innerApiCalls.listEntryGroups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntryGroups( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.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.dataplex.v1.EntryGroup[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.v1.EntryGroup[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntryGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryGroup()), - ]; - client.descriptors.page.listEntryGroups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - ]; - client.innerApiCalls.listEntries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntries( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.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.dataplex.v1.Entry[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.v1.Entry[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - ]; - client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.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.dataplex.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('searchEntries', () => { - it('invokes searchEntries without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - ]; - client.innerApiCalls.searchEntries = stubSimpleCall(expectedResponse); - const [response] = await client.searchEntries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes searchEntries without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - ]; - client.innerApiCalls.searchEntries = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchEntries( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ISearchEntriesResult[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes searchEntries with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.searchEntries = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.searchEntries(request), expectedError); - const actualRequest = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.searchEntries as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes searchEntriesStream without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - ]; - client.descriptors.page.searchEntries.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.searchEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { - 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.searchEntries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.searchEntries, request)); - assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes searchEntriesStream with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.searchEntries.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.searchEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.searchEntries.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.searchEntries, request)); - assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with searchEntries without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.SearchEntriesResult()), - ]; - client.descriptors.page.searchEntries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = []; - const iterable = client.searchEntriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with searchEntries with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.SearchEntriesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.searchEntries.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchEntriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listMetadataJobs', () => { - it('invokes listMetadataJobs without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - ]; - client.innerApiCalls.listMetadataJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listMetadataJobs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMetadataJobs without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - ]; - client.innerApiCalls.listMetadataJobs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMetadataJobs( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IMetadataJob[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMetadataJobs with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMetadataJobs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listMetadataJobs(request), expectedError); - const actualRequest = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMetadataJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMetadataJobsStream without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - ]; - client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMetadataJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.MetadataJob) => { - 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.listMetadataJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMetadataJobs, request)); - assert( - (client.descriptors.page.listMetadataJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listMetadataJobsStream with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMetadataJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.MetadataJob) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listMetadataJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMetadataJobs, request)); - assert( - (client.descriptors.page.listMetadataJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listMetadataJobs without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.MetadataJob()), - ]; - client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; - const iterable = client.listMetadataJobsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listMetadataJobs with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListMetadataJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMetadataJobsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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 catalogserviceModule.v1.CatalogServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - 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('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new catalogserviceModule.v1.CatalogServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts deleted file mode 100644 index 9cea4fbab46..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_content_service_v1.ts +++ /dev/null @@ -1,2940 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as contentserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function 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.ContentServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new contentserviceModule.v1.ContentServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new contentserviceModule.v1.ContentServiceClient(); - 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 = contentserviceModule.v1.ContentServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = contentserviceModule.v1.ContentServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new contentserviceModule.v1.ContentServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 contentserviceModule.v1.ContentServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = contentserviceModule.v1.ContentServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new contentserviceModule.v1.ContentServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.contentServiceStub, undefined); - await client.initialize(); - assert(client.contentServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.contentServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.contentServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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('createContent', () => { - it('invokes createContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.createContent = stubSimpleCall(expectedResponse); - const [response] = await client.createContent(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createContent without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.createContent = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createContent( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createContent = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createContent(request), expectedError); - const actualRequest = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createContent with closed client', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createContent(request), expectedError); - }); - }); - - describe('updateContent', () => { - it('invokes updateContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateContentRequest() - ); - request.content ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); - request.content.name = defaultValue1; - const expectedHeaderRequestParams = `content.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.updateContent = stubSimpleCall(expectedResponse); - const [response] = await client.updateContent(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateContent without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateContentRequest() - ); - request.content ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); - request.content.name = defaultValue1; - const expectedHeaderRequestParams = `content.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.updateContent = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateContent( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateContentRequest() - ); - request.content ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); - request.content.name = defaultValue1; - const expectedHeaderRequestParams = `content.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateContent = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateContent(request), expectedError); - const actualRequest = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateContent with closed client', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateContentRequest() - ); - request.content ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateContentRequest', ['content', 'name']); - request.content.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateContent(request), expectedError); - }); - }); - - describe('deleteContent', () => { - it('invokes deleteContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteContent = stubSimpleCall(expectedResponse); - const [response] = await client.deleteContent(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteContent without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteContent = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteContent( - 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.deleteContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteContent = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteContent(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteContent with closed client', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteContentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteContent(request), expectedError); - }); - }); - - describe('getContent', () => { - it('invokes getContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.getContent = stubSimpleCall(expectedResponse); - const [response] = await client.getContent(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getContent without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Content() - ); - client.innerApiCalls.getContent = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getContent( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getContent = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getContent(request), expectedError); - const actualRequest = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getContent with closed client', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetContentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getContent(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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('listContent', () => { - it('invokes listContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.innerApiCalls.listContent = stubSimpleCall(expectedResponse); - const [response] = await client.listContent(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listContent without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.innerApiCalls.listContent = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listContent( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IContent[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listContent = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listContent(request), expectedError); - const actualRequest = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listContent as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listContentStream without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.descriptors.page.listContent.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listContentStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Content[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Content) => { - 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.listContent.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listContent, request)); - assert( - (client.descriptors.page.listContent.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listContentStream with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listContent.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listContentStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Content[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Content) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listContent.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listContent, request)); - assert( - (client.descriptors.page.listContent.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listContent without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Content()), - ]; - client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IContent[] = []; - const iterable = client.listContentAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listContent.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listContent.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listContent with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListContentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListContentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listContent.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listContentAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IContent[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listContent.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listContent.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - 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 contentserviceModule.v1.ContentServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new contentserviceModule.v1.ContentServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts deleted file mode 100644 index dbd7401ad74..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_scan_service_v1.ts +++ /dev/null @@ -1,3377 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as datascanserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.DataScanServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient(); - 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 = datascanserviceModule.v1.DataScanServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datascanserviceModule.v1.DataScanServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datascanserviceModule.v1.DataScanServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = datascanserviceModule.v1.DataScanServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataScanServiceStub, undefined); - await client.initialize(); - assert(client.dataScanServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataScanServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataScanServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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 datascanserviceModule.v1.DataScanServiceClient({ - 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('getDataScan', () => { - it('invokes getDataScan without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataScan() - ); - client.innerApiCalls.getDataScan = stubSimpleCall(expectedResponse); - const [response] = await client.getDataScan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScan without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataScan() - ); - client.innerApiCalls.getDataScan = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataScan( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScan|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScan with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataScan = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataScan(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScan with closed client', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataScan(request), expectedError); - }); - }); - - describe('runDataScan', () => { - it('invokes runDataScan without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanResponse() - ); - client.innerApiCalls.runDataScan = stubSimpleCall(expectedResponse); - const [response] = await client.runDataScan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runDataScan without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanResponse() - ); - client.innerApiCalls.runDataScan = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runDataScan( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IRunDataScanResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runDataScan with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.runDataScan = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runDataScan(request), expectedError); - const actualRequest = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runDataScan with closed client', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.runDataScan(request), expectedError); - }); - }); - - describe('getDataScanJob', () => { - it('invokes getDataScanJob without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataScanJob() - ); - client.innerApiCalls.getDataScanJob = stubSimpleCall(expectedResponse); - const [response] = await client.getDataScanJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScanJob without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataScanJob() - ); - client.innerApiCalls.getDataScanJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataScanJob( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScanJob|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScanJob with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataScanJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataScanJob(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataScanJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataScanJob with closed client', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataScanJobRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataScanJob(request), expectedError); - }); - }); - - describe('generateDataQualityRules', () => { - it('invokes generateDataQualityRules without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse() - ); - client.innerApiCalls.generateDataQualityRules = stubSimpleCall(expectedResponse); - const [response] = await client.generateDataQualityRules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateDataQualityRules without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse() - ); - client.innerApiCalls.generateDataQualityRules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.generateDataQualityRules( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IGenerateDataQualityRulesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateDataQualityRules with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.generateDataQualityRules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.generateDataQualityRules(request), expectedError); - const actualRequest = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateDataQualityRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateDataQualityRules with closed client', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.generateDataQualityRules(request), expectedError); - }); - }); - - describe('createDataScan', () => { - it('invokes createDataScan without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataScan = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDataScan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataScan without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataScan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDataScan( - 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.createDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataScan with call error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataScan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDataScan(request), expectedError); - const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataScan with LRO error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataScanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataScan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDataScan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDataScanProgress without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkCreateDataScanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDataScanProgress with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkCreateDataScanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataScan', () => { - it('invokes updateDataScan without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() - ); - request.dataScan ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); - request.dataScan.name = defaultValue1; - const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataScan = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataScan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataScan without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() - ); - request.dataScan ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); - request.dataScan.name = defaultValue1; - const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataScan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataScan( - 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.updateDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataScan with call error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() - ); - request.dataScan ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); - request.dataScan.name = defaultValue1; - const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataScan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataScan(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataScan with LRO error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() - ); - request.dataScan ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataScanRequest', ['dataScan', 'name']); - request.dataScan.name = defaultValue1; - const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataScan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataScan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataScanProgress without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkUpdateDataScanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataScanProgress with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkUpdateDataScanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDataScan', () => { - it('invokes deleteDataScan without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataScan = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDataScan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataScan without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataScan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDataScan( - 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.deleteDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataScan with call error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataScan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDataScan(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataScan with LRO error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataScanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataScan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDataScan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataScan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDataScanProgress without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkDeleteDataScanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDataScanProgress with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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.checkDeleteDataScanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listDataScans', () => { - it('invokes listDataScans without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - ]; - client.innerApiCalls.listDataScans = stubSimpleCall(expectedResponse); - const [response] = await client.listDataScans(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScans without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - ]; - client.innerApiCalls.listDataScans = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataScans( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScan[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScans with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataScans = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataScans(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScansStream without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - ]; - client.descriptors.page.listDataScans.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataScansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScan) => { - 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.listDataScans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataScans, request)); - assert( - (client.descriptors.page.listDataScans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataScansStream with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataScans.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataScansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScan) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataScans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataScans, request)); - assert( - (client.descriptors.page.listDataScans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataScans without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), - ]; - client.descriptors.page.listDataScans.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; - const iterable = client.listDataScansAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataScans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataScans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataScans with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataScans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataScansAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataScans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataScans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataScanJobs', () => { - it('invokes listDataScanJobs without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - ]; - client.innerApiCalls.listDataScanJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listDataScanJobs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScanJobs without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - ]; - client.innerApiCalls.listDataScanJobs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataScanJobs( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataScanJob[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScanJobs with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataScanJobs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataScanJobs(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataScanJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataScanJobsStream without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - ]; - client.descriptors.page.listDataScanJobs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataScanJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScanJob) => { - 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.listDataScanJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataScanJobs, request)); - assert( - (client.descriptors.page.listDataScanJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataScanJobsStream with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataScanJobs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataScanJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataScanJob) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataScanJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataScanJobs, request)); - assert( - (client.descriptors.page.listDataScanJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataScanJobs without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScanJob()), - ]; - client.descriptors.page.listDataScanJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; - const iterable = client.listDataScanJobsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataScanJobs with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataScanJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataScanJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataScanJobsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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 datascanserviceModule.v1.DataScanServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - 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('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new datascanserviceModule.v1.DataScanServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts deleted file mode 100644 index 781c09dbc90..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_data_taxonomy_service_v1.ts +++ /dev/null @@ -1,4446 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as datataxonomyserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.DataTaxonomyServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); - 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 = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = datataxonomyserviceModule.v1.DataTaxonomyServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataTaxonomyServiceStub, undefined); - await client.initialize(); - assert(client.dataTaxonomyServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataTaxonomyServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataTaxonomyServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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('getDataTaxonomy', () => { - it('invokes getDataTaxonomy without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataTaxonomy() - ); - client.innerApiCalls.getDataTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.getDataTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataTaxonomy without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataTaxonomy() - ); - client.innerApiCalls.getDataTaxonomy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataTaxonomy( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataTaxonomy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataTaxonomy with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataTaxonomy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataTaxonomy(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataTaxonomy with closed client', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataTaxonomy(request), expectedError); - }); - }); - - describe('getDataAttributeBinding', () => { - it('invokes getDataAttributeBinding without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataAttributeBinding() - ); - client.innerApiCalls.getDataAttributeBinding = stubSimpleCall(expectedResponse); - const [response] = await client.getDataAttributeBinding(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttributeBinding without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataAttributeBinding() - ); - client.innerApiCalls.getDataAttributeBinding = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataAttributeBinding( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttributeBinding|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttributeBinding with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataAttributeBinding = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataAttributeBinding(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttributeBinding with closed client', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataAttributeBinding(request), expectedError); - }); - }); - - describe('getDataAttribute', () => { - it('invokes getDataAttribute without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataAttribute() - ); - client.innerApiCalls.getDataAttribute = stubSimpleCall(expectedResponse); - const [response] = await client.getDataAttribute(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttribute without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DataAttribute() - ); - client.innerApiCalls.getDataAttribute = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataAttribute( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttribute|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttribute with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataAttribute = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataAttribute(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataAttribute with closed client', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataAttribute(request), expectedError); - }); - }); - - describe('createDataTaxonomy', () => { - it('invokes createDataTaxonomy without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDataTaxonomy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataTaxonomy without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDataTaxonomy( - 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.createDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataTaxonomy with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDataTaxonomy(request), expectedError); - const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataTaxonomy with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataTaxonomyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDataTaxonomy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDataTaxonomyProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataTaxonomyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDataTaxonomyProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataTaxonomyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataTaxonomy', () => { - it('invokes updateDataTaxonomy without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() - ); - request.dataTaxonomy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); - request.dataTaxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataTaxonomy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataTaxonomy without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() - ); - request.dataTaxonomy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); - request.dataTaxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataTaxonomy( - 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.updateDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataTaxonomy with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() - ); - request.dataTaxonomy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); - request.dataTaxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataTaxonomy(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataTaxonomy with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest() - ); - request.dataTaxonomy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest', ['dataTaxonomy', 'name']); - request.dataTaxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `data_taxonomy.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataTaxonomy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataTaxonomyProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataTaxonomyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataTaxonomyProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataTaxonomyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDataTaxonomy', () => { - it('invokes deleteDataTaxonomy without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDataTaxonomy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataTaxonomy without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDataTaxonomy( - 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.deleteDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataTaxonomy with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDataTaxonomy(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataTaxonomy with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataTaxonomy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDataTaxonomy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataTaxonomy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDataTaxonomyProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataTaxonomyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDataTaxonomyProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataTaxonomyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createDataAttributeBinding', () => { - it('invokes createDataAttributeBinding without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDataAttributeBinding(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttributeBinding without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDataAttributeBinding( - 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.createDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttributeBinding with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDataAttributeBinding(request), expectedError); - const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttributeBinding with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDataAttributeBinding(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDataAttributeBindingProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataAttributeBindingProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDataAttributeBindingProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataAttributeBindingProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataAttributeBinding', () => { - it('invokes updateDataAttributeBinding without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() - ); - request.dataAttributeBinding ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); - request.dataAttributeBinding.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataAttributeBinding(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttributeBinding without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() - ); - request.dataAttributeBinding ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); - request.dataAttributeBinding.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataAttributeBinding( - 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.updateDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttributeBinding with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() - ); - request.dataAttributeBinding ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); - request.dataAttributeBinding.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataAttributeBinding(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttributeBinding with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest() - ); - request.dataAttributeBinding ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest', ['dataAttributeBinding', 'name']); - request.dataAttributeBinding.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute_binding.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataAttributeBinding(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataAttributeBindingProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataAttributeBindingProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataAttributeBindingProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataAttributeBindingProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDataAttributeBinding', () => { - it('invokes deleteDataAttributeBinding without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDataAttributeBinding(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttributeBinding without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDataAttributeBinding( - 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.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttributeBinding with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDataAttributeBinding(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttributeBinding with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataAttributeBinding = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDataAttributeBinding(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttributeBinding as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDataAttributeBindingProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataAttributeBindingProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDataAttributeBindingProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataAttributeBindingProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createDataAttribute', () => { - it('invokes createDataAttribute without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataAttribute = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDataAttribute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttribute without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDataAttribute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDataAttribute( - 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.createDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttribute with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataAttribute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDataAttribute(request), expectedError); - const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDataAttribute with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateDataAttributeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDataAttribute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDataAttributeProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataAttributeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDataAttributeProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkCreateDataAttributeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataAttribute', () => { - it('invokes updateDataAttribute without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() - ); - request.dataAttribute ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); - request.dataAttribute.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataAttribute = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataAttribute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttribute without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() - ); - request.dataAttribute ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); - request.dataAttribute.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataAttribute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataAttribute( - 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.updateDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttribute with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() - ); - request.dataAttribute ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); - request.dataAttribute.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataAttribute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataAttribute(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataAttribute with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateDataAttributeRequest() - ); - request.dataAttribute ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateDataAttributeRequest', ['dataAttribute', 'name']); - request.dataAttribute.name = defaultValue1; - const expectedHeaderRequestParams = `data_attribute.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataAttribute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataAttributeProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataAttributeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataAttributeProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkUpdateDataAttributeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDataAttribute', () => { - it('invokes deleteDataAttribute without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDataAttribute(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttribute without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDataAttribute = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDataAttribute( - 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.deleteDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttribute with call error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDataAttribute(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDataAttribute with LRO error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteDataAttributeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteDataAttributeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDataAttribute = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDataAttribute(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDataAttribute as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDataAttributeProgress without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataAttributeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDataAttributeProgress with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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.checkDeleteDataAttributeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listDataTaxonomies', () => { - it('invokes listDataTaxonomies without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - ]; - client.innerApiCalls.listDataTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.listDataTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataTaxonomies without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - ]; - client.innerApiCalls.listDataTaxonomies = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataTaxonomies( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataTaxonomy[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataTaxonomies with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataTaxonomies = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataTaxonomies(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataTaxonomies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataTaxonomiesStream without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - ]; - client.descriptors.page.listDataTaxonomies.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataTaxonomy[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataTaxonomy) => { - 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.listDataTaxonomies.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataTaxonomies, request)); - assert( - (client.descriptors.page.listDataTaxonomies.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataTaxonomiesStream with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataTaxonomies.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataTaxonomy[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataTaxonomy) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataTaxonomies.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataTaxonomies, request)); - assert( - (client.descriptors.page.listDataTaxonomies.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataTaxonomies without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataTaxonomy()), - ]; - client.descriptors.page.listDataTaxonomies.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IDataTaxonomy[] = []; - const iterable = client.listDataTaxonomiesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataTaxonomies with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataTaxonomiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataTaxonomiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataTaxonomies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataTaxonomiesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IDataTaxonomy[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataTaxonomies.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataAttributeBindings', () => { - it('invokes listDataAttributeBindings without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - ]; - client.innerApiCalls.listDataAttributeBindings = stubSimpleCall(expectedResponse); - const [response] = await client.listDataAttributeBindings(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributeBindings without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - ]; - client.innerApiCalls.listDataAttributeBindings = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataAttributeBindings( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttributeBinding[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributeBindings with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataAttributeBindings = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataAttributeBindings(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributeBindings as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributeBindingsStream without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - ]; - client.descriptors.page.listDataAttributeBindings.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataAttributeBindingsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataAttributeBinding[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttributeBinding) => { - 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.listDataAttributeBindings.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataAttributeBindings, request)); - assert( - (client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataAttributeBindingsStream with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataAttributeBindings.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataAttributeBindingsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataAttributeBinding[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttributeBinding) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataAttributeBindings, request)); - assert( - (client.descriptors.page.listDataAttributeBindings.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataAttributeBindings without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttributeBinding()), - ]; - client.descriptors.page.listDataAttributeBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IDataAttributeBinding[] = []; - const iterable = client.listDataAttributeBindingsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataAttributeBindings with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataAttributeBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataAttributeBindingsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IDataAttributeBinding[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataAttributeBindings.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataAttributes', () => { - it('invokes listDataAttributes without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - ]; - client.innerApiCalls.listDataAttributes = stubSimpleCall(expectedResponse); - const [response] = await client.listDataAttributes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributes without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - ]; - client.innerApiCalls.listDataAttributes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataAttributes( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IDataAttribute[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributes with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataAttributes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataAttributes(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataAttributes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataAttributesStream without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - ]; - client.descriptors.page.listDataAttributes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataAttributesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataAttribute[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttribute) => { - 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.listDataAttributes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataAttributes, request)); - assert( - (client.descriptors.page.listDataAttributes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataAttributesStream with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataAttributes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataAttributesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.DataAttribute[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.DataAttribute) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataAttributes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataAttributes, request)); - assert( - (client.descriptors.page.listDataAttributes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataAttributes without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.DataAttribute()), - ]; - client.descriptors.page.listDataAttributes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IDataAttribute[] = []; - const iterable = client.listDataAttributesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataAttributes with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListDataAttributesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListDataAttributesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataAttributes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataAttributesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IDataAttribute[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataAttributes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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 datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - 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('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts deleted file mode 100644 index 53c410aaff1..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_dataplex_service_v1.ts +++ /dev/null @@ -1,7633 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as dataplexserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.DataplexServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient(); - 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 = dataplexserviceModule.v1.DataplexServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = dataplexserviceModule.v1.DataplexServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 dataplexserviceModule.v1.DataplexServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = dataplexserviceModule.v1.DataplexServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataplexServiceStub, undefined); - await client.initialize(); - assert(client.dataplexServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataplexServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataplexServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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 dataplexserviceModule.v1.DataplexServiceClient({ - 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('getLake', () => { - it('invokes getLake without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Lake() - ); - client.innerApiCalls.getLake = stubSimpleCall(expectedResponse); - const [response] = await client.getLake(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getLake without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Lake() - ); - client.innerApiCalls.getLake = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLake( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ILake|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getLake with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getLake = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLake(request), expectedError); - const actualRequest = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getLake with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetLakeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getLake(request), expectedError); - }); - }); - - describe('getZone', () => { - it('invokes getZone without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Zone() - ); - client.innerApiCalls.getZone = stubSimpleCall(expectedResponse); - const [response] = await client.getZone(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getZone without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Zone() - ); - client.innerApiCalls.getZone = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getZone( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IZone|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getZone with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getZone = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getZone(request), expectedError); - const actualRequest = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getZone with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetZoneRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getZone(request), expectedError); - }); - }); - - describe('getAsset', () => { - it('invokes getAsset without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Asset() - ); - client.innerApiCalls.getAsset = stubSimpleCall(expectedResponse); - const [response] = await client.getAsset(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAsset without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Asset() - ); - client.innerApiCalls.getAsset = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAsset( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAsset|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAsset with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAsset = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAsset(request), expectedError); - const actualRequest = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAsset with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetAssetRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAsset(request), expectedError); - }); - }); - - describe('getTask', () => { - it('invokes getTask without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Task() - ); - client.innerApiCalls.getTask = stubSimpleCall(expectedResponse); - const [response] = await client.getTask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTask without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Task() - ); - client.innerApiCalls.getTask = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTask( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ITask|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTask with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getTask(request), expectedError); - const actualRequest = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTask with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetTaskRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTask(request), expectedError); - }); - }); - - describe('runTask', () => { - it('invokes runTask without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskResponse() - ); - client.innerApiCalls.runTask = stubSimpleCall(expectedResponse); - const [response] = await client.runTask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runTask without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskResponse() - ); - client.innerApiCalls.runTask = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.runTask( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IRunTaskResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runTask with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.runTask = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.runTask(request), expectedError); - const actualRequest = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.runTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes runTask with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.RunTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.RunTaskRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.runTask(request), expectedError); - }); - }); - - describe('getJob', () => { - it('invokes getJob without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Job() - ); - client.innerApiCalls.getJob = stubSimpleCall(expectedResponse); - const [response] = await client.getJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJob without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Job() - ); - client.innerApiCalls.getJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJob( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IJob|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJob with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getJob(request), expectedError); - const actualRequest = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJob with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetJobRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getJob(request), expectedError); - }); - }); - - describe('cancelJob', () => { - it('invokes cancelJob without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelJob = stubSimpleCall(expectedResponse); - const [response] = await client.cancelJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelJob without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.cancelJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelJob( - 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.cancelJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelJob with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelJob(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelJob with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CancelJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CancelJobRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelJob(request), expectedError); - }); - }); - - describe('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEnvironment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with closed client', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEnvironment(request), expectedError); - }); - }); - - describe('createLake', () => { - it('invokes createLake without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createLake = stubLongRunningCall(expectedResponse); - const [operation] = await client.createLake(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createLake without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createLake = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createLake( - 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.createLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createLake with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createLake = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createLake(request), expectedError); - const actualRequest = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createLake with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateLakeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createLake = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createLake(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateLakeProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateLakeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateLakeProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateLakeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateLake', () => { - it('invokes updateLake without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateLakeRequest() - ); - request.lake ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); - request.lake.name = defaultValue1; - const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateLake = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateLake(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateLake without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateLakeRequest() - ); - request.lake ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); - request.lake.name = defaultValue1; - const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateLake = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateLake( - 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.updateLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateLake with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateLakeRequest() - ); - request.lake ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); - request.lake.name = defaultValue1; - const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateLake = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateLake(request), expectedError); - const actualRequest = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateLake with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateLakeRequest() - ); - request.lake ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateLakeRequest', ['lake', 'name']); - request.lake.name = defaultValue1; - const expectedHeaderRequestParams = `lake.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateLake = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateLake(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateLakeProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateLakeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateLakeProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateLakeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteLake', () => { - it('invokes deleteLake without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteLake = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteLake(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteLake without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteLake = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteLake( - 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.deleteLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteLake with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteLake = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteLake(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteLake with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteLakeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteLakeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteLake = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteLake(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteLake as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteLakeProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteLakeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteLakeProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteLakeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createZone', () => { - it('invokes createZone without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createZone = stubLongRunningCall(expectedResponse); - const [operation] = await client.createZone(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createZone without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createZone = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createZone( - 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.createZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createZone with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createZone = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createZone(request), expectedError); - const actualRequest = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createZone with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateZoneRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createZone = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createZone(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateZoneProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateZoneProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateZoneProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateZoneProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateZone', () => { - it('invokes updateZone without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateZoneRequest() - ); - request.zone ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); - request.zone.name = defaultValue1; - const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateZone = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateZone(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateZone without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateZoneRequest() - ); - request.zone ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); - request.zone.name = defaultValue1; - const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateZone = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateZone( - 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.updateZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateZone with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateZoneRequest() - ); - request.zone ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); - request.zone.name = defaultValue1; - const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateZone = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateZone(request), expectedError); - const actualRequest = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateZone with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateZoneRequest() - ); - request.zone ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateZoneRequest', ['zone', 'name']); - request.zone.name = defaultValue1; - const expectedHeaderRequestParams = `zone.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateZone = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateZone(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateZoneProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateZoneProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateZoneProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateZoneProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteZone', () => { - it('invokes deleteZone without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteZone = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteZone(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteZone without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteZone = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteZone( - 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.deleteZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteZone with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteZone = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteZone(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteZone with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteZone = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteZone(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteZoneProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteZoneProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteZoneProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteZoneProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAsset', () => { - it('invokes createAsset without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAsset = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAsset(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAsset without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAsset = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAsset( - 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.createAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAsset with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAsset = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAsset(request), expectedError); - const actualRequest = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAsset with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateAssetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAsset = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAsset(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAssetProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateAssetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAssetProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateAssetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAsset', () => { - it('invokes updateAsset without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAssetRequest() - ); - request.asset ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); - request.asset.name = defaultValue1; - const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAsset = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAsset(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAsset without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAssetRequest() - ); - request.asset ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); - request.asset.name = defaultValue1; - const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAsset = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAsset( - 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.updateAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAsset with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAssetRequest() - ); - request.asset ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); - request.asset.name = defaultValue1; - const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAsset = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAsset(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAsset with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateAssetRequest() - ); - request.asset ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateAssetRequest', ['asset', 'name']); - request.asset.name = defaultValue1; - const expectedHeaderRequestParams = `asset.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAsset = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAsset(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAssetProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateAssetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAssetProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateAssetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAsset', () => { - it('invokes deleteAsset without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAsset = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAsset(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAsset without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAsset = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAsset( - 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.deleteAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAsset with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAsset = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAsset(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAsset with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteAssetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteAssetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAsset = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAsset(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAsset as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAssetProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteAssetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAssetProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteAssetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createTask', () => { - it('invokes createTask without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createTask = stubLongRunningCall(expectedResponse); - const [operation] = await client.createTask(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTask without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createTask = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTask( - 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.createTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTask with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTask = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createTask(request), expectedError); - const actualRequest = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTask with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateTaskRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTask = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createTask(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateTaskProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateTaskProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateTaskProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkCreateTaskProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateTask', () => { - it('invokes updateTask without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateTaskRequest() - ); - request.task ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); - request.task.name = defaultValue1; - const expectedHeaderRequestParams = `task.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateTask = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateTask(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTask without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateTaskRequest() - ); - request.task ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); - request.task.name = defaultValue1; - const expectedHeaderRequestParams = `task.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateTask = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTask( - 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.updateTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTask with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateTaskRequest() - ); - request.task ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); - request.task.name = defaultValue1; - const expectedHeaderRequestParams = `task.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTask = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateTask(request), expectedError); - const actualRequest = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTask with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateTaskRequest() - ); - request.task ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateTaskRequest', ['task', 'name']); - request.task.name = defaultValue1; - const expectedHeaderRequestParams = `task.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTask = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateTask(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateTaskProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateTaskProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateTaskProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkUpdateTaskProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteTask', () => { - it('invokes deleteTask without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteTask = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteTask(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTask without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteTask = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTask( - 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.deleteTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTask with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTask = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteTask(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTask with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteTaskRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteTaskRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTask = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteTask(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTask as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteTaskProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteTaskProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteTaskProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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.checkDeleteTaskProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createEnvironment', () => { - it('invokes createEnvironment without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateEnvironmentProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateEnvironmentProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateEnvironment', () => { - it('invokes updateEnvironment without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() - ); - request.environment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); - request.environment.name = defaultValue1; - const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() - ); - request.environment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); - request.environment.name = defaultValue1; - const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() - ); - request.environment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); - request.environment.name = defaultValue1; - const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEnvironmentRequest() - ); - request.environment ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEnvironmentRequest', ['environment', 'name']); - request.environment.name = defaultValue1; - const expectedHeaderRequestParams = `environment.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateEnvironmentProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateEnvironmentProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteEnvironment', () => { - it('invokes deleteEnvironment without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEnvironment( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with call error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with LRO error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteEnvironmentProgress without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteEnvironmentProgress with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listLakes', () => { - it('invokes listLakes without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.innerApiCalls.listLakes = stubSimpleCall(expectedResponse); - const [response] = await client.listLakes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakes without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.innerApiCalls.listLakes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listLakes( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ILake[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakes with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listLakes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listLakes(request), expectedError); - const actualRequest = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakesStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.descriptors.page.listLakes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listLakesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Lake[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { - 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.listLakes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listLakes, request)); - assert( - (client.descriptors.page.listLakes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listLakesStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listLakes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listLakesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Lake[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Lake) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listLakes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listLakes, request)); - assert( - (client.descriptors.page.listLakes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listLakes without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Lake()), - ]; - client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ILake[] = []; - const iterable = client.listLakesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listLakes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listLakes with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listLakes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLakesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ILake[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listLakes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listLakes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listLakeActions', () => { - it('invokes listLakeActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listLakeActions = stubSimpleCall(expectedResponse); - const [response] = await client.listLakeActions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakeActions without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listLakeActions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listLakeActions( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakeActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listLakeActions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listLakeActions(request), expectedError); - const actualRequest = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listLakeActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listLakeActionsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listLakeActions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listLakeActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - 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.listLakeActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listLakeActions, request)); - assert( - (client.descriptors.page.listLakeActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listLakeActionsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listLakeActions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listLakeActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listLakeActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listLakeActions, request)); - assert( - (client.descriptors.page.listLakeActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listLakeActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listLakeActions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listLakeActionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listLakeActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListLakeActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListLakeActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listLakeActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLakeActionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listLakeActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listZones', () => { - it('invokes listZones without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - ]; - client.innerApiCalls.listZones = stubSimpleCall(expectedResponse); - const [response] = await client.listZones(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZones without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - ]; - client.innerApiCalls.listZones = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listZones( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IZone[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZones with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listZones = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listZones(request), expectedError); - const actualRequest = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZones as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZonesStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - ]; - client.descriptors.page.listZones.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listZonesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Zone[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { - 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.listZones.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listZones, request)); - assert( - (client.descriptors.page.listZones.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listZonesStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listZones.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listZonesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Zone[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Zone) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listZones.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listZones, request)); - assert( - (client.descriptors.page.listZones.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listZones without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Zone()), - ]; - client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IZone[] = []; - const iterable = client.listZonesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listZones.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listZones with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZonesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZonesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listZones.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listZonesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IZone[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listZones.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listZones.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listZoneActions', () => { - it('invokes listZoneActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listZoneActions = stubSimpleCall(expectedResponse); - const [response] = await client.listZoneActions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZoneActions without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listZoneActions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listZoneActions( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZoneActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listZoneActions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listZoneActions(request), expectedError); - const actualRequest = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listZoneActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listZoneActionsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listZoneActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - 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.listZoneActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listZoneActions, request)); - assert( - (client.descriptors.page.listZoneActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listZoneActionsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listZoneActions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listZoneActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listZoneActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listZoneActions, request)); - assert( - (client.descriptors.page.listZoneActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listZoneActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listZoneActionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listZoneActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListZoneActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListZoneActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listZoneActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listZoneActionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listZoneActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAssets', () => { - it('invokes listAssets without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - ]; - client.innerApiCalls.listAssets = stubSimpleCall(expectedResponse); - const [response] = await client.listAssets(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssets without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - ]; - client.innerApiCalls.listAssets = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAssets( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAsset[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssets with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAssets = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAssets(request), expectedError); - const actualRequest = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssetsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - ]; - client.descriptors.page.listAssets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAssetsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Asset[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { - 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.listAssets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAssets, request)); - assert( - (client.descriptors.page.listAssets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAssetsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAssets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAssetsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Asset[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Asset) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAssets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAssets, request)); - assert( - (client.descriptors.page.listAssets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAssets without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Asset()), - ]; - client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; - const iterable = client.listAssetsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAssets with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAssets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAssetsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAsset[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAssets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAssetActions', () => { - it('invokes listAssetActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listAssetActions = stubSimpleCall(expectedResponse); - const [response] = await client.listAssetActions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssetActions without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.innerApiCalls.listAssetActions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAssetActions( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IAction[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssetActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAssetActions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAssetActions(request), expectedError); - const actualRequest = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAssetActions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAssetActionsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAssetActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - 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.listAssetActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAssetActions, request)); - assert( - (client.descriptors.page.listAssetActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAssetActionsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAssetActions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAssetActionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Action[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Action) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAssetActions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAssetActions, request)); - assert( - (client.descriptors.page.listAssetActions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAssetActions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Action()), - ]; - client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - const iterable = client.listAssetActionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAssetActions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListAssetActionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListAssetActionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAssetActions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAssetActionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IAction[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAssetActions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTasks', () => { - it('invokes listTasks without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - ]; - client.innerApiCalls.listTasks = stubSimpleCall(expectedResponse); - const [response] = await client.listTasks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTasks without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - ]; - client.innerApiCalls.listTasks = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTasks( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ITask[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTasks with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTasks(request), expectedError); - const actualRequest = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTasks as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTasksStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - ]; - client.descriptors.page.listTasks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Task[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { - 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.listTasks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTasks, request)); - assert( - (client.descriptors.page.listTasks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTasksStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTasks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listTasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Task[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Task) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listTasks.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTasks, request)); - assert( - (client.descriptors.page.listTasks.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTasks without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Task()), - ]; - client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ITask[] = []; - const iterable = client.listTasksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTasks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTasks with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListTasksRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListTasksRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTasks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTasksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ITask[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTasks.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTasks.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listJobs', () => { - it('invokes listJobs without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - ]; - client.innerApiCalls.listJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listJobs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobs without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - ]; - client.innerApiCalls.listJobs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listJobs( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IJob[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobs with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listJobs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listJobs(request), expectedError); - const actualRequest = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - ]; - client.descriptors.page.listJobs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Job[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { - 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.listJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listJobs, request)); - assert( - (client.descriptors.page.listJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listJobsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listJobs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listJobsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Job[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Job) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listJobs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listJobs, request)); - assert( - (client.descriptors.page.listJobs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listJobs without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Job()), - ]; - client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IJob[] = []; - const iterable = client.listJobsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listJobs with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListJobsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListJobsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listJobsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IJob[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listJobs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listJobs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEnvironments', () => { - it('invokes listEnvironments without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); - const [response] = await client.listEnvironments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEnvironments( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEnvironment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEnvironments(request), expectedError); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironmentsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - ]; - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Environment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEnvironmentsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Environment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Environment()), - ]; - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; - const iterable = client.listEnvironmentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEnvironmentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IEnvironment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listSessions', () => { - it('invokes listSessions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - ]; - client.innerApiCalls.listSessions = stubSimpleCall(expectedResponse); - const [response] = await client.listSessions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSessions without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - ]; - client.innerApiCalls.listSessions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listSessions( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.ISession[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSessions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listSessions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listSessions(request), expectedError); - const actualRequest = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSessions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSessionsStream without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - ]; - client.descriptors.page.listSessions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSessionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Session[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Session) => { - 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.listSessions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSessions, request)); - assert( - (client.descriptors.page.listSessions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listSessionsStream with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSessions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSessionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Session[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Session) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listSessions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSessions, request)); - assert( - (client.descriptors.page.listSessions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSessions without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Session()), - ]; - client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ISession[] = []; - const iterable = client.listSessionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listSessions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSessions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSessions with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListSessionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListSessionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSessions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSessionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ISession[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listSessions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSessions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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 dataplexserviceModule.v1.DataplexServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - 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('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new dataplexserviceModule.v1.DataplexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts b/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts deleted file mode 100644 index 16c212f4f17..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/v1/test/gapic_metadata_service_v1.ts +++ /dev/null @@ -1,3185 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as metadataserviceModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, operationsProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function 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.MetadataServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient(); - 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 = metadataserviceModule.v1.MetadataServiceClient.servicePath; - assert.strictEqual(servicePath, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = metadataserviceModule.v1.MetadataServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'dataplex.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'dataplex.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 metadataserviceModule.v1.MetadataServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = metadataserviceModule.v1.MetadataServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.metadataServiceStub, undefined); - await client.initialize(); - assert(client.metadataServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.metadataServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.metadataServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - 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 metadataserviceModule.v1.MetadataServiceClient({ - 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('createEntity', () => { - it('invokes createEntity without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.createEntity = stubSimpleCall(expectedResponse); - const [response] = await client.createEntity(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntity without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.createEntity = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntity( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntity with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntity = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createEntity(request), expectedError); - const actualRequest = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntity with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreateEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreateEntityRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntity(request), expectedError); - }); - }); - - describe('updateEntity', () => { - it('invokes updateEntity without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntityRequest() - ); - request.entity ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); - request.entity.name = defaultValue1; - const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.updateEntity = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntity(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntity without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntityRequest() - ); - request.entity ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); - request.entity.name = defaultValue1; - const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.updateEntity = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntity( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntity with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntityRequest() - ); - request.entity ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); - request.entity.name = defaultValue1; - const expectedHeaderRequestParams = `entity.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntity = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateEntity(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntity with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.UpdateEntityRequest() - ); - request.entity ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.UpdateEntityRequest', ['entity', 'name']); - request.entity.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntity(request), expectedError); - }); - }); - - describe('deleteEntity', () => { - it('invokes deleteEntity without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntity = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntity(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntity without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntity = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntity( - 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.deleteEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntity with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntity = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteEntity(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntity with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeleteEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeleteEntityRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntity(request), expectedError); - }); - }); - - describe('getEntity', () => { - it('invokes getEntity without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.getEntity = stubSimpleCall(expectedResponse); - const [response] = await client.getEntity(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntity without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Entity() - ); - client.innerApiCalls.getEntity = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntity( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntity with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntity = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntity(request), expectedError); - const actualRequest = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEntity as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntity with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetEntityRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetEntityRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntity(request), expectedError); - }); - }); - - describe('createPartition', () => { - it('invokes createPartition without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreatePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Partition() - ); - client.innerApiCalls.createPartition = stubSimpleCall(expectedResponse); - const [response] = await client.createPartition(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPartition without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreatePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Partition() - ); - client.innerApiCalls.createPartition = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPartition( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPartition with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreatePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPartition = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createPartition(request), expectedError); - const actualRequest = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPartition with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.CreatePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.CreatePartitionRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createPartition(request), expectedError); - }); - }); - - describe('deletePartition', () => { - it('invokes deletePartition without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeletePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePartition = stubSimpleCall(expectedResponse); - const [response] = await client.deletePartition(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePartition without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeletePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePartition = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePartition( - 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.deletePartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePartition with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeletePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePartition = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deletePartition(request), expectedError); - const actualRequest = (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deletePartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePartition with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.DeletePartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.DeletePartitionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deletePartition(request), expectedError); - }); - }); - - describe('getPartition', () => { - it('invokes getPartition without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetPartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Partition() - ); - client.innerApiCalls.getPartition = stubSimpleCall(expectedResponse); - const [response] = await client.getPartition(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPartition without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetPartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.dataplex.v1.Partition() - ); - client.innerApiCalls.getPartition = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPartition( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPartition with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetPartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPartition = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPartition(request), expectedError); - const actualRequest = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPartition as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPartition with closed client', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.GetPartitionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.GetPartitionRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPartition(request), expectedError); - }); - }); - - describe('listEntities', () => { - it('invokes listEntities without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - ]; - client.innerApiCalls.listEntities = stubSimpleCall(expectedResponse); - const [response] = await client.listEntities(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntities without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - ]; - client.innerApiCalls.listEntities = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntities( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IEntity[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntities with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntities = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEntities(request), expectedError); - const actualRequest = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEntities as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntitiesStream without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - ]; - client.descriptors.page.listEntities.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEntitiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Entity[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Entity) => { - 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.listEntities.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEntities, request)); - assert( - (client.descriptors.page.listEntities.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntitiesStream with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntities.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEntitiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Entity[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Entity) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEntities.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEntities, request)); - assert( - (client.descriptors.page.listEntities.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntities without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entity()), - ]; - client.descriptors.page.listEntities.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; - const iterable = client.listEntitiesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEntities.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEntities.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntities with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntitiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListEntitiesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEntitiesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IEntity[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEntities.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEntities.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPartitions', () => { - it('invokes listPartitions without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - ]; - client.innerApiCalls.listPartitions = stubSimpleCall(expectedResponse); - const [response] = await client.listPartitions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPartitions without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - ]; - client.innerApiCalls.listPartitions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPartitions( - request, - (err?: Error|null, result?: protos.google.cloud.dataplex.v1.IPartition[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPartitions with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPartitions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listPartitions(request), expectedError); - const actualRequest = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listPartitions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPartitionsStream without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - ]; - client.descriptors.page.listPartitions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPartitionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Partition[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Partition) => { - 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.listPartitions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPartitions, request)); - assert( - (client.descriptors.page.listPartitions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPartitionsStream with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPartitions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPartitionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Partition[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Partition) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listPartitions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listPartitions, request)); - assert( - (client.descriptors.page.listPartitions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPartitions without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Partition()), - ]; - client.descriptors.page.listPartitions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; - const iterable = client.listPartitionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listPartitions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPartitions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPartitions with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListPartitionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.dataplex.v1.ListPartitionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPartitions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPartitionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IPartition[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listPartitions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listPartitions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('aspectType', () => { - const fakePath = "/rendered/path/aspectType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aspect_type: "aspectTypeValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.aspectTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.aspectTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('aspectTypePath', () => { - const result = client.aspectTypePath("projectValue", "locationValue", "aspectTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.aspectTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAspectTypeName', () => { - const result = client.matchProjectFromAspectTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAspectTypeName', () => { - const result = client.matchLocationFromAspectTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAspectTypeFromAspectTypeName', () => { - const result = client.matchAspectTypeFromAspectTypeName(fakePath); - assert.strictEqual(result, "aspectTypeValue"); - assert((client.pathTemplates.aspectTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('asset', () => { - const fakePath = "/rendered/path/asset"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.assetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.assetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('assetPath', () => { - const result = client.assetPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.assetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAssetName', () => { - const result = client.matchProjectFromAssetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAssetName', () => { - const result = client.matchLocationFromAssetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromAssetName', () => { - const result = client.matchLakeFromAssetName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromAssetName', () => { - const result = client.matchZoneFromAssetName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromAssetName', () => { - const result = client.matchAssetFromAssetName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.assetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('content', () => { - const fakePath = "/rendered/path/content"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - content: "contentValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.contentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.contentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('contentPath', () => { - const result = client.contentPath("projectValue", "locationValue", "lakeValue", "contentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.contentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromContentName', () => { - const result = client.matchProjectFromContentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromContentName', () => { - const result = client.matchLocationFromContentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromContentName', () => { - const result = client.matchLakeFromContentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchContentFromContentName', () => { - const result = client.matchContentFromContentName(fakePath); - assert.strictEqual(result, "contentValue"); - assert((client.pathTemplates.contentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttribute', () => { - const fakePath = "/rendered/path/dataAttribute"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataTaxonomy: "dataTaxonomyValue", - data_attribute_id: "dataAttributeIdValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributePath', () => { - const result = client.dataAttributePath("projectValue", "locationValue", "dataTaxonomyValue", "dataAttributeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeName', () => { - const result = client.matchProjectFromDataAttributeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeName', () => { - const result = client.matchLocationFromDataAttributeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyFromDataAttributeName', () => { - const result = client.matchDataTaxonomyFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataTaxonomyValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeIdFromDataAttributeName', () => { - const result = client.matchDataAttributeIdFromDataAttributeName(fakePath); - assert.strictEqual(result, "dataAttributeIdValue"); - assert((client.pathTemplates.dataAttributePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataAttributeBinding', () => { - const fakePath = "/rendered/path/dataAttributeBinding"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_attribute_binding_id: "dataAttributeBindingIdValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataAttributeBindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataAttributeBindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataAttributeBindingPath', () => { - const result = client.dataAttributeBindingPath("projectValue", "locationValue", "dataAttributeBindingIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataAttributeBindingName', () => { - const result = client.matchProjectFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataAttributeBindingName', () => { - const result = client.matchLocationFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataAttributeBindingIdFromDataAttributeBindingName', () => { - const result = client.matchDataAttributeBindingIdFromDataAttributeBindingName(fakePath); - assert.strictEqual(result, "dataAttributeBindingIdValue"); - assert((client.pathTemplates.dataAttributeBindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScan', () => { - const fakePath = "/rendered/path/dataScan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanPath', () => { - const result = client.dataScanPath("projectValue", "locationValue", "dataScanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanName', () => { - const result = client.matchProjectFromDataScanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanName', () => { - const result = client.matchLocationFromDataScanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanName', () => { - const result = client.matchDataScanFromDataScanName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataScanJob', () => { - const fakePath = "/rendered/path/dataScanJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - dataScan: "dataScanValue", - job: "jobValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataScanJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataScanJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataScanJobPath', () => { - const result = client.dataScanJobPath("projectValue", "locationValue", "dataScanValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataScanJobName', () => { - const result = client.matchProjectFromDataScanJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataScanJobName', () => { - const result = client.matchLocationFromDataScanJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataScanFromDataScanJobName', () => { - const result = client.matchDataScanFromDataScanJobName(fakePath); - assert.strictEqual(result, "dataScanValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromDataScanJobName', () => { - const result = client.matchJobFromDataScanJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataTaxonomy', () => { - const fakePath = "/rendered/path/dataTaxonomy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - data_taxonomy_id: "dataTaxonomyIdValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataTaxonomyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataTaxonomyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataTaxonomyPath', () => { - const result = client.dataTaxonomyPath("projectValue", "locationValue", "dataTaxonomyIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataTaxonomyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataTaxonomyName', () => { - const result = client.matchProjectFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataTaxonomyName', () => { - const result = client.matchLocationFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDataTaxonomyIdFromDataTaxonomyName', () => { - const result = client.matchDataTaxonomyIdFromDataTaxonomyName(fakePath); - assert.strictEqual(result, "dataTaxonomyIdValue"); - assert((client.pathTemplates.dataTaxonomyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entity', () => { - const fakePath = "/rendered/path/entity"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entityPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entityPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entityPath', () => { - const result = client.entityPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entityPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntityName', () => { - const result = client.matchProjectFromEntityName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntityName', () => { - const result = client.matchLocationFromEntityName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEntityName', () => { - const result = client.matchLakeFromEntityName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromEntityName', () => { - const result = client.matchZoneFromEntityName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromEntityName', () => { - const result = client.matchEntityFromEntityName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.entityPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('entry', () => { - const fakePath = "/rendered/path/entry"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_group: "entryGroupValue", - entry: "entryValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - 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 metadataserviceModule.v1.MetadataServiceClient({ - 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('entryType', () => { - const fakePath = "/rendered/path/entryType"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - entry_type: "entryTypeValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryTypePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.entryTypePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('entryTypePath', () => { - const result = client.entryTypePath("projectValue", "locationValue", "entryTypeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.entryTypePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEntryTypeName', () => { - const result = client.matchProjectFromEntryTypeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEntryTypeName', () => { - const result = client.matchLocationFromEntryTypeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntryTypeFromEntryTypeName', () => { - const result = client.matchEntryTypeFromEntryTypeName(fakePath); - assert.strictEqual(result, "entryTypeValue"); - assert((client.pathTemplates.entryTypePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "lakeValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromEnvironmentName', () => { - const result = client.matchLakeFromEnvironmentName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - job: "jobValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "lakeValue", "taskValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromJobName', () => { - const result = client.matchLakeFromJobName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromJobName', () => { - const result = client.matchTaskFromJobName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('lake', () => { - const fakePath = "/rendered/path/lake"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.lakePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.lakePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('lakePath', () => { - const result = client.lakePath("projectValue", "locationValue", "lakeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.lakePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLakeName', () => { - const result = client.matchProjectFromLakeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLakeName', () => { - const result = client.matchLocationFromLakeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromLakeName', () => { - const result = client.matchLakeFromLakeName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.lakePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('metadataJob', () => { - const fakePath = "/rendered/path/metadataJob"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - metadataJob: "metadataJobValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.metadataJobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.metadataJobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('metadataJobPath', () => { - const result = client.metadataJobPath("projectValue", "locationValue", "metadataJobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.metadataJobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMetadataJobName', () => { - const result = client.matchProjectFromMetadataJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMetadataJobName', () => { - const result = client.matchLocationFromMetadataJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMetadataJobFromMetadataJobName', () => { - const result = client.matchMetadataJobFromMetadataJobName(fakePath); - assert.strictEqual(result, "metadataJobValue"); - assert((client.pathTemplates.metadataJobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('partition', () => { - const fakePath = "/rendered/path/partition"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - entity: "entityValue", - partition: "partitionValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.partitionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.partitionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('partitionPath', () => { - const result = client.partitionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "entityValue", "partitionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.partitionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromPartitionName', () => { - const result = client.matchProjectFromPartitionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromPartitionName', () => { - const result = client.matchLocationFromPartitionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromPartitionName', () => { - const result = client.matchLakeFromPartitionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromPartitionName', () => { - const result = client.matchZoneFromPartitionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEntityFromPartitionName', () => { - const result = client.matchEntityFromPartitionName(fakePath); - assert.strictEqual(result, "entityValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPartitionFromPartitionName', () => { - const result = client.matchPartitionFromPartitionName(fakePath); - assert.strictEqual(result, "partitionValue"); - assert((client.pathTemplates.partitionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeAction', () => { - const fakePath = "/rendered/path/projectLocationLakeAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - action: "actionValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeActionPath', () => { - const result = client.projectLocationLakeActionPath("projectValue", "locationValue", "lakeValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeActionName', () => { - const result = client.matchProjectFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeActionName', () => { - const result = client.matchLocationFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeActionName', () => { - const result = client.matchLakeFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeActionName', () => { - const result = client.matchActionFromProjectLocationLakeActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - action: "actionValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneActionPath', () => { - const result = client.projectLocationLakeZoneActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationLakeZoneAssetAction', () => { - const fakePath = "/rendered/path/projectLocationLakeZoneAssetAction"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - asset: "assetValue", - action: "actionValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationLakeZoneAssetActionPath', () => { - const result = client.projectLocationLakeZoneAssetActionPath("projectValue", "locationValue", "lakeValue", "zoneValue", "assetValue", "actionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchProjectFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLocationFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "assetValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { - const result = client.matchActionFromProjectLocationLakeZoneAssetActionName(fakePath); - assert.strictEqual(result, "actionValue"); - assert((client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('session', () => { - const fakePath = "/rendered/path/session"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - environment: "environmentValue", - session: "sessionValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.sessionPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.sessionPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('sessionPath', () => { - const result = client.sessionPath("projectValue", "locationValue", "lakeValue", "environmentValue", "sessionValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.sessionPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSessionName', () => { - const result = client.matchProjectFromSessionName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSessionName', () => { - const result = client.matchLocationFromSessionName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromSessionName', () => { - const result = client.matchLakeFromSessionName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromSessionName', () => { - const result = client.matchEnvironmentFromSessionName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSessionFromSessionName', () => { - const result = client.matchSessionFromSessionName(fakePath); - assert.strictEqual(result, "sessionValue"); - assert((client.pathTemplates.sessionPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('task', () => { - const fakePath = "/rendered/path/task"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - task: "taskValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taskPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.taskPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('taskPath', () => { - const result = client.taskPath("projectValue", "locationValue", "lakeValue", "taskValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.taskPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTaskName', () => { - const result = client.matchProjectFromTaskName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTaskName', () => { - const result = client.matchLocationFromTaskName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromTaskName', () => { - const result = client.matchLakeFromTaskName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTaskFromTaskName', () => { - const result = client.matchTaskFromTaskName(fakePath); - assert.strictEqual(result, "taskValue"); - assert((client.pathTemplates.taskPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('zone', () => { - const fakePath = "/rendered/path/zone"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - lake: "lakeValue", - zone: "zoneValue", - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.zonePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.zonePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('zonePath', () => { - const result = client.zonePath("projectValue", "locationValue", "lakeValue", "zoneValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.zonePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromZoneName', () => { - const result = client.matchProjectFromZoneName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromZoneName', () => { - const result = client.matchLocationFromZoneName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLakeFromZoneName', () => { - const result = client.matchLakeFromZoneName(fakePath); - assert.strictEqual(result, "lakeValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchZoneFromZoneName', () => { - const result = client.matchZoneFromZoneName(fakePath); - assert.strictEqual(result, "zoneValue"); - assert((client.pathTemplates.zonePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json b/owl-bot-staging/google-cloud-dataplex/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/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-dataplex/v1/webpack.config.js b/owl-bot-staging/google-cloud-dataplex/v1/webpack.config.js deleted file mode 100644 index f2c58f2530c..00000000000 --- a/owl-bot-staging/google-cloud-dataplex/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: 'CatalogService', - filename: './catalog-service.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-dataplex/README.md b/packages/google-cloud-dataplex/README.md index 1526686dc9c..9e530f7ba06 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Dataplex API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -88,10 +88,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Catalog_service.cancel_metadata_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.create_aspect_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.create_entry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.create_entry_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.create_entry_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js,packages/google-cloud-dataplex/samples/README.md) | +| Catalog_service.create_metadata_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.delete_aspect_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.delete_entry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.delete_entry_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js,packages/google-cloud-dataplex/samples/README.md) | @@ -100,10 +102,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Catalog_service.get_entry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.get_entry_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry_group.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.get_entry_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry_type.js,packages/google-cloud-dataplex/samples/README.md) | +| Catalog_service.get_metadata_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.list_aspect_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.list_entry_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.list_entry_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js,packages/google-cloud-dataplex/samples/README.md) | +| Catalog_service.list_metadata_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.lookup_entry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.search_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js,packages/google-cloud-dataplex/samples/README.md) | | Catalog_service.update_aspect_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_aspect_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_aspect_type.js,packages/google-cloud-dataplex/samples/README.md) | @@ -254,4 +258,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dataplex.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/catalog.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/catalog.proto index 423f67d44b6..76bf4dda7a6 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/catalog.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/catalog.proto @@ -19,6 +19,7 @@ package google.cloud.dataplex.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/cloud/dataplex/v1/service.proto"; import "google/longrunning/operations.proto"; @@ -36,16 +37,16 @@ option php_namespace = "Google\\Cloud\\Dataplex\\V1"; option ruby_package = "Google::Cloud::Dataplex::V1"; // The primary resources offered by this service are EntryGroups, EntryTypes, -// AspectTypes, Entry and Aspect which collectively allow a data administrator -// to organize, manage, secure and catalog data across their organization -// located across cloud projects in a variety of storage systems including Cloud -// Storage and BigQuery. +// AspectTypes, and Entries. They collectively let data administrators organize, +// manage, secure, and catalog data located across cloud projects in their +// organization in a variety of storage systems, including Cloud Storage and +// BigQuery. service CatalogService { option (google.api.default_host) = "dataplex.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Creates an EntryType + // Creates an EntryType. rpc CreateEntryType(CreateEntryTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -59,7 +60,7 @@ service CatalogService { }; } - // Updates a EntryType resource. + // Updates an EntryType. rpc UpdateEntryType(UpdateEntryTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -73,7 +74,7 @@ service CatalogService { }; } - // Deletes a EntryType resource. + // Deletes an EntryType. rpc DeleteEntryType(DeleteEntryTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -94,7 +95,7 @@ service CatalogService { option (google.api.method_signature) = "parent"; } - // Retrieves a EntryType resource. + // Gets an EntryType. rpc GetEntryType(GetEntryTypeRequest) returns (EntryType) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryTypes/*}" @@ -102,7 +103,7 @@ service CatalogService { option (google.api.method_signature) = "name"; } - // Creates an AspectType + // Creates an AspectType. rpc CreateAspectType(CreateAspectTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -116,7 +117,7 @@ service CatalogService { }; } - // Updates a AspectType resource. + // Updates an AspectType. rpc UpdateAspectType(UpdateAspectTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -130,7 +131,7 @@ service CatalogService { }; } - // Deletes a AspectType resource. + // Deletes an AspectType. rpc DeleteAspectType(DeleteAspectTypeRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -152,7 +153,7 @@ service CatalogService { option (google.api.method_signature) = "parent"; } - // Retrieves a AspectType resource. + // Gets an AspectType. rpc GetAspectType(GetAspectTypeRequest) returns (AspectType) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/aspectTypes/*}" @@ -160,7 +161,7 @@ service CatalogService { option (google.api.method_signature) = "name"; } - // Creates an EntryGroup + // Creates an EntryGroup. rpc CreateEntryGroup(CreateEntryGroupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -174,7 +175,7 @@ service CatalogService { }; } - // Updates a EntryGroup resource. + // Updates an EntryGroup. rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -188,7 +189,7 @@ service CatalogService { }; } - // Deletes a EntryGroup resource. + // Deletes an EntryGroup. rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -210,7 +211,7 @@ service CatalogService { option (google.api.method_signature) = "parent"; } - // Retrieves a EntryGroup resource. + // Gets an EntryGroup. rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*}" @@ -244,7 +245,7 @@ service CatalogService { option (google.api.method_signature) = "name"; } - // Lists entries within an entry group. + // Lists Entries within an EntryGroup. rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" @@ -252,7 +253,12 @@ service CatalogService { option (google.api.method_signature) = "parent"; } - // Gets a single entry. + // Gets an Entry. + // + // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + // changing. For more information, see [Changes to BigQuery metadata stored in + // Dataplex + // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). rpc GetEntry(GetEntryRequest) returns (Entry) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}" @@ -260,24 +266,77 @@ service CatalogService { option (google.api.method_signature) = "name"; } - // Looks up a single entry. + // Looks up a single Entry by name using the permission on the source system. + // + // **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + // changing. For more information, see [Changes to BigQuery metadata stored in + // Dataplex + // Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). rpc LookupEntry(LookupEntryRequest) returns (Entry) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*}:lookupEntry" }; } - // Searches for entries matching given query and scope. + // Searches for Entries matching the given query and scope. rpc SearchEntries(SearchEntriesRequest) returns (SearchEntriesResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*}:searchEntries" }; option (google.api.method_signature) = "name,query"; } + + // Creates a metadata job. For example, use a metadata job to import Dataplex + // Catalog entries and aspects from a third-party system into Dataplex. + rpc CreateMetadataJob(CreateMetadataJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/metadataJobs" + body: "metadata_job" + }; + option (google.api.method_signature) = + "parent,metadata_job,metadata_job_id"; + option (google.longrunning.operation_info) = { + response_type: "MetadataJob" + metadata_type: "OperationMetadata" + }; + } + + // Gets a metadata job. + rpc GetMetadataJob(GetMetadataJobRequest) returns (MetadataJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/metadataJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists metadata jobs. + rpc ListMetadataJobs(ListMetadataJobsRequest) + returns (ListMetadataJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/metadataJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels a metadata job. + // + // If you cancel a metadata import job that is in progress, the changes in the + // job might be partially applied. We recommend that you reset the state of + // the entry groups in your project by running another metadata job that + // reverts the changes from the canceled job. + rpc CancelMetadataJob(CancelMetadataJobRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } } -// Aspect Type is a template for creating Aspects, and represents the -// JSON-schema for a given Entry, e.g., BigQuery Table Schema. +// AspectType is a template for creating Aspects, and represents the +// JSON-schema for a given Entry, for example, BigQuery Table Schema. message AspectType { option (google.api.resource) = { type: "dataplex.googleapis.com/AspectType" @@ -286,61 +345,63 @@ message AspectType { singular: "aspectType" }; - // Autorization for an Aspect Type. + // Autorization for an AspectType. message Authorization { - // Immutable. The IAM permission grantable on the Entry Group to allow - // access to instantiate Aspects of Dataplex owned Aspect Types, only - // settable for Dataplex owned Types. + // Immutable. The IAM permission grantable on the EntryGroup to allow access + // to instantiate Aspects of Dataplex owned AspectTypes, only settable for + // Dataplex owned Types. string alternate_use_permission = 1 [(google.api.field_behavior) = IMMUTABLE]; } - // MetadataTemplate definition for AspectType + // MetadataTemplate definition for an AspectType. message MetadataTemplate { - // Definition of Enumvalue (to be used by enum fields) + // Definition of Enumvalue, to be used for enum fields. message EnumValue { - // Required. Index for the enum. Cannot be modified. + // Required. Index for the enum value. It can't be modified. int32 index = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Name of the enumvalue. This is the actual value that the - // aspect will contain. + // aspect can contain. string name = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Optional deprecation message to be set if an enum value needs - // to be deprecated. + // Optional. You can set this message if you need to deprecate an enum + // value. string deprecated = 3 [(google.api.field_behavior) = OPTIONAL]; } - // Definition of the constraints of a field + // Definition of the constraints of a field. message Constraints { - // Optional. Marks this as an optional/required field. + // Optional. Marks this field as optional or required. bool required = 1 [(google.api.field_behavior) = OPTIONAL]; } - // Definition of the annotations of a field + // Definition of the annotations of a field. message Annotations { - // Optional. Marks a field as deprecated, a deprecation message can be - // included. + // Optional. Marks a field as deprecated. You can include a deprecation + // message. string deprecated = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specify a displayname for a field. + // Optional. Display name for a field. string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specify a description for a field + // Optional. Description for a field. string description = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specify a display order for a field. Display order can be - // used to reorder where a field is rendered + // Optional. Display order for a field. You can use this to reorder where + // a field is rendered. int32 display_order = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. String Type annotations can be used to specify special - // meaning to string fields. The following values are supported: richText: - // The field must be interpreted as a rich text field. url: A fully - // qualified url link. resource: A service qualified resource reference. + // Optional. You can use String Type annotations to specify special + // meaning to string fields. The following values are supported: + // + // * richText: The field must be interpreted as a rich text field. + // * url: A fully qualified URL link. + // * resource: A service qualified resource reference. string string_type = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Suggested hints for string fields. These can be used to - // suggest values to users, through an UI for example. + // Optional. Suggested hints for string fields. You can use them to + // suggest values to users through console. repeated string string_values = 7 [(google.api.field_behavior) = OPTIONAL]; } @@ -357,43 +418,55 @@ message AspectType { string name = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The datatype of this field. The following values are supported: - // Primitive types (string, integer, boolean, double, datetime); datetime - // must be of the format RFC3339 UTC "Zulu" (Examples: - // "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex - // types (enum, array, map, record). + // + // Primitive types: + // + // * string + // * integer + // * boolean + // * double + // * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: + // "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). + // + // Complex types: + // + // * enum + // * array + // * map + // * record string type = 5 [(google.api.field_behavior) = REQUIRED]; - // Optional. Field definition, needs to be specified if the type is record. - // Defines the nested fields. + // Optional. Field definition. You must specify it if the type is record. It + // defines the nested fields. repeated MetadataTemplate record_fields = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The list of values for an enum type. Needs to be defined if the + // Optional. The list of values for an enum type. You must define it if the // type is enum. repeated EnumValue enum_values = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. map_items needs to be set if the type is map. map_items can - // refer to a primitive field or a complex (record only) field. To specify a - // primitive field, just name and type needs to be set in the nested + // Optional. If the type is map, set map_items. map_items can refer to a + // primitive field or a complex (record only) field. To specify a primitive + // field, you only need to set name and type in the nested // MetadataTemplate. The recommended value for the name field is item, as - // this is not used in the actual payload. + // this isn't used in the actual payload. MetadataTemplate map_items = 10 [(google.api.field_behavior) = OPTIONAL]; - // Optional. array_items needs to be set if the type is array. array_items - // can refer to a primitive field or a complex (record only) field. To - // specify a primitive field, just name and type needs to be set in the - // nested MetadataTemplate. The recommended value for the name field is - // item, as this is not used in the actual payload. + // Optional. If the type is array, set array_items. array_items can refer + // to a primitive field or a complex (record only) field. To specify a + // primitive field, you only need to set name and type in the nested + // MetadataTemplate. The recommended value for the name field is item, as + // this isn't used in the actual payload. MetadataTemplate array_items = 11 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Id can be used if this definition of the field needs to be - // reused later. Id needs to be unique across the entire template. Id can - // only be specified if the field type is record. + // Optional. You can use type id if this definition of the field needs to be + // reused later. The type id must be unique across the entire template. You + // can only specify it if the field type is record. string type_id = 12 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A reference to another field definition (instead of an inline + // Optional. A reference to another field definition (not an inline // definition). The value must be equal to the value of an id field defined - // elsewhere in the MetadataTemplate. Only fields with type as record can + // elsewhere in the MetadataTemplate. Only fields with record type can // refer to other fields. string type_ref = 13 [(google.api.field_behavior) = OPTIONAL]; @@ -413,9 +486,9 @@ message AspectType { } ]; - // Output only. System generated globally unique ID for the AspectType. This - // ID will be different if the AspectType is deleted and re-created with the - // same name. + // Output only. System generated globally unique ID for the AspectType. + // If you delete and recreate the AspectType with the same name, then this ID + // will be different. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the AspectType was created. @@ -435,12 +508,11 @@ message AspectType { // Optional. User-defined labels for the AspectType. map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // The service computes this checksum. The client may send it on update and + // delete requests to ensure it has an up-to-date value before proceeding. string etag = 8; - // Immutable. Authorization defined for this type. + // Immutable. Defines the Authorization for this type. Authorization authorization = 52 [(google.api.field_behavior) = IMMUTABLE]; // Required. MetadataTemplate of the aspect. @@ -462,8 +534,8 @@ message EntryGroup { singular: "entryGroup" }; - // Output only. The relative resource name of the EntryGroup, of the form: - // projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}. + // Output only. The relative resource name of the EntryGroup, in the format + // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}. string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -471,9 +543,9 @@ message EntryGroup { } ]; - // Output only. System generated globally unique ID for the EntryGroup. This - // ID will be different if the EntryGroup is deleted and re-created with the - // same name. + // Output only. System generated globally unique ID for the EntryGroup. If you + // delete and recreate the EntryGroup with the same name, this ID will be + // different. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the EntryGroup was created. @@ -493,9 +565,9 @@ message EntryGroup { // Optional. User-defined labels for the EntryGroup. map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // This checksum is computed by the service, and might be sent on update and + // delete requests to ensure the client has an up-to-date value before + // proceeding. string etag = 8; // Output only. Denotes the transfer status of the Entry Group. It is @@ -560,12 +632,12 @@ message EntryType { // Optional. User-defined labels for the EntryType. map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - // Optional. This checksum is computed by the server based on the value of - // other fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // Optional. This checksum is computed by the service, and might be sent on + // update and delete requests to ensure the client has an up-to-date value + // before proceeding. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Indicates the class this Entry Type belongs to, for example, + // Optional. Indicates the classes this Entry Type belongs to, for example, // TABLE, DATABASE, MODEL. repeated string type_aliases = 9 [(google.api.field_behavior) = OPTIONAL]; @@ -600,24 +672,28 @@ message Aspect { [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The content of the aspect, according to its aspect type schema. - // This will replace `content`. // The maximum size of the field is 120KB (encoded as UTF-8). google.protobuf.Struct data = 8 [(google.api.field_behavior) = REQUIRED]; + // Optional. Information related to the source system of the aspect. AspectSource aspect_source = 9 [(google.api.field_behavior) = OPTIONAL]; } -// AspectSource contains source system related information for the -// aspect. +// Information related to the source system of the aspect. message AspectSource { - // The create time of the aspect in the source system. + // The time the aspect was created in the source system. google.protobuf.Timestamp create_time = 10; - // The update time of the aspect in the source system. + // The time the aspect was last updated in the source system. google.protobuf.Timestamp update_time = 11; + + // The version of the data format used to produce this data. This field is + // used to indicated when the underlying data format changes (e.g., schema + // modifications, changes to the source URL format definition, etc). + string data_version = 12; } -// An entry is a representation of a data asset which can be described by +// An entry is a representation of a data resource that can be described by // various metadata. message Entry { option (google.api.resource) = { @@ -627,31 +703,34 @@ message Entry { singular: "entry" }; - // Identifier. The relative resource name of the Entry, of the form: - // projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. + // Identifier. The relative resource name of the entry, in the format + // `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Required. Immutable. The resource name of the EntryType used to create this - // Entry. + // Required. Immutable. The relative resource name of the entry type that was + // used to create this entry, in the format + // `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`. string entry_type = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - // Output only. The time when the Entry was created. + // Output only. The time when the entry was created in Dataplex. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time when the Entry was last updated. + // Output only. The time when the entry was last updated in Dataplex. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The Aspects attached to the Entry. - // The format for the key can be one of the following: - // 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached - // directly to the entry) - // 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is - // attached to an entry's path) + // Optional. The aspects that are attached to the entry. Depending on how the + // aspect is attached to the entry, the format of the aspect key can be one of + // the following: + // + // * If the aspect is attached directly to the entry: + // `{project_id_or_number}.{location_id}.{aspect_type_id}` + // * If the aspect is attached to an entry's path: + // `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}` map aspects = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. Immutable. The resource name of the parent entry. @@ -660,19 +739,22 @@ message Entry { (google.api.field_behavior) = IMMUTABLE ]; - // Optional. A name for the entry that can reference it in an external system. + // Optional. A name for the entry that can be referenced by an external + // system. For more information, see [Fully qualified + // names](https://cloud.google.com/data-catalog/docs/fully-qualified-names). // The maximum size of the field is 4000 characters. string fully_qualified_name = 12 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Source system related information for an entry. + // Optional. Information related to the source system of the data resource + // that is represented by the entry. EntrySource entry_source = 15 [(google.api.field_behavior) = OPTIONAL]; } -// EntrySource contains source system related information for the -// entry. +// Information related to the source system of the data resource that is +// represented by the entry. message EntrySource { - // Ancestor contains information about individual items in the hierarchy of - // an Entry. + // Information about individual items in the hierarchy that is associated with + // the data resource. message Ancestor { // Optional. The name of the ancestor resource. string name = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -682,46 +764,50 @@ message EntrySource { } // The name of the resource in the source system. - // The maximum size of the field is 4000 characters. + // Maximum length is 4,000 characters. string resource = 1; // The name of the source system. - // The maximum size of the field is 64 characters. + // Maximum length is 64 characters. string system = 2; // The platform containing the source system. - // The maximum size of the field is 64 characters. + // Maximum length is 64 characters. string platform = 3; - // User friendly display name. - // The maximum size of the field is 500 characters. + // A user-friendly display name. + // Maximum length is 500 characters. string display_name = 5; - // Description of the Entry. - // The maximum size of the field is 2000 characters. + // A description of the data resource. + // Maximum length is 2,000 characters. string description = 6; // User-defined labels. // The maximum size of keys and values is 128 characters each. map labels = 7; - // Immutable. The ancestors of the Entry in the source system. + // Immutable. The entries representing the ancestors of the data resource in + // the source system. repeated Ancestor ancestors = 9 [(google.api.field_behavior) = IMMUTABLE]; - // The create time of the resource in the source system. + // The time when the resource was created in the source system. google.protobuf.Timestamp create_time = 10; - // The update time of the resource in the source system. + // The time when the resource was last updated in the source system. If the + // entry exists in the system and its `EntrySource` has `update_time` + // populated, further updates to the `EntrySource` of the entry must provide + // incremental updates to its `update_time`. google.protobuf.Timestamp update_time = 11; - // Output only. Location of the resource in the source system. Entry will be - // searchable by this location. By default, this should match the location of - // the EntryGroup containing this entry. A different value allows capturing - // source location for data external to GCP. + // Output only. Location of the resource in the source system. You can search + // the entry by this location. By default, this should match the location of + // the entry group containing this entry. A different value allows capturing + // the source location for data external to Google Cloud. string location = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Create EntryGroup Request +// Create EntryGroup Request. message CreateEntryGroupRequest { // Required. The resource name of the entryGroup, of the form: // projects/{project_number}/locations/{location_id} @@ -736,29 +822,29 @@ message CreateEntryGroupRequest { // Required. EntryGroup identifier. string entry_group_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. EntryGroup Resource + // Required. EntryGroup Resource. EntryGroup entry_group = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Only validate the request, but do not perform mutations. - // The default is false. + // Optional. The service validates the request without performing any + // mutations. The default is false. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Update EntryGroup Request +// Update EntryGroup Request. message UpdateEntryGroupRequest { - // Required. EntryGroup Resource + // Required. EntryGroup Resource. EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Mask of fields to update. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Only validate the request, but do not perform mutations. - // The default is false. + // Optional. The service validates the request, without performing any + // mutations. The default is false. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Delele EntryGroup Request +// Delete EntryGroup Request. message DeleteEntryGroupRequest { // Required. The resource name of the EntryGroup: // `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. @@ -770,7 +856,8 @@ message DeleteEntryGroupRequest { ]; // Optional. If the client provided etag value does not match the current etag - // value, the DeleteEntryGroupRequest method returns an ABORTED error response + // value, the DeleteEntryGroupRequest method returns an ABORTED error + // response. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -778,7 +865,7 @@ message DeleteEntryGroupRequest { message ListEntryGroupsRequest { // Required. The resource name of the entryGroup location, of the form: // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a GCP region. + // where `location_id` refers to a Google Cloud region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -787,15 +874,15 @@ message ListEntryGroupsRequest { ]; // Optional. Maximum number of EntryGroups to return. The service may return - // fewer than this value. If unspecified, at most 10 EntryGroups will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. + // fewer than this value. If unspecified, the service returns at most 10 + // EntryGroups. The maximum value is 1000; values above 1000 will be coerced + // to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListEntryGroups` call. // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListEntryGroups` must match the call that provided - // the page token. + // parameters you provide to `ListEntryGroups` must match the call that + // provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter request. @@ -805,16 +892,16 @@ message ListEntryGroupsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// List ListEntryGroups response. +// List entry groups response. message ListEntryGroupsResponse { - // ListEntryGroups under the given parent location. + // Entry groups under the given parent location. repeated EntryGroup entry_groups = 1; // Token to retrieve the next page of results, or empty if there are no more // results in the list. string next_page_token = 2; - // Locations that could not be reached. + // Locations that the service couldn't reach. repeated string unreachable_locations = 3; } @@ -830,11 +917,11 @@ message GetEntryGroupRequest { ]; } -// Create EntryType Request +// Create EntryType Request. message CreateEntryTypeRequest { // Required. The resource name of the EntryType, of the form: // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. + // where `location_id` refers to a Google Cloud region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -845,29 +932,29 @@ message CreateEntryTypeRequest { // Required. EntryType identifier. string entry_type_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. EntryType Resource + // Required. EntryType Resource. EntryType entry_type = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Only validate the request, but do not perform mutations. - // The default is false. + // Optional. The service validates the request without performing any + // mutations. The default is false. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Update EntryType Request +// Update EntryType Request. message UpdateEntryTypeRequest { - // Required. EntryType Resource + // Required. EntryType Resource. EntryType entry_type = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Mask of fields to update. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Only validate the request, but do not perform mutations. - // The default is false. + // Optional. The service validates the request without performing any + // mutations. The default is false. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Delele EntryType Request +// Delele EntryType Request. message DeleteEntryTypeRequest { // Required. The resource name of the EntryType: // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. @@ -879,7 +966,7 @@ message DeleteEntryTypeRequest { ]; // Optional. If the client provided etag value does not match the current etag - // value, the DeleteEntryTypeRequest method returns an ABORTED error response + // value, the DeleteEntryTypeRequest method returns an ABORTED error response. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -887,7 +974,7 @@ message DeleteEntryTypeRequest { message ListEntryTypesRequest { // Required. The resource name of the EntryType location, of the form: // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a GCP region. + // where `location_id` refers to a Google Cloud region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -896,45 +983,46 @@ message ListEntryTypesRequest { ]; // Optional. Maximum number of EntryTypes to return. The service may return - // fewer than this value. If unspecified, at most 10 EntryTypes will be - // returned. The maximum value is 1000; values above 1000 will be coerced to + // fewer than this value. If unspecified, the service returns at most 10 + // EntryTypes. The maximum value is 1000; values above 1000 will be coerced to // 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListEntryTypes` call. // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListEntryTypes` must match the call that provided - // the page token. + // parameters you provided to `ListEntryTypes` must match the call that + // provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter request. Filters are case-sensitive. - // The following formats are supported: + // The service supports the following formats: // - // labels.key1 = "value1" - // labels:key1 - // name = "value" - // These restrictions can be coinjoined with AND, OR and NOT conjunctions. + // * labels.key1 = "value1" + // * labels:key1 + // * name = "value" + // + // These restrictions can be conjoined with AND, OR, and NOT conjunctions. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Order by fields (`name` or `create_time`) for the result. + // Optional. Orders the result by `name` or `create_time` fields. // If not specified, the ordering is undefined. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// List EntryTypes response +// List EntryTypes response. message ListEntryTypesResponse { - // ListEntryTypes under the given parent location. + // EntryTypes under the given parent location. repeated EntryType entry_types = 1; // Token to retrieve the next page of results, or empty if there are no more // results in the list. string next_page_token = 2; - // Locations that could not be reached. + // Locations that the service couldn't reach. repeated string unreachable_locations = 3; } -// Get EntryType request +// Get EntryType request. message GetEntryTypeRequest { // Required. The resource name of the EntryType: // `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. @@ -946,11 +1034,11 @@ message GetEntryTypeRequest { ]; } -// Create AspectType Request +// Create AspectType Request. message CreateAspectTypeRequest { // Required. The resource name of the AspectType, of the form: // projects/{project_number}/locations/{location_id} - // where `location_id` refers to a GCP region. + // where `location_id` refers to a Google Cloud region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -961,11 +1049,11 @@ message CreateAspectTypeRequest { // Required. AspectType identifier. string aspect_type_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. AspectType Resource + // Required. AspectType Resource. AspectType aspect_type = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Only validate the request, but do not perform mutations. - // The default is false. + // Optional. The service validates the request without performing any + // mutations. The default is false. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -983,7 +1071,7 @@ message UpdateAspectTypeRequest { bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Delele AspectType Request +// Delele AspectType Request. message DeleteAspectTypeRequest { // Required. The resource name of the AspectType: // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. @@ -995,15 +1083,16 @@ message DeleteAspectTypeRequest { ]; // Optional. If the client provided etag value does not match the current etag - // value, the DeleteAspectTypeRequest method returns an ABORTED error response + // value, the DeleteAspectTypeRequest method returns an ABORTED error + // response. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } -// List AspectTypes request +// List AspectTypes request. message ListAspectTypesRequest { // Required. The resource name of the AspectType location, of the form: // `projects/{project_number}/locations/{location_id}` - // where `location_id` refers to a GCP region. + // where `location_id` refers to a Google Cloud region. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1012,45 +1101,46 @@ message ListAspectTypesRequest { ]; // Optional. Maximum number of AspectTypes to return. The service may return - // fewer than this value. If unspecified, at most 10 AspectTypes will be - // returned. The maximum value is 1000; values above 1000 will be coerced to - // 1000. + // fewer than this value. If unspecified, the service returns at most 10 + // AspectTypes. The maximum value is 1000; values above 1000 will be coerced + // to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Page token received from a previous `ListAspectTypes` call. // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `ListAspectTypes` must match the call that provided - // the page token. + // parameters you provide to `ListAspectTypes` must match the call that + // provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Filter request. Filters are case-sensitive. - // The following formats are supported: + // The service supports the following formats: + // + // * labels.key1 = "value1" + // * labels:key1 + // * name = "value" // - // labels.key1 = "value1" - // labels:key1 - // name = "value" - // These restrictions can be coinjoined with AND, OR and NOT conjunctions. + // These restrictions can be conjoined with AND, OR, and NOT conjunctions. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Order by fields (`name` or `create_time`) for the result. + // Optional. Orders the result by `name` or `create_time` fields. // If not specified, the ordering is undefined. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// List AspectTypes response +// List AspectTypes response. message ListAspectTypesResponse { - // ListAspectTypes under the given parent location. + // AspectTypes under the given parent location. repeated AspectType aspect_types = 1; // Token to retrieve the next page of results, or empty if there are no more // results in the list. string next_page_token = 2; - // Locations that could not be reached. + // Locations that the service couldn't reach. repeated string unreachable_locations = 3; } -// Get AspectType request +// Get AspectType request. message GetAspectTypeRequest { // Required. The resource name of the AspectType: // `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. @@ -1062,6 +1152,7 @@ message GetAspectTypeRequest { ]; } +// Create Entry request. message CreateEntryRequest { // Required. The resource name of the parent Entry Group: // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. @@ -1074,20 +1165,21 @@ message CreateEntryRequest { // Required. Entry identifier. It has to be unique within an Entry Group. // - // Entries corresponding to Google Cloud resources use Entry ID format based - // on Full Resource Names - // (https://cloud.google.com/apis/design/resource_names#full_resource_name). - // The format is a Full Resource Name of the resource without the - // prefix double slashes in the API Service Name part of Full Resource Name. - // This allows retrieval of entries using their associated resource name. + // Entries corresponding to Google Cloud resources use an Entry ID format + // based on [full resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + // The format is a full resource name of the resource without the + // prefix double slashes in the API service name part of the full resource + // name. This allows retrieval of entries using their associated resource + // name. // - // For example if the Full Resource Name of a resource is + // For example, if the full resource name of a resource is // `//library.googleapis.com/shelves/shelf1/books/book2`, // then the suggested entry_id is // `library.googleapis.com/shelves/shelf1/books/book2`. // // It is also suggested to follow the same convention for entries - // corresponding to resources from other providers or systems than Google + // corresponding to resources from providers or systems other than Google // Cloud. // // The maximum size of the field is 4000 characters. @@ -1097,6 +1189,7 @@ message CreateEntryRequest { Entry entry = 3 [(google.api.field_behavior) = REQUIRED]; } +// Update Entry request. message UpdateEntryRequest { // Required. Entry resource. Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1104,35 +1197,42 @@ message UpdateEntryRequest { // Optional. Mask of fields to update. To update Aspects, the update_mask must // contain the value "aspects". // - // If the update_mask is empty, all modifiable fields present in the request - // will be updated. + // If the update_mask is empty, the service will update all modifiable fields + // present in the request. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to true and the entry does not exist, it will be created. + // Optional. If set to true and the entry doesn't exist, the service will + // create it. bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to true and the aspect_keys specify aspect ranges, any - // existing aspects from that range not provided in the request will be - // deleted. + // Optional. If set to true and the aspect_keys specify aspect ranges, the + // service deletes any existing aspects from that range that weren't provided + // in the request. bool delete_missing_aspects = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The map keys of the Aspects which should be modified. Supports - // the following syntaxes: - // * - matches aspect on given type and empty path - // * @path - matches aspect on given type and specified - // path - // * * - matches aspects on given type for all paths - // * *@path - matches aspects of all types on the given path + // Optional. The map keys of the Aspects which the service should modify. It + // supports the following syntaxes: // - // Existing aspects matching the syntax will not be removed unless + // * `` - matches an aspect of the given type and empty + // path. + // * `@path` - matches an aspect of the given type and + // specified path. For example, to attach an aspect to a field that is + // specified by the `schema` aspect, the path should have the format + // `Schema.`. + // * `*` - matches aspects of the given type for all + // paths. + // * `*@path` - matches aspects of all types on the given path. + // + // The service will not remove existing aspects matching the syntax unless // `delete_missing_aspects` is set to true. // - // If this field is left empty, it will be treated as specifying exactly those - // Aspects present in the request. + // If this field is left empty, the service treats it as specifying + // exactly those Aspects present in the request. repeated string aspect_keys = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Delete Entry request. message DeleteEntryRequest { // Required. The resource name of the Entry: // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. @@ -1142,6 +1242,7 @@ message DeleteEntryRequest { ]; } +// List Entries request. message ListEntriesRequest { // Required. The resource name of the parent Entry Group: // `projects/{project}/locations/{location}/entryGroups/{entry_group}`. @@ -1152,36 +1253,51 @@ message ListEntriesRequest { } ]; + // Optional. Number of items to return per page. If there are remaining + // results, the service returns a next_page_token. If unspecified, the service + // returns at most 10 Entries. The maximum value is 100; values above 100 will + // be coerced to 100. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The pagination token returned by a previous request. + // Optional. Page token received from a previous `ListEntries` call. Provide + // this to retrieve the subsequent page. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A filter on the entries to return. - // Filters are case-sensitive. - // The request can be filtered by the following fields: - // entry_type, entry_source.display_name. - // The comparison operators are =, !=, <, >, <=, >= (strings are compared - // according to lexical order) - // The logical operators AND, OR, NOT can be used - // in the filter. Wildcard "*" can be used, but for entry_type the full - // project id or number needs to be provided. Example filter expressions: - // "entry_source.display_name=AnExampleDisplayName" - // "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - // "entry_type=projects/example-project/locations/us/entryTypes/a* OR - // entry_type=projects/another-project/locations/*" - // "NOT entry_source.display_name=AnotherExampleDisplayName" + // Optional. A filter on the entries to return. Filters are case-sensitive. + // You can filter the request by the following fields: + // + // * entry_type + // * entry_source.display_name + // + // The comparison operators are =, !=, <, >, <=, >=. The service compares + // strings according to lexical order. + // + // You can use the logical operators AND, OR, NOT in the filter. + // + // You can use Wildcard "*", but for entry_type you need to provide the + // full project id or number. + // + // Example filter expressions: + // + // * "entry_source.display_name=AnExampleDisplayName" + // * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + // * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + // entry_type=projects/another-project/locations/*" + // * "NOT entry_source.display_name=AnotherExampleDisplayName" string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } +// List Entries response. message ListEntriesResponse { - // The list of entries. + // The list of entries under the given parent location. repeated Entry entries = 1; - // Pagination token. + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. string next_page_token = 2; } +// Get Entry request. message GetEntryRequest { // Required. The resource name of the Entry: // `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. @@ -1190,32 +1306,35 @@ message GetEntryRequest { (google.api.resource_reference) = { type: "dataplex.googleapis.com/Entry" } ]; - // Optional. View for controlling which parts of an entry are to be returned. + // Optional. View to control which parts of an entry the service should + // return. EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Limits the aspects returned to the provided aspect types. - // Only works if the CUSTOM view is selected. + // It only works for CUSTOM view. repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Limits the aspects returned to those associated with the provided - // paths within the Entry. Only works if the CUSTOM view is selected. + // paths within the Entry. It only works for CUSTOM view. repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; } +// Lookup Entry request using permissions in the source system. message LookupEntryRequest { // Required. The project to which the request should be attributed in the // following form: `projects/{project}/locations/{location}`. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. View for controlling which parts of an entry are to be returned. + // Optional. View to control which parts of an entry the service should + // return. EntryView view = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Limits the aspects returned to the provided aspect types. - // Only works if the CUSTOM view is selected. + // It only works for CUSTOM view. repeated string aspect_types = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Limits the aspects returned to those associated with the provided - // paths within the Entry. Only works if the CUSTOM view is selected. + // paths within the Entry. It only works for CUSTOM view. repeated string paths = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. The resource name of the Entry: @@ -1229,23 +1348,32 @@ message LookupEntryRequest { message SearchEntriesRequest { // Required. The project to which the request should be attributed in the // following form: `projects/{project}/locations/{location}`. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. The query against which entries in scope should be matched. string query = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Pagination. + // 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 = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Page token received from a previous `SearchEntries` call. Provide + // this to retrieve the subsequent page. string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Ordering of the results. Supported options to be added later. + // Optional. Specifies the ordering of results. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The scope under which the search should be operating. Should - // either be organizations/ or projects/. If left - // unspecified, it will default to the organization where the project provided - // in `name` is located. + // Optional. The scope under which the search should be operating. It must + // either be `organizations/` or `projects/`. If it is + // unspecified, it defaults to the organization where the project provided in + // `name` is located. string scope = 7 [(google.api.field_behavior) = OPTIONAL]; } @@ -1273,18 +1401,444 @@ message SearchEntriesResponse { // The results matching the search query. repeated SearchEntriesResult results = 1; - // The estimated total number of matching entries. Not guaranteed to be - // accurate. + // The estimated total number of matching entries. This number isn't + // guaranteed to be accurate. int32 total_size = 2; - // Pagination token. + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. string next_page_token = 3; - // Unreachable locations. Search results don't include data from those - // locations. + // Locations that the service couldn't reach. Search results don't include + // data from these locations. repeated string unreachable = 4; } +// An object that describes the values that you want to set for an entry and its +// attached aspects when you import metadata. Used when you run a metadata +// import job. See +// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]. +// +// You provide a collection of import items in a metadata import file. For more +// information about how to create a metadata import file, see [Metadata import +// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). +message ImportItem { + // Information about an entry and its attached aspects. + Entry entry = 1; + + // The fields to update, in paths that are relative to the `Entry` resource. + // Separate each field with a comma. + // + // In `FULL` entry sync mode, Dataplex includes the paths of all of the fields + // for an entry that can be modified, including aspects. This means that + // Dataplex replaces the existing entry with the entry in the metadata import + // file. All modifiable fields are updated, regardless of the fields that are + // listed in the update mask, and regardless of whether a field is present + // in the `entry` object. + // + // + // The `update_mask` field is ignored when an entry is created or re-created. + // + // Dataplex also determines which entries and aspects to modify by comparing + // the values and timestamps that you provide in the metadata import file with + // the values and timestamps that exist in your project. For more information, + // see [Comparison + // logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). + google.protobuf.FieldMask update_mask = 2; + + // The aspects to modify. Supports the following syntaxes: + // + // * `{aspect_type_reference}`: matches aspects that belong to the specified + // aspect type and are attached directly to the entry. + // * `{aspect_type_reference}@{path}`: matches aspects that belong to the + // specified aspect type and path. + // * `{aspect_type_reference}@*`: matches aspects that belong to the specified + // aspect type for all paths. + // + // Replace `{aspect_type_reference}` with a reference to the aspect type, in + // the format + // `{project_id_or_number}.{location_id}.{aspect_type_id}`. + // + // If you leave this field empty, it is treated as specifying exactly those + // aspects that are present within the specified entry. + // + // In `FULL` entry sync mode, Dataplex implicitly adds the keys for all of the + // required aspects of an entry. + repeated string aspect_keys = 3; +} + +// Create metadata job request. +message CreateMetadataJobRequest { + // Required. The resource name of the parent location, in the format + // `projects/{project_id_or_number}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The metadata job resource. + MetadataJob metadata_job = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metadata job ID. If not provided, a unique ID is generated + // with the prefix `metadata-job-`. + string metadata_job_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The service validates the request without performing any + // mutations. The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get metadata job request. +message GetMetadataJobRequest { + // Required. The resource name of the metadata job, in the format + // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/MetadataJob" + } + ]; +} + +// List metadata jobs request. +message ListMetadataJobsRequest { + // Required. The resource name of the parent location, in the format + // `projects/{project_id_or_number}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of metadata jobs to return. The service might + // return fewer jobs than this value. If unspecified, at most 10 jobs are + // returned. The maximum value is 1,000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token received from a previous `ListMetadataJobs` call. + // Provide this token to retrieve the subsequent page of results. When + // paginating, all other parameters that are provided to the + // `ListMetadataJobs` request must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. Filters are case-sensitive. + // The service supports the following formats: + // + // * `labels.key1 = "value1"` + // * `labels:key1` + // * `name = "value"` + // + // You can combine filters with `AND`, `OR`, and `NOT` operators. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The field to sort the results by, either `name` or `create_time`. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List metadata jobs response. +message ListMetadataJobsResponse { + // Metadata jobs under the specified parent location. + repeated MetadataJob metadata_jobs = 1; + + // A token to retrieve the next page of results. If there are no more results + // in the list, the value is empty. + string next_page_token = 2; + + // Locations that the service couldn't reach. + repeated string unreachable_locations = 3; +} + +// Cancel metadata job request. +message CancelMetadataJobRequest { + // Required. The resource name of the job, in the format + // `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/MetadataJob" + } + ]; +} + +// A metadata job resource. +message MetadataJob { + option (google.api.resource) = { + type: "dataplex.googleapis.com/MetadataJob" + pattern: "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" + }; + + // Results from a metadata import job. + message ImportJobResult { + // Output only. The total number of entries that were deleted. + int64 deleted_entries = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were updated. + int64 updated_entries = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were created. + int64 created_entries = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were unchanged. + int64 unchanged_entries = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of entries that were recreated. + int64 recreated_entries = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the status was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Job specification for a metadata import job + message ImportJobSpec { + // Specifies how the entries and aspects in a metadata job are updated. + enum SyncMode { + // Sync mode unspecified. + SYNC_MODE_UNSPECIFIED = 0; + + // All resources in the job's scope are modified. If a resource exists in + // Dataplex but isn't included in the metadata import file, the resource + // is deleted when you run the metadata job. Use this mode to perform a + // full sync of the set of entries in the job scope. + FULL = 1; + + // Only the entries and aspects that are explicitly included in the + // metadata import file are modified. Use this mode to modify a subset of + // resources while leaving unreferenced resources unchanged. + INCREMENTAL = 2; + } + + // The level of logs to write to Cloud Logging for this job. + enum LogLevel { + // Log level unspecified. + LOG_LEVEL_UNSPECIFIED = 0; + + // Debug-level logging. Captures detailed logs for each import item. Use + // debug-level logging to troubleshoot issues with specific import items. + // For example, use debug-level logging to identify resources that are + // missing from the job scope, entries or aspects that don't conform to + // the associated entry type or aspect type, or other misconfigurations + // with the metadata import file. + // + // Depending on the size of your metadata job and the number of logs that + // are generated, debug-level logging might incur + // [additional costs](https://cloud.google.com/stackdriver/pricing). + DEBUG = 1; + + // Info-level logging. Captures logs at the overall job level. Includes + // aggregate logs about import items, but doesn't specify which import + // item has an error. + INFO = 2; + } + + // A boundary on the scope of impact that the metadata import job can have. + message ImportJobScope { + // Required. The entry group that is in scope for the import job, + // specified as a relative resource name in the format + // `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`. + // Only entries that belong to the specified entry group are affected by + // the job. + // + // Must contain exactly one element. The entry group and the job + // must be in the same location. + repeated string entry_groups = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryGroup" + } + ]; + + // Required. The entry types that are in scope for the import job, + // specified as relative resource names in the format + // `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`. + // The job modifies only the entries that belong to these entry types. + // + // If the metadata import file attempts to modify an entry whose type + // isn't included in this list, the import job is halted before modifying + // any entries or aspects. + // + // The location of an entry type must either match the location of the + // job, or the entry type must be global. + repeated string entry_types = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/EntryType" + } + ]; + + // Optional. The aspect types that are in scope for the import job, + // specified as relative resource names in the format + // `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + // The job modifies only the aspects that belong to these aspect types. + // + // If the metadata import file attempts to modify an aspect whose type + // isn't included in this list, the import job is halted before modifying + // any entries or aspects. + // + // The location of an aspect type must either match the location of the + // job, or the aspect type must be global. + repeated string aspect_types = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/AspectType" + } + ]; + } + + // Optional. The URI of a Cloud Storage bucket or folder (beginning with + // `gs://` and ending with `/`) that contains the metadata import files for + // this job. + // + // A metadata import file defines the values to set for each of the entries + // and aspects in a metadata job. For more information about how to create a + // metadata import file and the file requirements, see [Metadata import + // file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). + // + // You can provide multiple metadata import files in the same metadata job. + // The bucket or folder must contain at least one metadata import file, in + // JSON Lines format (either `.json` or `.jsonl` file extension). + // + // In `FULL` entry sync mode, don't save the metadata import file in a + // folder named `SOURCE_STORAGE_URI/deletions/`. + // + // **Caution**: If the metadata import file contains no data, all entries + // and aspects that belong to the job's scope are deleted. + string source_storage_uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time when the process that created the metadata import + // files began. + google.protobuf.Timestamp source_create_time = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A boundary on the scope of impact that the metadata import job + // can have. + ImportJobScope scope = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The sync mode for entries. + // Only `FULL` mode is supported for entries. All entries in the job's scope + // are modified. If an entry exists in Dataplex but isn't included in the + // metadata import file, the entry is deleted when you run the metadata job. + SyncMode entry_sync_mode = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The sync mode for aspects. + // Only `INCREMENTAL` mode is supported for aspects. An aspect is modified + // only if the metadata import file includes a reference to the aspect in + // the `update_mask` field and the `aspect_keys` field. + SyncMode aspect_sync_mode = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The level of logs to write to Cloud Logging for this job. + // + // Debug-level logs provide highly-detailed information for + // troubleshooting, but their increased verbosity could incur [additional + // costs](https://cloud.google.com/stackdriver/pricing) that might not be + // merited for all jobs. + // + // If unspecified, defaults to `INFO`. + LogLevel log_level = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Metadata job type. + enum Type { + // Unspecified. + TYPE_UNSPECIFIED = 0; + + // Import job. + IMPORT = 1; + } + + // Metadata job status. + message Status { + // State of a metadata job. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The job is queued. + QUEUED = 1; + + // The job is running. + RUNNING = 2; + + // The job is being canceled. + CANCELING = 3; + + // The job is canceled. + CANCELED = 4; + + // The job succeeded. + SUCCEEDED = 5; + + // The job failed. + FAILED = 6; + + // The job completed with some errors. + SUCCEEDED_WITH_ERRORS = 7; + } + + // Output only. State of the metadata job. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Message relating to the progression of a metadata job. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Progress tracking. + int32 completion_percent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the status was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The name of the resource that the configuration is + // applied to, in the format + // `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. A system-generated, globally unique ID for the metadata job. + // If the metadata job is deleted and then re-created with the same name, this + // ID is different. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The time when the metadata job was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the metadata job was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Metadata job type. + Type type = 6 [(google.api.field_behavior) = REQUIRED]; + + oneof spec { + // Import job specification. + ImportJobSpec import_spec = 100; + } + + oneof result { + // Output only. Import job result. + ImportJobResult import_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Metadata job status. + Status status = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // View for controlling which parts of an entry are to be returned. enum EntryView { // Unspecified EntryView. Defaults to FULL. @@ -1298,10 +1852,10 @@ enum EntryView { FULL = 2; // Returns aspects matching custom fields in GetEntryRequest. If the number of - // aspects would exceed 100, the first 100 will be returned. + // aspects exceeds 100, the first 100 will be returned. CUSTOM = 3; - // Returns all aspects. If the number of aspects would exceed 100, the first + // Returns all aspects. If the number of aspects exceeds 100, the first // 100 will be returned. ALL = 4; } diff --git a/owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_discovery.proto similarity index 100% rename from owl-bot-staging/google-cloud-dataplex/v1/protos/google/cloud/dataplex/v1/data_discovery.proto rename to packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_discovery.proto diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto index 3f4fc6dc45a..701a18262a9 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto @@ -188,15 +188,15 @@ message DataProfileResult { double null_ratio = 2; // Ratio of rows with distinct values against total scanned rows. - // Not available for complex non-groupable field type RECORD and fields - // with REPEATABLE mode. + // Not available for complex non-groupable field type, including RECORD, + // ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. double distinct_ratio = 3; // The list of top N non-null values, frequency and ratio with which // they occur in the scanned data. N is 10 or equal to the number of // distinct values in the field, whichever is smaller. Not available for - // complex non-groupable field type RECORD and fields with REPEATABLE - // mode. + // complex non-groupable field type, including RECORD, ARRAY, GEOGRAPHY, + // and JSON, as well as fields with REPEATABLE mode. repeated TopNValue top_n_values = 4; // Structural and profile information for specific field type. Not diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto index 7b81ef21627..aadc9b2747b 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto @@ -253,7 +253,7 @@ message DataQualityDimensionResult { message DataQualityDimension { // The dimension name a rule belongs to. Supported dimensions are // ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - // "INTEGRITY"] + // "FRESHNESS", "VOLUME"] string name = 1; } @@ -442,7 +442,8 @@ message DataQualityRule { // Required. The dimension a rule belongs to. Results are also aggregated at // the dimension level. Supported dimensions are **["COMPLETENESS", - // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", + // "VOLUME"]** string dimension = 502 [(google.api.field_behavior) = REQUIRED]; // Optional. The minimum ratio of **passing_rows / total_rows** required to @@ -466,6 +467,10 @@ message DataQualityRule { // // * The maximum length is 1,024 characters. string description = 505 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the Rule is active or suspended. + // Default is false. + bool suspended = 506 [(google.api.field_behavior) = OPTIONAL]; } // DataQualityColumnResult provides a more detailed, per-column view of diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto index 0768b5a129e..54a6aca13bc 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/data_discovery.proto"; import "google/cloud/dataplex/v1/data_profile.proto"; import "google/cloud/dataplex/v1/data_quality.proto"; import "google/cloud/dataplex/v1/processing.proto"; @@ -502,26 +503,34 @@ message DataScan { // Output only. The type of DataScan. DataScanType type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Data Scan related setting. - // It is required and immutable which means once data_quality_spec is set, it - // cannot be changed to data_profile_spec. + // Data scan related setting. + // The settings are required and immutable. After you configure the settings + // for one type of data scan, you can't change the data scan to a different + // type of data scan. oneof spec { - // DataQualityScan related setting. + // Settings for a data quality scan. DataQualitySpec data_quality_spec = 100; - // DataProfileScan related setting. + // Settings for a data profile scan. DataProfileSpec data_profile_spec = 101; + + // Settings for a data discovery scan. + DataDiscoverySpec data_discovery_spec = 102; } // The result of the data scan. oneof result { - // Output only. The result of the data quality scan. + // Output only. The result of a data quality scan. DataQualityResult data_quality_result = 200 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The result of the data profile scan. + // Output only. The result of a data profile scan. DataProfileResult data_profile_result = 201 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data discovery scan. + DataDiscoveryResult data_discovery_result = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; } } @@ -565,6 +574,10 @@ message DataScanJob { // Output only. System generated globally unique ID for the DataScanJob. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time when the DataScanJob was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time when the DataScanJob was started. google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -582,37 +595,48 @@ message DataScanJob { // Output only. The type of the parent DataScan. DataScanType type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Data Scan related setting. + // Data scan related setting. oneof spec { - // Output only. DataQualityScan related setting. + // Output only. Settings for a data quality scan. DataQualitySpec data_quality_spec = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. DataProfileScan related setting. + // Output only. Settings for a data profile scan. DataProfileSpec data_profile_spec = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Settings for a data discovery scan. + DataDiscoverySpec data_discovery_spec = 102 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The result of the data scan. oneof result { - // Output only. The result of the data quality scan. + // Output only. The result of a data quality scan. DataQualityResult data_quality_result = 200 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The result of the data profile scan. + // Output only. The result of a data profile scan. DataProfileResult data_profile_result = 201 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of a data discovery scan. + DataDiscoveryResult data_discovery_result = 202 + [(google.api.field_behavior) = OUTPUT_ONLY]; } } -// The type of DataScan. +// The type of data scan. enum DataScanType { - // The DataScan type is unspecified. + // The data scan type is unspecified. DATA_SCAN_TYPE_UNSPECIFIED = 0; - // Data Quality scan. + // Data quality scan. DATA_QUALITY = 1; - // Data Profile scan. + // Data profile scan. DATA_PROFILE = 2; + + // Data discovery scan. + DATA_DISCOVERY = 3; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto index 4c6dc08fb1d..c6e0f37b00b 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -53,6 +53,18 @@ message DiscoveryEvent { // An event representing a partition being deleted. PARTITION_DELETED = 7; + + // An event representing a table being published. + TABLE_PUBLISHED = 10; + + // An event representing a table being updated. + TABLE_UPDATED = 11; + + // An event representing a table being skipped in publishing. + TABLE_IGNORED = 12; + + // An event representing a table being deleted. + TABLE_DELETED = 13; } // The type of the entity. @@ -67,6 +79,21 @@ message DiscoveryEvent { FILESET = 2; } + // The type of the published table. + enum TableType { + // An unspecified table type. + TABLE_TYPE_UNSPECIFIED = 0; + + // External table type. + EXTERNAL_TABLE = 1; + + // BigLake table type. + BIGLAKE_TABLE = 2; + + // Object table type for unstructured data. + OBJECT_TABLE = 3; + } + // Details about configuration events. message ConfigDetails { // A list of discovery configuration parameters in effect. @@ -86,6 +113,15 @@ message DiscoveryEvent { EntityType type = 2; } + // Details about the published table. + message TableDetails { + // The fully-qualified resource name of the table resource. + string table = 1; + + // The type of the table resource. + TableType type = 2; + } + // Details about the partition. message PartitionDetails { // The name to the partition resource. @@ -109,6 +145,9 @@ message DiscoveryEvent { // The type of action. // Eg. IncompatibleDataSchema, InvalidDataFormat string type = 1; + + // The human readable issue associated with the action. + string issue = 2; } // The log message. @@ -126,6 +165,9 @@ message DiscoveryEvent { // The data location associated with the event. string data_location = 5; + // The id of the associated datascan for standalone discovery. + string datascan_id = 6; + // The type of the event being logged. EventType type = 10; @@ -142,6 +184,9 @@ message DiscoveryEvent { // Details about the action associated with the event. ActionDetails action = 23; + + // Details about the BigQuery table publishing associated with the event. + TableDetails table = 24; } } @@ -410,7 +455,6 @@ message GovernanceEvent { // These messages contain information about the execution of a datascan. // The monitored resource is 'DataScan' -// Next ID: 13 message DataScanEvent { // The type of the data scan. enum ScanType { @@ -422,6 +466,9 @@ message DataScanEvent { // Data scan for data quality. DATA_QUALITY = 2; + + // Data scan for data discovery. + DATA_DISCOVERY = 4; } // The job state of the data scan. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto index a9d743a956f..65ab0d15583 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -215,10 +215,9 @@ message Task { // named process arguments (`--key=value`). string python_script_file = 102; - // A reference to a query file. This can be the Cloud Storage URI of the - // query file or it can the path to a SqlScript Content. The execution - // args are used to declare a set of script variables - // (`set key="value";`). + // A reference to a query file. This should be the Cloud Storage URI of + // the query file. The execution args are used to declare a set of script + // variables (`set key="value";`). string sql_script_file = 104; // The query text. diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index 7c26f5c5485..e309b56ecfb 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -4941,6 +4941,62 @@ export namespace google { * @returns Promise */ public searchEntries(request: google.cloud.dataplex.v1.ISearchEntriesRequest): Promise; + + /** + * Calls CreateMetadataJob. + * @param request CreateMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback): void; + + /** + * Calls CreateMetadataJob. + * @param request CreateMetadataJobRequest message or plain object + * @returns Promise + */ + public createMetadataJob(request: google.cloud.dataplex.v1.ICreateMetadataJobRequest): Promise; + + /** + * Calls GetMetadataJob. + * @param request GetMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetadataJob + */ + public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback): void; + + /** + * Calls GetMetadataJob. + * @param request GetMetadataJobRequest message or plain object + * @returns Promise + */ + public getMetadataJob(request: google.cloud.dataplex.v1.IGetMetadataJobRequest): Promise; + + /** + * Calls ListMetadataJobs. + * @param request ListMetadataJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetadataJobsResponse + */ + public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest, callback: google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback): void; + + /** + * Calls ListMetadataJobs. + * @param request ListMetadataJobsRequest message or plain object + * @returns Promise + */ + public listMetadataJobs(request: google.cloud.dataplex.v1.IListMetadataJobsRequest): Promise; + + /** + * Calls CancelMetadataJob. + * @param request CancelMetadataJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest, callback: google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback): void; + + /** + * Calls CancelMetadataJob. + * @param request CancelMetadataJobRequest message or plain object + * @returns Promise + */ + public cancelMetadataJob(request: google.cloud.dataplex.v1.ICancelMetadataJobRequest): Promise; } namespace CatalogService { @@ -5098,6 +5154,34 @@ export namespace google { * @param [response] SearchEntriesResponse */ type SearchEntriesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.SearchEntriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMetadataJobCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. + * @param error Error, if any + * @param [response] MetadataJob + */ + type GetMetadataJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.MetadataJob) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. + * @param error Error, if any + * @param [response] ListMetadataJobsResponse + */ + type ListMetadataJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListMetadataJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelMetadataJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } /** Properties of an AspectType. */ @@ -6496,6 +6580,9 @@ export namespace google { /** AspectSource updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** AspectSource dataVersion */ + dataVersion?: (string|null); } /** Represents an AspectSource. */ @@ -6513,6 +6600,9 @@ export namespace google { /** AspectSource updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** AspectSource dataVersion. */ + public dataVersion: string; + /** * Creates a new AspectSource instance using the specified properties. * @param [properties] Properties to set @@ -10181,443 +10271,1761 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** EntryView enum. */ - enum EntryView { - ENTRY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2, - CUSTOM = 3, - ALL = 4 - } + /** Properties of an ImportItem. */ + interface IImportItem { - /** TransferStatus enum. */ - enum TransferStatus { - TRANSFER_STATUS_UNSPECIFIED = 0, - TRANSFER_STATUS_MIGRATED = 1, - TRANSFER_STATUS_TRANSFERRED = 2 + /** ImportItem entry */ + entry?: (google.cloud.dataplex.v1.IEntry|null); + + /** ImportItem updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportItem aspectKeys */ + aspectKeys?: (string[]|null); } - /** Represents a DataplexService */ - class DataplexService extends $protobuf.rpc.Service { + /** Represents an ImportItem. */ + class ImportItem implements IImportItem { /** - * Constructs a new DataplexService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new ImportItem. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.dataplex.v1.IImportItem); + + /** ImportItem entry. */ + public entry?: (google.cloud.dataplex.v1.IEntry|null); + + /** ImportItem updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** ImportItem aspectKeys. */ + public aspectKeys: string[]; /** - * Creates new DataplexService 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. + * Creates a new ImportItem instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportItem instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataplexService; + public static create(properties?: google.cloud.dataplex.v1.IImportItem): google.cloud.dataplex.v1.ImportItem; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @param message ImportItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + public static encode(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @returns Promise + * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @param message ImportItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IImportItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes an ImportItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ImportItem; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @returns Promise + * Decodes an ImportItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ImportItem; /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies an ImportItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @returns Promise + * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportItem */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ImportItem; /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLakesResponse + * Creates a plain object from an ImportItem message. Also converts values to other types if specified. + * @param message ImportItem + * @param [options] Conversion options + * @returns Plain object */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ImportItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @returns Promise + * Converts this ImportItem to JSON. + * @returns JSON object */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Lake + * Gets the default type url for ImportItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMetadataJobRequest. */ + interface ICreateMetadataJobRequest { + + /** CreateMetadataJobRequest parent */ + parent?: (string|null); + + /** CreateMetadataJobRequest metadataJob */ + metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); + + /** CreateMetadataJobRequest metadataJobId */ + metadataJobId?: (string|null); + + /** CreateMetadataJobRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateMetadataJobRequest. */ + class CreateMetadataJobRequest implements ICreateMetadataJobRequest { /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @returns Promise + * Constructs a new CreateMetadataJobRequest. + * @param [properties] Properties to set */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest); + + /** CreateMetadataJobRequest parent. */ + public parent: string; + + /** CreateMetadataJobRequest metadataJob. */ + public metadataJob?: (google.cloud.dataplex.v1.IMetadataJob|null); + + /** CreateMetadataJobRequest metadataJobId. */ + public metadataJobId: string; + + /** CreateMetadataJobRequest validateOnly. */ + public validateOnly: boolean; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Creates a new CreateMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMetadataJobRequest instance */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + public static create(properties?: google.cloud.dataplex.v1.ICreateMetadataJobRequest): google.cloud.dataplex.v1.CreateMetadataJobRequest; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @returns Promise + * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @param message CreateMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @param message CreateMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @returns Promise + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateMetadataJobRequest; /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateMetadataJobRequest; /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @returns Promise + * Verifies a CreateMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMetadataJobRequest */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateMetadataJobRequest; /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @returns Promise + * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. + * @param message CreateMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.CreateMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListZonesResponse + * Converts this CreateMetadataJobRequest to JSON. + * @returns JSON object */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @returns Promise + * Gets the default type url for CreateMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMetadataJobRequest. */ + interface IGetMetadataJobRequest { + + /** GetMetadataJobRequest name */ + name?: (string|null); + } + + /** Represents a GetMetadataJobRequest. */ + class GetMetadataJobRequest implements IGetMetadataJobRequest { /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Zone + * Constructs a new GetMetadataJobRequest. + * @param [properties] Properties to set */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest); + + /** GetMetadataJobRequest name. */ + public name: string; /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @returns Promise + * Creates a new GetMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetadataJobRequest instance */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IGetMetadataJobRequest): google.cloud.dataplex.v1.GetMetadataJobRequest; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @param message GetMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + public static encode(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @returns Promise + * Encodes the specified GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @param message GetMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a GetMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetMetadataJobRequest; /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @returns Promise + * Decodes a GetMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetMetadataJobRequest; /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a GetMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @returns Promise + * Creates a GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetadataJobRequest */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetMetadataJobRequest; /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. + * @param message GetMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + public static toObject(message: google.cloud.dataplex.v1.GetMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @returns Promise + * Converts this GetMetadataJobRequest to JSON. + * @returns JSON object */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + * Gets the default type url for GetMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMetadataJobsRequest. */ + interface IListMetadataJobsRequest { + + /** ListMetadataJobsRequest parent */ + parent?: (string|null); + + /** ListMetadataJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListMetadataJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListMetadataJobsRequest filter */ + filter?: (string|null); + + /** ListMetadataJobsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListMetadataJobsRequest. */ + class ListMetadataJobsRequest implements IListMetadataJobsRequest { /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Constructs a new ListMetadataJobsRequest. + * @param [properties] Properties to set */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest); + + /** ListMetadataJobsRequest parent. */ + public parent: string; + + /** ListMetadataJobsRequest pageSize. */ + public pageSize: number; + + /** ListMetadataJobsRequest pageToken. */ + public pageToken: string; + + /** ListMetadataJobsRequest filter. */ + public filter: string; + + /** ListMetadataJobsRequest orderBy. */ + public orderBy: string; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Asset + * Creates a new ListMetadataJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetadataJobsRequest instance */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsRequest): google.cloud.dataplex.v1.ListMetadataJobsRequest; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @returns Promise + * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @param message ListMetadataJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @param message ListMetadataJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @returns Promise + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsRequest; /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsRequest; /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @returns Promise + * Verifies a ListMetadataJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetadataJobsRequest */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsRequest; /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @returns Promise + * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. + * @param message ListMetadataJobsRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this ListMetadataJobsRequest to JSON. + * @returns JSON object */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @returns Promise + * Gets the default type url for ListMetadataJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMetadataJobsResponse. */ + interface IListMetadataJobsResponse { + + /** ListMetadataJobsResponse metadataJobs */ + metadataJobs?: (google.cloud.dataplex.v1.IMetadataJob[]|null); + + /** ListMetadataJobsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMetadataJobsResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } + + /** Represents a ListMetadataJobsResponse. */ + class ListMetadataJobsResponse implements IListMetadataJobsResponse { /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTasksResponse + * Constructs a new ListMetadataJobsResponse. + * @param [properties] Properties to set */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse); + + /** ListMetadataJobsResponse metadataJobs. */ + public metadataJobs: google.cloud.dataplex.v1.IMetadataJob[]; + + /** ListMetadataJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMetadataJobsResponse unreachableLocations. */ + public unreachableLocations: string[]; /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @returns Promise + * Creates a new ListMetadataJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetadataJobsResponse instance */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IListMetadataJobsResponse): google.cloud.dataplex.v1.ListMetadataJobsResponse; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Task + * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @param message ListMetadataJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + public static encode(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @returns Promise + * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @param message ListMetadataJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListMetadataJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobsResponse + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListMetadataJobsResponse; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @returns Promise + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListMetadataJobsResponse; /** - * Calls RunTask. - * @param request RunTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RunTaskResponse + * Verifies a ListMetadataJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.RunTaskCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls RunTask. - * @param request RunTaskRequest message or plain object - * @returns Promise + * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetadataJobsResponse */ - public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListMetadataJobsResponse; /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job + * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. + * @param message ListMetadataJobsResponse + * @param [options] Conversion options + * @returns Plain object */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ListMetadataJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @returns Promise + * Converts this ListMetadataJobsResponse to JSON. + * @returns JSON object */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Gets the default type url for ListMetadataJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelMetadataJobRequest. */ + interface ICancelMetadataJobRequest { + + /** CancelMetadataJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelMetadataJobRequest. */ + class CancelMetadataJobRequest implements ICancelMetadataJobRequest { /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @returns Promise + * Constructs a new CancelMetadataJobRequest. + * @param [properties] Properties to set */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest); + + /** CancelMetadataJobRequest name. */ + public name: string; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new CancelMetadataJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelMetadataJobRequest instance */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; + public static create(properties?: google.cloud.dataplex.v1.ICancelMetadataJobRequest): google.cloud.dataplex.v1.CancelMetadataJobRequest; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise + * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @param message CancelMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @param message CancelMetadataJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelMetadataJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEnvironment. + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Verifies a CancelMetadataJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelMetadataJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelMetadataJobRequest; + + /** + * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. + * @param message CancelMetadataJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CancelMetadataJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelMetadataJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelMetadataJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataJob. */ + interface IMetadataJob { + + /** MetadataJob name */ + name?: (string|null); + + /** MetadataJob uid */ + uid?: (string|null); + + /** MetadataJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob labels */ + labels?: ({ [k: string]: string }|null); + + /** MetadataJob type */ + type?: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type|null); + + /** MetadataJob importSpec */ + importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); + + /** MetadataJob importResult */ + importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); + + /** MetadataJob status */ + status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); + } + + /** Represents a MetadataJob. */ + class MetadataJob implements IMetadataJob { + + /** + * Constructs a new MetadataJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IMetadataJob); + + /** MetadataJob name. */ + public name: string; + + /** MetadataJob uid. */ + public uid: string; + + /** MetadataJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MetadataJob labels. */ + public labels: { [k: string]: string }; + + /** MetadataJob type. */ + public type: (google.cloud.dataplex.v1.MetadataJob.Type|keyof typeof google.cloud.dataplex.v1.MetadataJob.Type); + + /** MetadataJob importSpec. */ + public importSpec?: (google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null); + + /** MetadataJob importResult. */ + public importResult?: (google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null); + + /** MetadataJob status. */ + public status?: (google.cloud.dataplex.v1.MetadataJob.IStatus|null); + + /** MetadataJob spec. */ + public spec?: "importSpec"; + + /** MetadataJob result. */ + public result?: "importResult"; + + /** + * Creates a new MetadataJob instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataJob instance + */ + public static create(properties?: google.cloud.dataplex.v1.IMetadataJob): google.cloud.dataplex.v1.MetadataJob; + + /** + * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @param message MetadataJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. + * @param message MetadataJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IMetadataJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob; + + /** + * Decodes a MetadataJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob; + + /** + * Verifies a MetadataJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob; + + /** + * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. + * @param message MetadataJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetadataJob { + + /** Properties of an ImportJobResult. */ + interface IImportJobResult { + + /** ImportJobResult deletedEntries */ + deletedEntries?: (number|Long|string|null); + + /** ImportJobResult updatedEntries */ + updatedEntries?: (number|Long|string|null); + + /** ImportJobResult createdEntries */ + createdEntries?: (number|Long|string|null); + + /** ImportJobResult unchangedEntries */ + unchangedEntries?: (number|Long|string|null); + + /** ImportJobResult recreatedEntries */ + recreatedEntries?: (number|Long|string|null); + + /** ImportJobResult updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ImportJobResult. */ + class ImportJobResult implements IImportJobResult { + + /** + * Constructs a new ImportJobResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult); + + /** ImportJobResult deletedEntries. */ + public deletedEntries: (number|Long|string); + + /** ImportJobResult updatedEntries. */ + public updatedEntries: (number|Long|string); + + /** ImportJobResult createdEntries. */ + public createdEntries: (number|Long|string); + + /** ImportJobResult unchangedEntries. */ + public unchangedEntries: (number|Long|string); + + /** ImportJobResult recreatedEntries. */ + public recreatedEntries: (number|Long|string); + + /** ImportJobResult updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ImportJobResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobResult): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @param message ImportJobResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @param message ImportJobResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Verifies an ImportJobResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobResult; + + /** + * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. + * @param message ImportJobResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportJobSpec. */ + interface IImportJobSpec { + + /** ImportJobSpec sourceStorageUri */ + sourceStorageUri?: (string|null); + + /** ImportJobSpec sourceCreateTime */ + sourceCreateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJobSpec scope */ + scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); + + /** ImportJobSpec entrySyncMode */ + entrySyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); + + /** ImportJobSpec aspectSyncMode */ + aspectSyncMode?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null); + + /** ImportJobSpec logLevel */ + logLevel?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null); + } + + /** Represents an ImportJobSpec. */ + class ImportJobSpec implements IImportJobSpec { + + /** + * Constructs a new ImportJobSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec); + + /** ImportJobSpec sourceStorageUri. */ + public sourceStorageUri: string; + + /** ImportJobSpec sourceCreateTime. */ + public sourceCreateTime?: (google.protobuf.ITimestamp|null); + + /** ImportJobSpec scope. */ + public scope?: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null); + + /** ImportJobSpec entrySyncMode. */ + public entrySyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); + + /** ImportJobSpec aspectSyncMode. */ + public aspectSyncMode: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode); + + /** ImportJobSpec logLevel. */ + public logLevel: (google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|keyof typeof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel); + + /** + * Creates a new ImportJobSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @param message ImportJobSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @param message ImportJobSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.IImportJobSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Verifies an ImportJobSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec; + + /** + * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. + * @param message ImportJobSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportJobSpec { + + /** SyncMode enum. */ + enum SyncMode { + SYNC_MODE_UNSPECIFIED = 0, + FULL = 1, + INCREMENTAL = 2 + } + + /** LogLevel enum. */ + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0, + DEBUG = 1, + INFO = 2 + } + + /** Properties of an ImportJobScope. */ + interface IImportJobScope { + + /** ImportJobScope entryGroups */ + entryGroups?: (string[]|null); + + /** ImportJobScope entryTypes */ + entryTypes?: (string[]|null); + + /** ImportJobScope aspectTypes */ + aspectTypes?: (string[]|null); + } + + /** Represents an ImportJobScope. */ + class ImportJobScope implements IImportJobScope { + + /** + * Constructs a new ImportJobScope. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope); + + /** ImportJobScope entryGroups. */ + public entryGroups: string[]; + + /** ImportJobScope entryTypes. */ + public entryTypes: string[]; + + /** ImportJobScope aspectTypes. */ + public aspectTypes: string[]; + + /** + * Creates a new ImportJobScope instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportJobScope instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @param message ImportJobScope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @param message ImportJobScope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Verifies an ImportJobScope message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportJobScope + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope; + + /** + * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. + * @param message ImportJobScope + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportJobScope to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportJobScope + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + IMPORT = 1 + } + + /** Properties of a Status. */ + interface IStatus { + + /** Status state */ + state?: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State|null); + + /** Status message */ + message?: (string|null); + + /** Status completionPercent */ + completionPercent?: (number|null); + + /** Status updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus); + + /** Status state. */ + public state: (google.cloud.dataplex.v1.MetadataJob.Status.State|keyof typeof google.cloud.dataplex.v1.MetadataJob.Status.State); + + /** Status message. */ + public message: string; + + /** Status completionPercent. */ + public completionPercent: number; + + /** Status updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.cloud.dataplex.v1.MetadataJob.IStatus): google.cloud.dataplex.v1.MetadataJob.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Status { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + QUEUED = 1, + RUNNING = 2, + CANCELING = 3, + CANCELED = 4, + SUCCEEDED = 5, + FAILED = 6, + SUCCEEDED_WITH_ERRORS = 7 + } + } + } + + /** EntryView enum. */ + enum EntryView { + ENTRY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2, + CUSTOM = 3, + ALL = 4 + } + + /** TransferStatus enum. */ + enum TransferStatus { + TRANSFER_STATUS_UNSPECIFIED = 0, + TRANSFER_STATUS_MIGRATED = 1, + TRANSFER_STATUS_TRANSFERRED = 2 + } + + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataplexService 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 DataplexService 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): DataplexService; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + + /** + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise + */ + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + + /** + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise + */ + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + + /** + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise + */ + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + + /** + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise + */ + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunTaskResponse + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.RunTaskCallback): void; + + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @returns Promise + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest): Promise; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. * @param request UpdateEnvironmentRequest message or plain object * @returns Promise */ @@ -17100,701 +18508,1462 @@ export namespace google { * @param error Error, if any * @param [response] Content */ - type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + type CreateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. + * @param error Error, if any + * @param [response] Content + */ + type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. + * @param error Error, if any + * @param [response] Content + */ + type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|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.dataplex.v1.ContentService|listContent}. + * @param error Error, if any + * @param [response] ListContentResponse + */ + type ListContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListContentResponse) => void; + } + + /** Properties of a CreateContentRequest. */ + interface ICreateContentRequest { + + /** CreateContentRequest parent */ + parent?: (string|null); + + /** CreateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); + + /** CreateContentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateContentRequest. */ + class CreateContentRequest implements ICreateContentRequest { + + /** + * Constructs a new CreateContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateContentRequest); + + /** CreateContentRequest parent. */ + public parent: string; + + /** CreateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); + + /** CreateContentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateContentRequest): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @param message CreateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Verifies a CreateContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateContentRequest; + + /** + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * @param message CreateContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateContentRequest. */ + interface IUpdateContentRequest { + + /** UpdateContentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateContentRequest content */ + content?: (google.cloud.dataplex.v1.IContent|null); + + /** UpdateContentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateContentRequest. */ + class UpdateContentRequest implements IUpdateContentRequest { + + /** + * Constructs a new UpdateContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateContentRequest); + + /** UpdateContentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateContentRequest content. */ + public content?: (google.cloud.dataplex.v1.IContent|null); + + /** UpdateContentRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateContentRequest): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @param message UpdateContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Verifies an UpdateContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateContentRequest; + + /** + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @param message UpdateContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteContentRequest. */ + interface IDeleteContentRequest { + + /** DeleteContentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteContentRequest. */ + class DeleteContentRequest implements IDeleteContentRequest { + + /** + * Constructs a new DeleteContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteContentRequest); + + /** DeleteContentRequest name. */ + public name: string; + + /** + * Creates a new DeleteContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteContentRequest): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. + * @param message DeleteContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Verifies a DeleteContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteContentRequest; + + /** + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. + * @param message DeleteContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListContentRequest. */ + interface IListContentRequest { + + /** ListContentRequest parent */ + parent?: (string|null); + + /** ListContentRequest pageSize */ + pageSize?: (number|null); + + /** ListContentRequest pageToken */ + pageToken?: (string|null); + + /** ListContentRequest filter */ + filter?: (string|null); + } + + /** Represents a ListContentRequest. */ + class ListContentRequest implements IListContentRequest { + + /** + * Constructs a new ListContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListContentRequest); + + /** ListContentRequest parent. */ + public parent: string; + + /** ListContentRequest pageSize. */ + public pageSize: number; + + /** ListContentRequest pageToken. */ + public pageToken: string; + + /** ListContentRequest filter. */ + public filter: string; + + /** + * Creates a new ListContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContentRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListContentRequest): google.cloud.dataplex.v1.ListContentRequest; + + /** + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @param message ListContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. - * @param error Error, if any - * @param [response] Content + * Decodes a ListContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. - * @param error Error, if any - * @param [response] Empty + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteContentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. - * @param error Error, if any - * @param [response] Content + * Verifies a ListContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Content) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContentRequest */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @param message ListContentRequest + * @param [options] Conversion options + * @returns Plain object */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + public static toObject(message: google.cloud.dataplex.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse + * Converts this ListContentRequest to JSON. + * @returns JSON object */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. - * @param error Error, if any - * @param [response] ListContentResponse + * Gets the default type url for ListContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListContentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListContentResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateContentRequest. */ - interface ICreateContentRequest { - - /** CreateContentRequest parent */ - parent?: (string|null); + /** Properties of a ListContentResponse. */ + interface IListContentResponse { - /** CreateContentRequest content */ - content?: (google.cloud.dataplex.v1.IContent|null); + /** ListContentResponse content */ + content?: (google.cloud.dataplex.v1.IContent[]|null); - /** CreateContentRequest validateOnly */ - validateOnly?: (boolean|null); + /** ListContentResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateContentRequest. */ - class CreateContentRequest implements ICreateContentRequest { + /** Represents a ListContentResponse. */ + class ListContentResponse implements IListContentResponse { /** - * Constructs a new CreateContentRequest. + * Constructs a new ListContentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateContentRequest); - - /** CreateContentRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dataplex.v1.IListContentResponse); - /** CreateContentRequest content. */ - public content?: (google.cloud.dataplex.v1.IContent|null); + /** ListContentResponse content. */ + public content: google.cloud.dataplex.v1.IContent[]; - /** CreateContentRequest validateOnly. */ - public validateOnly: boolean; + /** ListContentResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateContentRequest instance using the specified properties. + * Creates a new ListContentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateContentRequest instance + * @returns ListContentResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateContentRequest): google.cloud.dataplex.v1.CreateContentRequest; + public static create(properties?: google.cloud.dataplex.v1.IListContentResponse): google.cloud.dataplex.v1.ListContentResponse; /** - * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @param message CreateContentRequest message or plain object to encode + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. - * @param message CreateContentRequest message or plain object to encode + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @param message ListContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateContentRequest message from the specified reader or buffer. + * Decodes a ListContentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateContentRequest + * @returns ListContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateContentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentResponse; /** - * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateContentRequest + * @returns ListContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateContentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentResponse; /** - * Verifies a CreateContentRequest message. + * Verifies a ListContentResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateContentRequest + * @returns ListContentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateContentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentResponse; /** - * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. - * @param message CreateContentRequest + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @param message ListContentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateContentRequest to JSON. + * Converts this ListContentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateContentRequest + * Gets the default type url for ListContentResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateContentRequest. */ - interface IUpdateContentRequest { - - /** UpdateContentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a GetContentRequest. */ + interface IGetContentRequest { - /** UpdateContentRequest content */ - content?: (google.cloud.dataplex.v1.IContent|null); + /** GetContentRequest name */ + name?: (string|null); - /** UpdateContentRequest validateOnly */ - validateOnly?: (boolean|null); + /** GetContentRequest view */ + view?: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView|null); } - /** Represents an UpdateContentRequest. */ - class UpdateContentRequest implements IUpdateContentRequest { + /** Represents a GetContentRequest. */ + class GetContentRequest implements IGetContentRequest { /** - * Constructs a new UpdateContentRequest. + * Constructs a new GetContentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateContentRequest); - - /** UpdateContentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.dataplex.v1.IGetContentRequest); - /** UpdateContentRequest content. */ - public content?: (google.cloud.dataplex.v1.IContent|null); + /** GetContentRequest name. */ + public name: string; - /** UpdateContentRequest validateOnly. */ - public validateOnly: boolean; + /** GetContentRequest view. */ + public view: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView); /** - * Creates a new UpdateContentRequest instance using the specified properties. + * Creates a new GetContentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateContentRequest instance + * @returns GetContentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateContentRequest): google.cloud.dataplex.v1.UpdateContentRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetContentRequest): google.cloud.dataplex.v1.GetContentRequest; /** - * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @param message UpdateContentRequest message or plain object to encode + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. - * @param message UpdateContentRequest message or plain object to encode + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * @param message GetContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateContentRequest message from the specified reader or buffer. + * Decodes a GetContentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateContentRequest + * @returns GetContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateContentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetContentRequest; /** - * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateContentRequest + * @returns GetContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateContentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetContentRequest; /** - * Verifies an UpdateContentRequest message. + * Verifies a GetContentRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateContentRequest + * @returns GetContentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateContentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetContentRequest; /** - * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. - * @param message UpdateContentRequest + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * @param message GetContentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateContentRequest to JSON. + * Converts this GetContentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateContentRequest + * Gets the default type url for GetContentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteContentRequest. */ - interface IDeleteContentRequest { + namespace GetContentRequest { - /** DeleteContentRequest name */ - name?: (string|null); + /** ContentView enum. */ + enum ContentView { + CONTENT_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 2 + } } - /** Represents a DeleteContentRequest. */ - class DeleteContentRequest implements IDeleteContentRequest { + /** Properties of a DataDiscoverySpec. */ + interface IDataDiscoverySpec { + + /** DataDiscoverySpec bigqueryPublishingConfig */ + bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); + + /** DataDiscoverySpec storageConfig */ + storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); + } + + /** Represents a DataDiscoverySpec. */ + class DataDiscoverySpec implements IDataDiscoverySpec { /** - * Constructs a new DeleteContentRequest. + * Constructs a new DataDiscoverySpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteContentRequest); + constructor(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec); - /** DeleteContentRequest name. */ - public name: string; + /** DataDiscoverySpec bigqueryPublishingConfig. */ + public bigqueryPublishingConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null); + + /** DataDiscoverySpec storageConfig. */ + public storageConfig?: (google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null); + + /** DataDiscoverySpec resourceConfig. */ + public resourceConfig?: "storageConfig"; /** - * Creates a new DeleteContentRequest instance using the specified properties. + * Creates a new DataDiscoverySpec instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteContentRequest instance + * @returns DataDiscoverySpec instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteContentRequest): google.cloud.dataplex.v1.DeleteContentRequest; + public static create(properties?: google.cloud.dataplex.v1.IDataDiscoverySpec): google.cloud.dataplex.v1.DataDiscoverySpec; /** - * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @param message DeleteContentRequest message or plain object to encode + * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @param message DataDiscoverySpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @param message DeleteContentRequest message or plain object to encode + * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. + * @param message DataDiscoverySpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoverySpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteContentRequest message from the specified reader or buffer. + * Decodes a DataDiscoverySpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteContentRequest + * @returns DataDiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteContentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec; /** - * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. + * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteContentRequest + * @returns DataDiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteContentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec; /** - * Verifies a DeleteContentRequest message. + * Verifies a DataDiscoverySpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteContentRequest + * @returns DataDiscoverySpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteContentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec; /** - * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. - * @param message DeleteContentRequest + * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. + * @param message DataDiscoverySpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteContentRequest to JSON. + * Converts this DataDiscoverySpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteContentRequest + * Gets the default type url for DataDiscoverySpec * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListContentRequest. */ - interface IListContentRequest { + namespace DataDiscoverySpec { - /** ListContentRequest parent */ - parent?: (string|null); + /** Properties of a BigQueryPublishingConfig. */ + interface IBigQueryPublishingConfig { - /** ListContentRequest pageSize */ - pageSize?: (number|null); + /** BigQueryPublishingConfig tableType */ + tableType?: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null); + + /** BigQueryPublishingConfig connection */ + connection?: (string|null); + } + + /** Represents a BigQueryPublishingConfig. */ + class BigQueryPublishingConfig implements IBigQueryPublishingConfig { + + /** + * Constructs a new BigQueryPublishingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig); + + /** BigQueryPublishingConfig tableType. */ + public tableType: (google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|keyof typeof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType); + + /** BigQueryPublishingConfig connection. */ + public connection: string; + + /** + * Creates a new BigQueryPublishingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryPublishingConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Encodes the specified BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @param message BigQueryPublishingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @param message BigQueryPublishingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Verifies a BigQueryPublishingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryPublishingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig; + + /** + * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. + * @param message BigQueryPublishingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryPublishingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryPublishingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryPublishingConfig { + + /** TableType enum. */ + enum TableType { + TABLE_TYPE_UNSPECIFIED = 0, + EXTERNAL = 1, + BIGLAKE = 2 + } + } + + /** Properties of a StorageConfig. */ + interface IStorageConfig { + + /** StorageConfig includePatterns */ + includePatterns?: (string[]|null); + + /** StorageConfig excludePatterns */ + excludePatterns?: (string[]|null); + + /** StorageConfig csvOptions */ + csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); + + /** StorageConfig jsonOptions */ + jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); + } + + /** Represents a StorageConfig. */ + class StorageConfig implements IStorageConfig { + + /** + * Constructs a new StorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig); + + /** StorageConfig includePatterns. */ + public includePatterns: string[]; + + /** StorageConfig excludePatterns. */ + public excludePatterns: string[]; + + /** StorageConfig csvOptions. */ + public csvOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null); + + /** StorageConfig jsonOptions. */ + public jsonOptions?: (google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null); + + /** + * Creates a new StorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Verifies a StorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @param message StorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StorageConfig { + + /** Properties of a CsvOptions. */ + interface ICsvOptions { + + /** CsvOptions headerRows */ + headerRows?: (number|null); + + /** CsvOptions delimiter */ + delimiter?: (string|null); + + /** CsvOptions encoding */ + encoding?: (string|null); + + /** CsvOptions typeInferenceDisabled */ + typeInferenceDisabled?: (boolean|null); + + /** CsvOptions quote */ + quote?: (string|null); + } + + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { + + /** + * Constructs a new CsvOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions); + + /** CsvOptions headerRows. */ + public headerRows: number; + + /** CsvOptions delimiter. */ + public delimiter: string; + + /** CsvOptions encoding. */ + public encoding: string; + + /** CsvOptions typeInferenceDisabled. */ + public typeInferenceDisabled: boolean; + + /** CsvOptions quote. */ + public quote: string; + + /** + * Creates a new CsvOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CsvOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Verifies a CsvOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CsvOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions; + + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListContentRequest pageToken */ - pageToken?: (string|null); + /** + * Converts this CsvOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListContentRequest filter */ - filter?: (string|null); - } + /** + * Gets the default type url for CsvOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a ListContentRequest. */ - class ListContentRequest implements IListContentRequest { + /** Properties of a JsonOptions. */ + interface IJsonOptions { - /** - * Constructs a new ListContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListContentRequest); + /** JsonOptions encoding */ + encoding?: (string|null); - /** ListContentRequest parent. */ - public parent: string; + /** JsonOptions typeInferenceDisabled */ + typeInferenceDisabled?: (boolean|null); + } - /** ListContentRequest pageSize. */ - public pageSize: number; + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { - /** ListContentRequest pageToken. */ - public pageToken: string; + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions); - /** ListContentRequest filter. */ - public filter: string; + /** JsonOptions encoding. */ + public encoding: string; - /** - * Creates a new ListContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListContentRequest): google.cloud.dataplex.v1.ListContentRequest; + /** JsonOptions typeInferenceDisabled. */ + public typeInferenceDisabled: boolean; - /** - * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @param message ListContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new JsonOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - /** - * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @param message ListContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentRequest; + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentRequest; + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - /** - * Verifies a ListContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - /** - * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentRequest; + /** + * Verifies a JsonOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. - * @param message ListContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions; - /** - * Converts this ListContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for ListContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this JsonOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ListContentResponse. */ - interface IListContentResponse { + /** + * Gets the default type url for JsonOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } - /** ListContentResponse content */ - content?: (google.cloud.dataplex.v1.IContent[]|null); + /** Properties of a DataDiscoveryResult. */ + interface IDataDiscoveryResult { - /** ListContentResponse nextPageToken */ - nextPageToken?: (string|null); + /** DataDiscoveryResult bigqueryPublishing */ + bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); } - /** Represents a ListContentResponse. */ - class ListContentResponse implements IListContentResponse { + /** Represents a DataDiscoveryResult. */ + class DataDiscoveryResult implements IDataDiscoveryResult { /** - * Constructs a new ListContentResponse. + * Constructs a new DataDiscoveryResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListContentResponse); + constructor(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult); - /** ListContentResponse content. */ - public content: google.cloud.dataplex.v1.IContent[]; - - /** ListContentResponse nextPageToken. */ - public nextPageToken: string; + /** DataDiscoveryResult bigqueryPublishing. */ + public bigqueryPublishing?: (google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null); /** - * Creates a new ListContentResponse instance using the specified properties. + * Creates a new DataDiscoveryResult instance using the specified properties. * @param [properties] Properties to set - * @returns ListContentResponse instance + * @returns DataDiscoveryResult instance */ - public static create(properties?: google.cloud.dataplex.v1.IListContentResponse): google.cloud.dataplex.v1.ListContentResponse; + public static create(properties?: google.cloud.dataplex.v1.IDataDiscoveryResult): google.cloud.dataplex.v1.DataDiscoveryResult; /** - * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @param message ListContentResponse message or plain object to encode + * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @param message DataDiscoveryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @param message ListContentResponse message or plain object to encode + * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. + * @param message DataDiscoveryResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataDiscoveryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListContentResponse message from the specified reader or buffer. + * Decodes a DataDiscoveryResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListContentResponse + * @returns DataDiscoveryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListContentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult; /** - * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListContentResponse + * @returns DataDiscoveryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListContentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult; /** - * Verifies a ListContentResponse message. + * Verifies a DataDiscoveryResult message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListContentResponse + * @returns DataDiscoveryResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListContentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult; /** - * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. - * @param message ListContentResponse + * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. + * @param message DataDiscoveryResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListContentResponse to JSON. + * Converts this DataDiscoveryResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListContentResponse + * Gets the default type url for DataDiscoveryResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetContentRequest. */ - interface IGetContentRequest { - - /** GetContentRequest name */ - name?: (string|null); - - /** GetContentRequest view */ - view?: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView|null); - } - - /** Represents a GetContentRequest. */ - class GetContentRequest implements IGetContentRequest { + namespace DataDiscoveryResult { - /** - * Constructs a new GetContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetContentRequest); + /** Properties of a BigQueryPublishing. */ + interface IBigQueryPublishing { - /** GetContentRequest name. */ - public name: string; + /** BigQueryPublishing dataset */ + dataset?: (string|null); + } - /** GetContentRequest view. */ - public view: (google.cloud.dataplex.v1.GetContentRequest.ContentView|keyof typeof google.cloud.dataplex.v1.GetContentRequest.ContentView); + /** Represents a BigQueryPublishing. */ + class BigQueryPublishing implements IBigQueryPublishing { - /** - * Creates a new GetContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetContentRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetContentRequest): google.cloud.dataplex.v1.GetContentRequest; + /** + * Constructs a new BigQueryPublishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing); - /** - * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @param message GetContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** BigQueryPublishing dataset. */ + public dataset: string; - /** - * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. - * @param message GetContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BigQueryPublishing instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryPublishing instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - /** - * Decodes a GetContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetContentRequest; + /** + * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @param message BigQueryPublishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetContentRequest; + /** + * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @param message BigQueryPublishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GetContentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - /** - * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetContentRequest; + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - /** - * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. - * @param message GetContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a BigQueryPublishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this GetContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryPublishing + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing; - /** - * Gets the default type url for GetContentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. + * @param message BigQueryPublishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace GetContentRequest { + /** + * Converts this BigQueryPublishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ContentView enum. */ - enum ContentView { - CONTENT_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 + /** + * Gets the default type url for BigQueryPublishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -21540,6 +23709,9 @@ export namespace google { /** DataQualityRule description */ description?: (string|null); + + /** DataQualityRule suspended */ + suspended?: (boolean|null); } /** Represents a DataQualityRule. */ @@ -21596,6 +23768,9 @@ export namespace google { /** DataQualityRule description. */ public description: string; + /** DataQualityRule suspended. */ + public suspended: boolean; + /** DataQualityRule ruleType. */ public ruleType?: ("rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|"sqlAssertion"); @@ -27428,11 +29603,17 @@ export namespace google { /** DataScan dataProfileSpec */ dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + /** DataScan dataDiscoverySpec */ + dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + /** DataScan dataQualityResult */ dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); /** DataScan dataProfileResult */ dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScan dataDiscoveryResult */ + dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); } /** Represents a DataScan. */ @@ -27486,17 +29667,23 @@ export namespace google { /** DataScan dataProfileSpec. */ public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + /** DataScan dataDiscoverySpec. */ + public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + /** DataScan dataQualityResult. */ public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); /** DataScan dataProfileResult. */ public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + /** DataScan dataDiscoveryResult. */ + public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + /** DataScan spec. */ - public spec?: ("dataQualitySpec"|"dataProfileSpec"); + public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); /** DataScan result. */ - public result?: ("dataQualityResult"|"dataProfileResult"); + public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); /** * Creates a new DataScan instance using the specified properties. @@ -27803,6 +29990,9 @@ export namespace google { /** DataScanJob uid */ uid?: (string|null); + /** DataScanJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + /** DataScanJob startTime */ startTime?: (google.protobuf.ITimestamp|null); @@ -27824,11 +30014,17 @@ export namespace google { /** DataScanJob dataProfileSpec */ dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + /** DataScanJob dataDiscoverySpec */ + dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + /** DataScanJob dataQualityResult */ dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); /** DataScanJob dataProfileResult */ dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScanJob dataDiscoveryResult */ + dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); } /** Represents a DataScanJob. */ @@ -27846,6 +30042,9 @@ export namespace google { /** DataScanJob uid. */ public uid: string; + /** DataScanJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + /** DataScanJob startTime. */ public startTime?: (google.protobuf.ITimestamp|null); @@ -27867,17 +30066,23 @@ export namespace google { /** DataScanJob dataProfileSpec. */ public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + /** DataScanJob dataDiscoverySpec. */ + public dataDiscoverySpec?: (google.cloud.dataplex.v1.IDataDiscoverySpec|null); + /** DataScanJob dataQualityResult. */ public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); /** DataScanJob dataProfileResult. */ public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + /** DataScanJob dataDiscoveryResult. */ + public dataDiscoveryResult?: (google.cloud.dataplex.v1.IDataDiscoveryResult|null); + /** DataScanJob spec. */ - public spec?: ("dataQualitySpec"|"dataProfileSpec"); + public spec?: ("dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"); /** DataScanJob result. */ - public result?: ("dataQualityResult"|"dataProfileResult"); + public result?: ("dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"); /** * Creates a new DataScanJob instance using the specified properties. @@ -27975,7 +30180,8 @@ export namespace google { enum DataScanType { DATA_SCAN_TYPE_UNSPECIFIED = 0, DATA_QUALITY = 1, - DATA_PROFILE = 2 + DATA_PROFILE = 2, + DATA_DISCOVERY = 3 } /** Properties of a DiscoveryEvent. */ @@ -27996,6 +30202,9 @@ export namespace google { /** DiscoveryEvent dataLocation */ dataLocation?: (string|null); + /** DiscoveryEvent datascanId */ + datascanId?: (string|null); + /** DiscoveryEvent type */ type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); @@ -28010,6 +30219,9 @@ export namespace google { /** DiscoveryEvent action */ action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent table */ + table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); } /** Represents a DiscoveryEvent. */ @@ -28036,6 +30248,9 @@ export namespace google { /** DiscoveryEvent dataLocation. */ public dataLocation: string; + /** DiscoveryEvent datascanId. */ + public datascanId: string; + /** DiscoveryEvent type. */ public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); @@ -28051,8 +30266,11 @@ export namespace google { /** DiscoveryEvent action. */ public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + /** DiscoveryEvent table. */ + public table?: (google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null); + /** DiscoveryEvent details. */ - public details?: ("config"|"entity"|"partition"|"action"); + public details?: ("config"|"entity"|"partition"|"action"|"table"); /** * Creates a new DiscoveryEvent instance using the specified properties. @@ -28143,7 +30361,11 @@ export namespace google { ENTITY_DELETED = 4, PARTITION_CREATED = 5, PARTITION_UPDATED = 6, - PARTITION_DELETED = 7 + PARTITION_DELETED = 7, + TABLE_PUBLISHED = 10, + TABLE_UPDATED = 11, + TABLE_IGNORED = 12, + TABLE_DELETED = 13 } /** EntityType enum. */ @@ -28153,6 +30375,14 @@ export namespace google { FILESET = 2 } + /** TableType enum. */ + enum TableType { + TABLE_TYPE_UNSPECIFIED = 0, + EXTERNAL_TABLE = 1, + BIGLAKE_TABLE = 2, + OBJECT_TABLE = 3 + } + /** Properties of a ConfigDetails. */ interface IConfigDetails { @@ -28353,6 +30583,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a TableDetails. */ + interface ITableDetails { + + /** TableDetails table */ + table?: (string|null); + + /** TableDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType|null); + } + + /** Represents a TableDetails. */ + class TableDetails implements ITableDetails { + + /** + * Constructs a new TableDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails); + + /** TableDetails table. */ + public table: string; + + /** TableDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.TableType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.TableType); + + /** + * Creates a new TableDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @param message TableDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @param message TableDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Decodes a TableDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Verifies a TableDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.TableDetails; + + /** + * Creates a plain object from a TableDetails message. Also converts values to other types if specified. + * @param message TableDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.TableDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PartitionDetails. */ interface IPartitionDetails { @@ -28473,6 +30806,9 @@ export namespace google { /** ActionDetails type */ type?: (string|null); + + /** ActionDetails issue */ + issue?: (string|null); } /** Represents an ActionDetails. */ @@ -28487,6 +30823,9 @@ export namespace google { /** ActionDetails type. */ public type: string; + /** ActionDetails issue. */ + public issue: string; + /** * Creates a new ActionDetails instance using the specified properties. * @param [properties] Properties to set @@ -29488,7 +31827,8 @@ export namespace google { enum ScanType { SCAN_TYPE_UNSPECIFIED = 0, DATA_PROFILE = 1, - DATA_QUALITY = 2 + DATA_QUALITY = 2, + DATA_DISCOVERY = 4 } /** State enum. */ @@ -35375,6 +37715,115 @@ export namespace google { GA = 4, DEPRECATED = 5 } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } } /** Namespace protobuf. */ @@ -37549,6 +39998,9 @@ export namespace google { /** FieldOptions .google.api.resourceReference */ ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); } /** Represents a FieldOptions. */ diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 6b7d35e7db9..20ea000baa6 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -12905,6 +12905,138 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|createMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CreateMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMetadataJob. + * @function createMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CreateMetadataJobCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.createMetadataJob = function createMetadataJob(request, callback) { + return this.rpcCall(createMetadataJob, $root.google.cloud.dataplex.v1.CreateMetadataJobRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMetadataJob" }); + + /** + * Calls CreateMetadataJob. + * @function createMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} request CreateMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|getMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef GetMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.MetadataJob} [response] MetadataJob + */ + + /** + * Calls GetMetadataJob. + * @function getMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.GetMetadataJobCallback} callback Node-style callback called with the error, if any, and MetadataJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.getMetadataJob = function getMetadataJob(request, callback) { + return this.rpcCall(getMetadataJob, $root.google.cloud.dataplex.v1.GetMetadataJobRequest, $root.google.cloud.dataplex.v1.MetadataJob, request, callback); + }, "name", { value: "GetMetadataJob" }); + + /** + * Calls GetMetadataJob. + * @function getMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} request GetMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|listMetadataJobs}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef ListMetadataJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} [response] ListMetadataJobsResponse + */ + + /** + * Calls ListMetadataJobs. + * @function listMetadataJobs + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.ListMetadataJobsCallback} callback Node-style callback called with the error, if any, and ListMetadataJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.listMetadataJobs = function listMetadataJobs(request, callback) { + return this.rpcCall(listMetadataJobs, $root.google.cloud.dataplex.v1.ListMetadataJobsRequest, $root.google.cloud.dataplex.v1.ListMetadataJobsResponse, request, callback); + }, "name", { value: "ListMetadataJobs" }); + + /** + * Calls ListMetadataJobs. + * @function listMetadataJobs + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} request ListMetadataJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.CatalogService|cancelMetadataJob}. + * @memberof google.cloud.dataplex.v1.CatalogService + * @typedef CancelMetadataJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelMetadataJob. + * @function cancelMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object + * @param {google.cloud.dataplex.v1.CatalogService.CancelMetadataJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CatalogService.prototype.cancelMetadataJob = function cancelMetadataJob(request, callback) { + return this.rpcCall(cancelMetadataJob, $root.google.cloud.dataplex.v1.CancelMetadataJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelMetadataJob" }); + + /** + * Calls CancelMetadataJob. + * @function cancelMetadataJob + * @memberof google.cloud.dataplex.v1.CatalogService + * @instance + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} request CancelMetadataJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return CatalogService; })(); @@ -16693,6 +16825,7 @@ * @interface IAspectSource * @property {google.protobuf.ITimestamp|null} [createTime] AspectSource createTime * @property {google.protobuf.ITimestamp|null} [updateTime] AspectSource updateTime + * @property {string|null} [dataVersion] AspectSource dataVersion */ /** @@ -16726,6 +16859,14 @@ */ AspectSource.prototype.updateTime = null; + /** + * AspectSource dataVersion. + * @member {string} dataVersion + * @memberof google.cloud.dataplex.v1.AspectSource + * @instance + */ + AspectSource.prototype.dataVersion = ""; + /** * Creates a new AspectSource instance using the specified properties. * @function create @@ -16754,6 +16895,8 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.dataVersion != null && Object.hasOwnProperty.call(message, "dataVersion")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataVersion); return writer; }; @@ -16796,6 +16939,10 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 12: { + message.dataVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16841,6 +16988,9 @@ if (error) return "updateTime." + error; } + if (message.dataVersion != null && message.hasOwnProperty("dataVersion")) + if (!$util.isString(message.dataVersion)) + return "dataVersion: string expected"; return null; }; @@ -16866,6 +17016,8 @@ throw TypeError(".google.cloud.dataplex.v1.AspectSource.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.dataVersion != null) + message.dataVersion = String(object.dataVersion); return message; }; @@ -16885,11 +17037,14 @@ if (options.defaults) { object.createTime = null; object.updateTime = null; + object.dataVersion = ""; } 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.dataVersion != null && message.hasOwnProperty("dataVersion")) + object.dataVersion = message.dataVersion; return object; }; @@ -25813,1305 +25968,1811 @@ return SearchEntriesResponse; })(); - /** - * EntryView enum. - * @name google.cloud.dataplex.v1.EntryView - * @enum {number} - * @property {number} ENTRY_VIEW_UNSPECIFIED=0 ENTRY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - * @property {number} CUSTOM=3 CUSTOM value - * @property {number} ALL=4 ALL value - */ - v1.EntryView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTRY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[3] = "CUSTOM"] = 3; - values[valuesById[4] = "ALL"] = 4; - return values; - })(); - - /** - * TransferStatus enum. - * @name google.cloud.dataplex.v1.TransferStatus - * @enum {number} - * @property {number} TRANSFER_STATUS_UNSPECIFIED=0 TRANSFER_STATUS_UNSPECIFIED value - * @property {number} TRANSFER_STATUS_MIGRATED=1 TRANSFER_STATUS_MIGRATED value - * @property {number} TRANSFER_STATUS_TRANSFERRED=2 TRANSFER_STATUS_TRANSFERRED value - */ - v1.TransferStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRANSFER_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "TRANSFER_STATUS_MIGRATED"] = 1; - values[valuesById[2] = "TRANSFER_STATUS_TRANSFERRED"] = 2; - return values; - })(); - - v1.DataplexService = (function() { + v1.ImportItem = (function() { /** - * Constructs a new DataplexService service. + * Properties of an ImportItem. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataplexService - * @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 + * @interface IImportItem + * @property {google.cloud.dataplex.v1.IEntry|null} [entry] ImportItem entry + * @property {google.protobuf.IFieldMask|null} [updateMask] ImportItem updateMask + * @property {Array.|null} [aspectKeys] ImportItem aspectKeys */ - function DataplexService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; /** - * Creates new DataplexService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dataplex.v1.DataplexService - * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new ImportItem. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an ImportItem. + * @implements IImportItem + * @constructor + * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set */ - DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function ImportItem(properties) { + this.aspectKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ImportItem entry. + * @member {google.cloud.dataplex.v1.IEntry|null|undefined} entry + * @memberof google.cloud.dataplex.v1.ImportItem + * @instance */ + ImportItem.prototype.entry = null; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ImportItem updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.ImportItem * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { - return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateLake" }); + ImportItem.prototype.updateMask = null; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService + * ImportItem aspectKeys. + * @member {Array.} aspectKeys + * @memberof google.cloud.dataplex.v1.ImportItem * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ImportItem.prototype.aspectKeys = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new ImportItem instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem instance */ + ImportItem.create = function create(properties) { + return new ImportItem(properties); + }; /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ImportItem message. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { - return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateLake" }); + ImportItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) + $root.google.cloud.dataplex.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(); + if (message.aspectKeys != null && message.aspectKeys.length) + for (var i = 0; i < message.aspectKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectKeys[i]); + return writer; + }; /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ImportItem message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ImportItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.IImportItem} message ImportItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ImportItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes an ImportItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ImportItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ImportItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entry = $root.google.cloud.dataplex.v1.Entry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.aspectKeys && message.aspectKeys.length)) + message.aspectKeys = []; + message.aspectKeys.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes an ImportItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { - return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteLake" }); + ImportItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an ImportItem message. + * @function verify + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ImportItem.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.dataplex.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; + } + if (message.aspectKeys != null && message.hasOwnProperty("aspectKeys")) { + if (!Array.isArray(message.aspectKeys)) + return "aspectKeys: array expected"; + for (var i = 0; i < message.aspectKeys.length; ++i) + if (!$util.isString(message.aspectKeys[i])) + return "aspectKeys: string[] expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + * Creates an ImportItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ImportItem} ImportItem */ + ImportItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ImportItem) + return object; + var message = new $root.google.cloud.dataplex.v1.ImportItem(); + if (object.entry != null) { + if (typeof object.entry !== "object") + throw TypeError(".google.cloud.dataplex.v1.ImportItem.entry: object expected"); + message.entry = $root.google.cloud.dataplex.v1.Entry.fromObject(object.entry); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.ImportItem.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.aspectKeys) { + if (!Array.isArray(object.aspectKeys)) + throw TypeError(".google.cloud.dataplex.v1.ImportItem.aspectKeys: array expected"); + message.aspectKeys = []; + for (var i = 0; i < object.aspectKeys.length; ++i) + message.aspectKeys[i] = String(object.aspectKeys[i]); + } + return message; + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from an ImportItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {google.cloud.dataplex.v1.ImportItem} message ImportItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { - return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); - }, "name", { value: "ListLakes" }); + ImportItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aspectKeys = []; + if (options.defaults) { + object.entry = null; + object.updateMask = null; + } + if (message.entry != null && message.hasOwnProperty("entry")) + object.entry = $root.google.cloud.dataplex.v1.Entry.toObject(message.entry, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.aspectKeys && message.aspectKeys.length) { + object.aspectKeys = []; + for (var j = 0; j < message.aspectKeys.length; ++j) + object.aspectKeys[j] = message.aspectKeys[j]; + } + return object; + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ImportItem to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ImportItem * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ImportItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Lake} [response] Lake + * Gets the default type url for ImportItem + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ImportItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ImportItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ImportItem"; + }; + + return ImportItem; + })(); + + v1.CreateMetadataJobRequest = (function() { /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake - * @returns {undefined} - * @variation 1 + * Properties of a CreateMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateMetadataJobRequest + * @property {string|null} [parent] CreateMetadataJobRequest parent + * @property {google.cloud.dataplex.v1.IMetadataJob|null} [metadataJob] CreateMetadataJobRequest metadataJob + * @property {string|null} [metadataJobId] CreateMetadataJobRequest metadataJobId + * @property {boolean|null} [validateOnly] CreateMetadataJobRequest validateOnly */ - Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { - return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); - }, "name", { value: "GetLake" }); /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new CreateMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateMetadataJobRequest. + * @implements ICreateMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set */ + function CreateMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakeActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * CreateMetadataJobRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance */ + CreateMetadataJobRequest.prototype.parent = ""; /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService + * CreateMetadataJobRequest metadataJob. + * @member {google.cloud.dataplex.v1.IMetadataJob|null|undefined} metadataJob + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { - return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListLakeActions" }); + CreateMetadataJobRequest.prototype.metadataJob = null; /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService + * CreateMetadataJobRequest metadataJobId. + * @member {string} metadataJobId + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateMetadataJobRequest.prototype.metadataJobId = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * CreateMetadataJobRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @instance */ + CreateMetadataJobRequest.prototype.validateOnly = false; /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a new CreateMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest instance */ - Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { - return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateZone" }); + CreateMetadataJobRequest.create = function create(properties) { + return new CreateMetadataJobRequest(properties); + }; /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateMetadataJobRequest.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.metadataJob != null && Object.hasOwnProperty.call(message, "metadataJob")) + $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadataJobId != null && Object.hasOwnProperty.call(message, "metadataJobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataJobId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified CreateMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateMetadataJobRequest} message CreateMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { - return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateZone" }); - - /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32()); + break; + } + case 3: { + message.metadataJobId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a CreateMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a CreateMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { - return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteZone" }); + CreateMetadataJobRequest.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.metadataJob != null && message.hasOwnProperty("metadataJob")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJob); + if (error) + return "metadataJob." + error; + } + if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) + if (!$util.isString(message.metadataJobId)) + return "metadataJobId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CreateMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateMetadataJobRequest} CreateMetadataJobRequest */ + CreateMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateMetadataJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.metadataJob != null) { + if (typeof object.metadataJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateMetadataJobRequest.metadataJob: object expected"); + message.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJob); + } + if (object.metadataJobId != null) + message.metadataJobId = String(object.metadataJobId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZonesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + * Creates a plain object from a CreateMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.CreateMetadataJobRequest} message CreateMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CreateMetadataJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.metadataJob = null; + object.metadataJobId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.metadataJob != null && message.hasOwnProperty("metadataJob")) + object.metadataJob = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJob, options); + if (message.metadataJobId != null && message.hasOwnProperty("metadataJobId")) + object.metadataJobId = message.metadataJobId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this CreateMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { - return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); - }, "name", { value: "ListZones" }); + CreateMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for CreateMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CreateMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateMetadataJobRequest"; + }; + + return CreateMetadataJobRequest; + })(); + + v1.GetMetadataJobRequest = (function() { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Zone} [response] Zone + * Properties of a GetMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetMetadataJobRequest + * @property {string|null} [name] GetMetadataJobRequest name */ /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone - * @returns {undefined} - * @variation 1 + * Constructs a new GetMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetMetadataJobRequest. + * @implements IGetMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set */ - Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { - return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); - }, "name", { value: "GetZone" }); + function GetMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService + * GetMetadataJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetMetadataJobRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZoneActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * Creates a new GetMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest instance */ + GetMetadataJobRequest.create = function create(properties) { + return new GetMetadataJobRequest(properties); + }; /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified GetMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { - return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListZoneActions" }); + GetMetadataJobRequest.encode = function encode(message, writer) { + 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; + }; /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified GetMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetMetadataJobRequest} message GetMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a GetMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); + 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; + }; /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a GetMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { - return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAsset" }); + GetMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a GetMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + GetMetadataJobRequest.verify = function verify(message) { + if (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; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a GetMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetMetadataJobRequest} GetMetadataJobRequest */ + GetMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetMetadataJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a GetMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetMetadataJobRequest} message GetMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { - return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAsset" }); + GetMetadataJobRequest.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; + }; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this GetMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + GetMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for GetMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetMetadataJobRequest"; + }; - /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { - return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAsset" }); + return GetMetadataJobRequest; + })(); + + v1.ListMetadataJobsRequest = (function() { /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ListMetadataJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListMetadataJobsRequest + * @property {string|null} [parent] ListMetadataJobsRequest parent + * @property {number|null} [pageSize] ListMetadataJobsRequest pageSize + * @property {string|null} [pageToken] ListMetadataJobsRequest pageToken + * @property {string|null} [filter] ListMetadataJobsRequest filter + * @property {string|null} [orderBy] ListMetadataJobsRequest orderBy */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + * Constructs a new ListMetadataJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListMetadataJobsRequest. + * @implements IListMetadataJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set */ + function ListMetadataJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); + ListMetadataJobsRequest.prototype.parent = ""; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListMetadataJobsRequest.prototype.pageSize = 0; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Asset} [response] Asset + * ListMetadataJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @instance */ + ListMetadataJobsRequest.prototype.pageToken = ""; /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { - return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); - }, "name", { value: "GetAsset" }); + ListMetadataJobsRequest.prototype.filter = ""; /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListMetadataJobsRequest.prototype.orderBy = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * Creates a new ListMetadataJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest instance */ + ListMetadataJobsRequest.create = function create(properties) { + return new ListMetadataJobsRequest(properties); + }; /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListMetadataJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { - return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListAssetActions" }); + ListMetadataJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListMetadataJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsRequest} message ListMetadataJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListMetadataJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListMetadataJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); + 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; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a ListMetadataJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { - return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTask" }); + ListMetadataJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListMetadataJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListMetadataJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a ListMetadataJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListMetadataJobsRequest} ListMetadataJobsRequest */ + ListMetadataJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListMetadataJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListMetadataJobsRequest} message ListMetadataJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { - return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTask" }); + ListMetadataJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListMetadataJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListMetadataJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for ListMetadataJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListMetadataJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListMetadataJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsRequest"; + }; + + return ListMetadataJobsRequest; + })(); + + v1.ListMetadataJobsResponse = (function() { /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Properties of a ListMetadataJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListMetadataJobsResponse + * @property {Array.|null} [metadataJobs] ListMetadataJobsResponse metadataJobs + * @property {string|null} [nextPageToken] ListMetadataJobsResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListMetadataJobsResponse unreachableLocations */ - Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { - return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTask" }); /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListMetadataJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListMetadataJobsResponse. + * @implements IListMetadataJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set */ + function ListMetadataJobsResponse(properties) { + this.metadataJobs = []; + this.unreachableLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListTasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + * ListMetadataJobsResponse metadataJobs. + * @member {Array.} metadataJobs + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @instance */ + ListMetadataJobsResponse.prototype.metadataJobs = $util.emptyArray; /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { - return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); - }, "name", { value: "ListTasks" }); + ListMetadataJobsResponse.prototype.nextPageToken = ""; /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService + * ListMetadataJobsResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListMetadataJobsResponse.prototype.unreachableLocations = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Task} [response] Task + * Creates a new ListMetadataJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse instance */ + ListMetadataJobsResponse.create = function create(properties) { + return new ListMetadataJobsResponse(properties); + }; /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task - * @returns {undefined} - * @variation 1 + * Encodes the specified ListMetadataJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { - return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); - }, "name", { value: "GetTask" }); + ListMetadataJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataJobs != null && message.metadataJobs.length) + for (var i = 0; i < message.metadataJobs.length; ++i) + $root.google.cloud.dataplex.v1.MetadataJob.encode(message.metadataJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListMetadataJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListMetadataJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListMetadataJobsResponse} message ListMetadataJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListMetadataJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListMetadataJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataJobs && message.metadataJobs.length)) + message.metadataJobs = []; + message.metadataJobs.push($root.google.cloud.dataplex.v1.MetadataJob.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 + * Decodes a ListMetadataJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); + ListMetadataJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListMetadataJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListMetadataJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataJobs != null && message.hasOwnProperty("metadataJobs")) { + if (!Array.isArray(message.metadataJobs)) + return "metadataJobs: array expected"; + for (var i = 0; i < message.metadataJobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.verify(message.metadataJobs[i]); + if (error) + return "metadataJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef RunTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.RunTaskResponse} [response] RunTaskResponse + * Creates a ListMetadataJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListMetadataJobsResponse} ListMetadataJobsResponse */ + ListMetadataJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListMetadataJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListMetadataJobsResponse(); + if (object.metadataJobs) { + if (!Array.isArray(object.metadataJobs)) + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: array expected"); + message.metadataJobs = []; + for (var i = 0; i < object.metadataJobs.length; ++i) { + if (typeof object.metadataJobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.metadataJobs: object expected"); + message.metadataJobs[i] = $root.google.cloud.dataplex.v1.MetadataJob.fromObject(object.metadataJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListMetadataJobsResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; /** - * Calls RunTask. - * @function runTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.RunTaskCallback} callback Node-style callback called with the error, if any, and RunTaskResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListMetadataJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListMetadataJobsResponse} message ListMetadataJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.runTask = function runTask(request, callback) { - return this.rpcCall(runTask, $root.google.cloud.dataplex.v1.RunTaskRequest, $root.google.cloud.dataplex.v1.RunTaskResponse, request, callback); - }, "name", { value: "RunTask" }); + ListMetadataJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metadataJobs = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.metadataJobs && message.metadataJobs.length) { + object.metadataJobs = []; + for (var j = 0; j < message.metadataJobs.length; ++j) + object.metadataJobs[j] = $root.google.cloud.dataplex.v1.MetadataJob.toObject(message.metadataJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; /** - * Calls RunTask. - * @function runTask - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListMetadataJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse * @instance - * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListMetadataJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Job} [response] Job + * Gets the default type url for ListMetadataJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListMetadataJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListMetadataJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListMetadataJobsResponse"; + }; + + return ListMetadataJobsResponse; + })(); + + v1.CancelMetadataJobRequest = (function() { /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 + * Properties of a CancelMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelMetadataJobRequest + * @property {string|null} [name] CancelMetadataJobRequest name */ - Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); - }, "name", { value: "GetJob" }); /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new CancelMetadataJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelMetadataJobRequest. + * @implements ICancelMetadataJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set */ + function CancelMetadataJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CancelJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * CancelMetadataJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @instance */ + CancelMetadataJobRequest.prototype.name = ""; /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a new CancelMetadataJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest instance */ - Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { - return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelJob" }); + CancelMetadataJobRequest.create = function create(properties) { + return new CancelMetadataJobRequest(properties); + }; /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CancelMetadataJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CancelMetadataJobRequest.encode = function encode(message, writer) { + 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; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified CancelMetadataJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelMetadataJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelMetadataJobRequest} message CancelMetadataJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CancelMetadataJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CancelMetadataJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); + 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; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a CancelMetadataJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CancelMetadataJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a CancelMetadataJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); + CancelMetadataJobRequest.verify = function verify(message) { + if (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; + }; /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CancelMetadataJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelMetadataJobRequest} CancelMetadataJobRequest */ + CancelMetadataJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelMetadataJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelMetadataJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a CancelMetadataJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelMetadataJobRequest} message CancelMetadataJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CancelMetadataJobRequest.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; + }; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this CancelMetadataJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEnvironment" }); + CancelMetadataJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for CancelMetadataJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CancelMetadataJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CancelMetadataJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelMetadataJobRequest"; + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ + return CancelMetadataJobRequest; + })(); - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); + v1.MetadataJob = (function() { /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a MetadataJob. + * @memberof google.cloud.dataplex.v1 + * @interface IMetadataJob + * @property {string|null} [name] MetadataJob name + * @property {string|null} [uid] MetadataJob uid + * @property {google.protobuf.ITimestamp|null} [createTime] MetadataJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MetadataJob updateTime + * @property {Object.|null} [labels] MetadataJob labels + * @property {google.cloud.dataplex.v1.MetadataJob.Type|null} [type] MetadataJob type + * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null} [importSpec] MetadataJob importSpec + * @property {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null} [importResult] MetadataJob importResult + * @property {google.cloud.dataplex.v1.MetadataJob.IStatus|null} [status] MetadataJob status */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Environment} [response] Environment + * Constructs a new MetadataJob. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataJob. + * @implements IMetadataJob + * @constructor + * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set */ + function MetadataJob(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]]; + } /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService + * MetadataJob name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); + MetadataJob.prototype.name = ""; /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService + * MetadataJob uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + MetadataJob.prototype.uid = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListSessionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse + * MetadataJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance */ + MetadataJob.prototype.createTime = null; /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService + * MetadataJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { - return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); - }, "name", { value: "ListSessions" }); + MetadataJob.prototype.updateTime = null; /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService + * MetadataJob labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ - - return DataplexService; - })(); - - v1.CreateLakeRequest = (function() { + MetadataJob.prototype.labels = $util.emptyObject; /** - * Properties of a CreateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateLakeRequest - * @property {string|null} [parent] CreateLakeRequest parent - * @property {string|null} [lakeId] CreateLakeRequest lakeId - * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake - * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + * MetadataJob type. + * @member {google.cloud.dataplex.v1.MetadataJob.Type} type + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance */ + MetadataJob.prototype.type = 0; /** - * Constructs a new CreateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateLakeRequest. - * @implements ICreateLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * MetadataJob importSpec. + * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec|null|undefined} importSpec + * @memberof google.cloud.dataplex.v1.MetadataJob + * @instance */ - function CreateLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MetadataJob.prototype.importSpec = null; /** - * CreateLakeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * MetadataJob importResult. + * @member {google.cloud.dataplex.v1.MetadataJob.IImportJobResult|null|undefined} importResult + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance */ - CreateLakeRequest.prototype.parent = ""; + MetadataJob.prototype.importResult = null; /** - * CreateLakeRequest lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * MetadataJob status. + * @member {google.cloud.dataplex.v1.MetadataJob.IStatus|null|undefined} status + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance */ - CreateLakeRequest.prototype.lakeId = ""; + MetadataJob.prototype.status = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * MetadataJob spec. + * @member {"importSpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance */ - CreateLakeRequest.prototype.lake = null; + Object.defineProperty(MetadataJob.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["importSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * CreateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * MetadataJob result. + * @member {"importResult"|undefined} result + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance */ - CreateLakeRequest.prototype.validateOnly = false; + Object.defineProperty(MetadataJob.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["importResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateLakeRequest instance using the specified properties. + * Creates a new MetadataJob instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + * @param {google.cloud.dataplex.v1.IMetadataJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob instance */ - CreateLakeRequest.create = function create(properties) { - return new CreateLakeRequest(properties); + MetadataJob.create = function create(properties) { + return new MetadataJob(properties); }; /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified MetadataJob message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encode = function encode(message, writer) { + MetadataJob.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.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.cloud.dataplex.v1.MetadataJob.Status.encode(message.status, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.importSpec != null && Object.hasOwnProperty.call(message, "importSpec")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.encode(message.importSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.importResult != null && Object.hasOwnProperty.call(message, "importResult")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.encode(message.importResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified MetadataJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IMetadataJob} message MetadataJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + MetadataJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. + * Decodes a MetadataJob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decode = function decode(reader, length) { + MetadataJob.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.lakeId = reader.string(); + message.uid = reader.string(); break; } case 3: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.validateOnly = reader.bool(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 100: { + message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.decode(reader, reader.uint32()); + break; + } + case 7: { + message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.decode(reader, reader.uint32()); break; } default: @@ -27123,2645 +27784,2912 @@ }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a MetadataJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + MetadataJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateLakeRequest message. + * Verifies a MetadataJob message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateLakeRequest.verify = function verify(message) { + MetadataJob.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.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "lake." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.importSpec != null && message.hasOwnProperty("importSpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify(message.importSpec); + if (error) + return "importSpec." + error; + } + } + if (message.importResult != null && message.hasOwnProperty("importResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify(message.importResult); + if (error) + return "importResult." + error; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.Status.verify(message.status); + if (error) + return "status." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; return null; }; /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MetadataJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.MetadataJob} MetadataJob */ - CreateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + MetadataJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob) return object; - var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + var message = new $root.google.cloud.dataplex.v1.MetadataJob(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.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.dataplex.v1.MetadataJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "IMPORT": + case 1: + message.type = 1; + break; + } + if (object.importSpec != null) { + if (typeof object.importSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importSpec: object expected"); + message.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.fromObject(object.importSpec); + } + if (object.importResult != null) { + if (typeof object.importResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.importResult: object expected"); + message.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.fromObject(object.importResult); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.status: object expected"); + message.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.fromObject(object.status); } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a MetadataJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static - * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {google.cloud.dataplex.v1.MetadataJob} message MetadataJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLakeRequest.toObject = function toObject(message, options) { + MetadataJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.parent = ""; - object.lakeId = ""; - object.lake = null; - object.validateOnly = false; + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.status = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; - }; - - return CreateLakeRequest; - })(); - - v1.UpdateLakeRequest = (function() { - - /** - * Properties of an UpdateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateLakeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask - * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake - * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly - */ - - /** - * Constructs a new UpdateLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateLakeRequest. - * @implements IUpdateLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - */ - function UpdateLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateLakeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.updateMask = null; - - /** - * UpdateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.lake = null; - - /** - * UpdateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @instance - */ - UpdateLakeRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance - */ - UpdateLakeRequest.create = function create(properties) { - return new UpdateLakeRequest(properties); - }; - - /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLakeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateLakeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); - if (error) - return "lake." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest - */ - UpdateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.MetadataJob.Type[message.type] : message.type; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.cloud.dataplex.v1.MetadataJob.Status.toObject(message.status, options); + if (message.importSpec != null && message.hasOwnProperty("importSpec")) { + object.importSpec = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.toObject(message.importSpec, options); + if (options.oneofs) + object.spec = "importSpec"; } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateLakeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.lake = null; - object.validateOnly = false; + if (message.importResult != null && message.hasOwnProperty("importResult")) { + object.importResult = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult.toObject(message.importResult, options); + if (options.oneofs) + object.result = "importResult"; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this UpdateLakeRequest to JSON. + * Converts this MetadataJob to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @instance * @returns {Object.} JSON object */ - UpdateLakeRequest.prototype.toJSON = function toJSON() { + MetadataJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateLakeRequest + * Gets the default type url for MetadataJob * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.MetadataJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MetadataJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob"; }; - return UpdateLakeRequest; - })(); + MetadataJob.ImportJobResult = (function() { - v1.DeleteLakeRequest = (function() { + /** + * Properties of an ImportJobResult. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IImportJobResult + * @property {number|Long|null} [deletedEntries] ImportJobResult deletedEntries + * @property {number|Long|null} [updatedEntries] ImportJobResult updatedEntries + * @property {number|Long|null} [createdEntries] ImportJobResult createdEntries + * @property {number|Long|null} [unchangedEntries] ImportJobResult unchangedEntries + * @property {number|Long|null} [recreatedEntries] ImportJobResult recreatedEntries + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportJobResult updateTime + */ - /** - * Properties of a DeleteLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteLakeRequest - * @property {string|null} [name] DeleteLakeRequest name - */ + /** + * Constructs a new ImportJobResult. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents an ImportJobResult. + * @implements IImportJobResult + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set + */ + function ImportJobResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DeleteLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteLakeRequest. - * @implements IDeleteLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - */ - function DeleteLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ImportJobResult deletedEntries. + * @member {number|Long} deletedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.deletedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * DeleteLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @instance - */ - DeleteLakeRequest.prototype.name = ""; + /** + * ImportJobResult updatedEntries. + * @member {number|Long} updatedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.updatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new DeleteLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance - */ - DeleteLakeRequest.create = function create(properties) { - return new DeleteLakeRequest(properties); - }; + /** + * ImportJobResult createdEntries. + * @member {number|Long} createdEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.createdEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLakeRequest.encode = function encode(message, writer) { - 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; - }; + /** + * ImportJobResult unchangedEntries. + * @member {number|Long} unchangedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.unchangedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ImportJobResult recreatedEntries. + * @member {number|Long} recreatedEntries + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.recreatedEntries = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * ImportJobResult updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + */ + ImportJobResult.prototype.updateTime = null; + + /** + * Creates a new ImportJobResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult instance + */ + ImportJobResult.create = function create(properties) { + return new ImportJobResult(properties); + }; + + /** + * Encodes the specified ImportJobResult message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deletedEntries != null && Object.hasOwnProperty.call(message, "deletedEntries")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.deletedEntries); + if (message.updatedEntries != null && Object.hasOwnProperty.call(message, "updatedEntries")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.updatedEntries); + if (message.createdEntries != null && Object.hasOwnProperty.call(message, "createdEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.createdEntries); + if (message.unchangedEntries != null && Object.hasOwnProperty.call(message, "unchangedEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unchangedEntries); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.recreatedEntries != null && Object.hasOwnProperty.call(message, "recreatedEntries")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.recreatedEntries); + return writer; + }; + + /** + * Encodes the specified ImportJobResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobResult} message ImportJobResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportJobResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deletedEntries = reader.int64(); + break; + } + case 2: { + message.updatedEntries = reader.int64(); + break; + } + case 3: { + message.createdEntries = reader.int64(); + break; + } + case 4: { + message.unchangedEntries = reader.int64(); + break; + } + case 6: { + message.recreatedEntries = reader.int64(); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ImportJobResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DeleteLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteLakeRequest.verify = function verify(message) { - if (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; - }; + /** + * Verifies an ImportJobResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) + if (!$util.isInteger(message.deletedEntries) && !(message.deletedEntries && $util.isInteger(message.deletedEntries.low) && $util.isInteger(message.deletedEntries.high))) + return "deletedEntries: integer|Long expected"; + if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) + if (!$util.isInteger(message.updatedEntries) && !(message.updatedEntries && $util.isInteger(message.updatedEntries.low) && $util.isInteger(message.updatedEntries.high))) + return "updatedEntries: integer|Long expected"; + if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) + if (!$util.isInteger(message.createdEntries) && !(message.createdEntries && $util.isInteger(message.createdEntries.low) && $util.isInteger(message.createdEntries.high))) + return "createdEntries: integer|Long expected"; + if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) + if (!$util.isInteger(message.unchangedEntries) && !(message.unchangedEntries && $util.isInteger(message.unchangedEntries.low) && $util.isInteger(message.unchangedEntries.high))) + return "unchangedEntries: integer|Long expected"; + if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) + if (!$util.isInteger(message.recreatedEntries) && !(message.recreatedEntries && $util.isInteger(message.recreatedEntries.low) && $util.isInteger(message.recreatedEntries.high))) + return "recreatedEntries: integer|Long expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; - /** - * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest - */ - DeleteLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + /** + * Creates an ImportJobResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} ImportJobResult + */ + ImportJobResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobResult(); + if (object.deletedEntries != null) + if ($util.Long) + (message.deletedEntries = $util.Long.fromValue(object.deletedEntries)).unsigned = false; + else if (typeof object.deletedEntries === "string") + message.deletedEntries = parseInt(object.deletedEntries, 10); + else if (typeof object.deletedEntries === "number") + message.deletedEntries = object.deletedEntries; + else if (typeof object.deletedEntries === "object") + message.deletedEntries = new $util.LongBits(object.deletedEntries.low >>> 0, object.deletedEntries.high >>> 0).toNumber(); + if (object.updatedEntries != null) + if ($util.Long) + (message.updatedEntries = $util.Long.fromValue(object.updatedEntries)).unsigned = false; + else if (typeof object.updatedEntries === "string") + message.updatedEntries = parseInt(object.updatedEntries, 10); + else if (typeof object.updatedEntries === "number") + message.updatedEntries = object.updatedEntries; + else if (typeof object.updatedEntries === "object") + message.updatedEntries = new $util.LongBits(object.updatedEntries.low >>> 0, object.updatedEntries.high >>> 0).toNumber(); + if (object.createdEntries != null) + if ($util.Long) + (message.createdEntries = $util.Long.fromValue(object.createdEntries)).unsigned = false; + else if (typeof object.createdEntries === "string") + message.createdEntries = parseInt(object.createdEntries, 10); + else if (typeof object.createdEntries === "number") + message.createdEntries = object.createdEntries; + else if (typeof object.createdEntries === "object") + message.createdEntries = new $util.LongBits(object.createdEntries.low >>> 0, object.createdEntries.high >>> 0).toNumber(); + if (object.unchangedEntries != null) + if ($util.Long) + (message.unchangedEntries = $util.Long.fromValue(object.unchangedEntries)).unsigned = false; + else if (typeof object.unchangedEntries === "string") + message.unchangedEntries = parseInt(object.unchangedEntries, 10); + else if (typeof object.unchangedEntries === "number") + message.unchangedEntries = object.unchangedEntries; + else if (typeof object.unchangedEntries === "object") + message.unchangedEntries = new $util.LongBits(object.unchangedEntries.low >>> 0, object.unchangedEntries.high >>> 0).toNumber(); + if (object.recreatedEntries != null) + if ($util.Long) + (message.recreatedEntries = $util.Long.fromValue(object.recreatedEntries)).unsigned = false; + else if (typeof object.recreatedEntries === "string") + message.recreatedEntries = parseInt(object.recreatedEntries, 10); + else if (typeof object.recreatedEntries === "number") + message.recreatedEntries = object.recreatedEntries; + else if (typeof object.recreatedEntries === "object") + message.recreatedEntries = new $util.LongBits(object.recreatedEntries.low >>> 0, object.recreatedEntries.high >>> 0).toNumber(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobResult.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an ImportJobResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobResult} message ImportJobResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobResult.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.deletedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.deletedEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.updatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.updatedEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.createdEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.createdEntries = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unchangedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unchangedEntries = options.longs === String ? "0" : 0; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.recreatedEntries = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recreatedEntries = options.longs === String ? "0" : 0; + } + if (message.deletedEntries != null && message.hasOwnProperty("deletedEntries")) + if (typeof message.deletedEntries === "number") + object.deletedEntries = options.longs === String ? String(message.deletedEntries) : message.deletedEntries; + else + object.deletedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.deletedEntries) : options.longs === Number ? new $util.LongBits(message.deletedEntries.low >>> 0, message.deletedEntries.high >>> 0).toNumber() : message.deletedEntries; + if (message.updatedEntries != null && message.hasOwnProperty("updatedEntries")) + if (typeof message.updatedEntries === "number") + object.updatedEntries = options.longs === String ? String(message.updatedEntries) : message.updatedEntries; + else + object.updatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.updatedEntries) : options.longs === Number ? new $util.LongBits(message.updatedEntries.low >>> 0, message.updatedEntries.high >>> 0).toNumber() : message.updatedEntries; + if (message.createdEntries != null && message.hasOwnProperty("createdEntries")) + if (typeof message.createdEntries === "number") + object.createdEntries = options.longs === String ? String(message.createdEntries) : message.createdEntries; + else + object.createdEntries = options.longs === String ? $util.Long.prototype.toString.call(message.createdEntries) : options.longs === Number ? new $util.LongBits(message.createdEntries.low >>> 0, message.createdEntries.high >>> 0).toNumber() : message.createdEntries; + if (message.unchangedEntries != null && message.hasOwnProperty("unchangedEntries")) + if (typeof message.unchangedEntries === "number") + object.unchangedEntries = options.longs === String ? String(message.unchangedEntries) : message.unchangedEntries; + else + object.unchangedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.unchangedEntries) : options.longs === Number ? new $util.LongBits(message.unchangedEntries.low >>> 0, message.unchangedEntries.high >>> 0).toNumber() : message.unchangedEntries; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.recreatedEntries != null && message.hasOwnProperty("recreatedEntries")) + if (typeof message.recreatedEntries === "number") + object.recreatedEntries = options.longs === String ? String(message.recreatedEntries) : message.recreatedEntries; + else + object.recreatedEntries = options.longs === String ? $util.Long.prototype.toString.call(message.recreatedEntries) : options.longs === Number ? new $util.LongBits(message.recreatedEntries.low >>> 0, message.recreatedEntries.high >>> 0).toNumber() : message.recreatedEntries; return object; - var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + }; - /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteLakeRequest.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 ImportJobResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @instance + * @returns {Object.} JSON object + */ + ImportJobResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DeleteLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ImportJobResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"; + }; - /** - * Gets the default type url for DeleteLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; - }; + return ImportJobResult; + })(); - return DeleteLakeRequest; - })(); + MetadataJob.ImportJobSpec = (function() { - v1.ListLakesRequest = (function() { + /** + * Properties of an ImportJobSpec. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IImportJobSpec + * @property {string|null} [sourceStorageUri] ImportJobSpec sourceStorageUri + * @property {google.protobuf.ITimestamp|null} [sourceCreateTime] ImportJobSpec sourceCreateTime + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null} [scope] ImportJobSpec scope + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [entrySyncMode] ImportJobSpec entrySyncMode + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode|null} [aspectSyncMode] ImportJobSpec aspectSyncMode + * @property {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel|null} [logLevel] ImportJobSpec logLevel + */ - /** - * Properties of a ListLakesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakesRequest - * @property {string|null} [parent] ListLakesRequest parent - * @property {number|null} [pageSize] ListLakesRequest pageSize - * @property {string|null} [pageToken] ListLakesRequest pageToken - * @property {string|null} [filter] ListLakesRequest filter - * @property {string|null} [orderBy] ListLakesRequest orderBy - */ + /** + * Constructs a new ImportJobSpec. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents an ImportJobSpec. + * @implements IImportJobSpec + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set + */ + function ImportJobSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListLakesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesRequest. - * @implements IListLakesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - */ - function ListLakesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ImportJobSpec sourceStorageUri. + * @member {string} sourceStorageUri + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.sourceStorageUri = ""; - /** - * ListLakesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.parent = ""; + /** + * ImportJobSpec sourceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} sourceCreateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.sourceCreateTime = null; - /** - * ListLakesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.pageSize = 0; + /** + * ImportJobSpec scope. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope|null|undefined} scope + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.scope = null; - /** - * ListLakesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.pageToken = ""; + /** + * ImportJobSpec entrySyncMode. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} entrySyncMode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.entrySyncMode = 0; - /** - * ListLakesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.filter = ""; + /** + * ImportJobSpec aspectSyncMode. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode} aspectSyncMode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.aspectSyncMode = 0; - /** - * ListLakesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - */ - ListLakesRequest.prototype.orderBy = ""; + /** + * ImportJobSpec logLevel. + * @member {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel} logLevel + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + */ + ImportJobSpec.prototype.logLevel = 0; - /** - * Creates a new ListLakesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance - */ - ListLakesRequest.create = function create(properties) { - return new ListLakesRequest(properties); - }; + /** + * Creates a new ImportJobSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec instance + */ + ImportJobSpec.create = function create(properties) { + return new ImportJobSpec(properties); + }; - /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; + /** + * Encodes the specified ImportJobSpec message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceStorageUri != null && Object.hasOwnProperty.call(message, "sourceStorageUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceStorageUri); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.encode(message.scope, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entrySyncMode != null && Object.hasOwnProperty.call(message, "entrySyncMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entrySyncMode); + if (message.aspectSyncMode != null && Object.hasOwnProperty.call(message, "aspectSyncMode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aspectSyncMode); + if (message.sourceCreateTime != null && Object.hasOwnProperty.call(message, "sourceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.sourceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.logLevel != null && Object.hasOwnProperty.call(message, "logLevel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.logLevel); + return writer; + }; - /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ImportJobSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IImportJobSpec} message ImportJobSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListLakesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + /** + * Decodes an ImportJobSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceStorageUri = reader.string(); + break; + } + case 5: { + message.sourceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.decode(reader, reader.uint32()); + break; + } + case 3: { + message.entrySyncMode = reader.int32(); + break; + } + case 4: { + message.aspectSyncMode = reader.int32(); + break; + } + case 6: { + message.logLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.pageSize = reader.int32(); + } + return message; + }; + + /** + * Decodes an ImportJobSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJobSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) + if (!$util.isString(message.sourceStorageUri)) + return "sourceStorageUri: string expected"; + if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.sourceCreateTime); + if (error) + return "sourceCreateTime." + error; + } + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) + switch (message.entrySyncMode) { + default: + return "entrySyncMode: enum value expected"; + case 0: + case 1: + case 2: break; } - case 3: { - message.pageToken = reader.string(); + if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) + switch (message.aspectSyncMode) { + default: + return "aspectSyncMode: enum value expected"; + case 0: + case 1: + case 2: break; } - case 4: { - message.filter = reader.string(); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + switch (message.logLevel) { + default: + return "logLevel: enum value expected"; + case 0: + case 1: + case 2: break; } - case 5: { - message.orderBy = reader.string(); + return null; + }; + + /** + * Creates an ImportJobSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} ImportJobSpec + */ + ImportJobSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec(); + if (object.sourceStorageUri != null) + message.sourceStorageUri = String(object.sourceStorageUri); + if (object.sourceCreateTime != null) { + if (typeof object.sourceCreateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.sourceCreateTime: object expected"); + message.sourceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.sourceCreateTime); + } + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.scope: object expected"); + message.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.fromObject(object.scope); + } + switch (object.entrySyncMode) { + default: + if (typeof object.entrySyncMode === "number") { + message.entrySyncMode = object.entrySyncMode; break; } + break; + case "SYNC_MODE_UNSPECIFIED": + case 0: + message.entrySyncMode = 0; + break; + case "FULL": + case 1: + message.entrySyncMode = 1; + break; + case "INCREMENTAL": + case 2: + message.entrySyncMode = 2; + break; + } + switch (object.aspectSyncMode) { default: - reader.skipType(tag & 7); + if (typeof object.aspectSyncMode === "number") { + message.aspectSyncMode = object.aspectSyncMode; + break; + } + break; + case "SYNC_MODE_UNSPECIFIED": + case 0: + message.aspectSyncMode = 0; + break; + case "FULL": + case 1: + message.aspectSyncMode = 1; + break; + case "INCREMENTAL": + case 2: + message.aspectSyncMode = 2; break; } - } - return message; - }; - - /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListLakesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; + switch (object.logLevel) { + default: + if (typeof object.logLevel === "number") { + message.logLevel = object.logLevel; + break; + } + break; + case "LOG_LEVEL_UNSPECIFIED": + case 0: + message.logLevel = 0; + break; + case "DEBUG": + case 1: + message.logLevel = 1; + break; + case "INFO": + case 2: + message.logLevel = 2; + break; + } + return message; + }; - /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest - */ - ListLakesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + /** + * Creates a plain object from an ImportJobSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec} message ImportJobSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceStorageUri = ""; + object.scope = null; + object.entrySyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; + object.aspectSyncMode = options.enums === String ? "SYNC_MODE_UNSPECIFIED" : 0; + object.sourceCreateTime = null; + object.logLevel = options.enums === String ? "LOG_LEVEL_UNSPECIFIED" : 0; + } + if (message.sourceStorageUri != null && message.hasOwnProperty("sourceStorageUri")) + object.sourceStorageUri = message.sourceStorageUri; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.toObject(message.scope, options); + if (message.entrySyncMode != null && message.hasOwnProperty("entrySyncMode")) + object.entrySyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] === undefined ? message.entrySyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.entrySyncMode] : message.entrySyncMode; + if (message.aspectSyncMode != null && message.hasOwnProperty("aspectSyncMode")) + object.aspectSyncMode = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] === undefined ? message.aspectSyncMode : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode[message.aspectSyncMode] : message.aspectSyncMode; + if (message.sourceCreateTime != null && message.hasOwnProperty("sourceCreateTime")) + object.sourceCreateTime = $root.google.protobuf.Timestamp.toObject(message.sourceCreateTime, options); + if (message.logLevel != null && message.hasOwnProperty("logLevel")) + object.logLevel = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] === undefined ? message.logLevel : $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel[message.logLevel] : message.logLevel; return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; + }; - /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; + /** + * Converts this ImportJobSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @instance + * @returns {Object.} JSON object + */ + ImportJobSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListLakesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @instance - * @returns {Object.} JSON object - */ - ListLakesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ImportJobSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"; + }; - /** - * Gets the default type url for ListLakesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; - }; + /** + * SyncMode enum. + * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode + * @enum {number} + * @property {number} SYNC_MODE_UNSPECIFIED=0 SYNC_MODE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} INCREMENTAL=2 INCREMENTAL value + */ + ImportJobSpec.SyncMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYNC_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "INCREMENTAL"] = 2; + return values; + })(); - return ListLakesRequest; - })(); + /** + * LogLevel enum. + * @name google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel + * @enum {number} + * @property {number} LOG_LEVEL_UNSPECIFIED=0 LOG_LEVEL_UNSPECIFIED value + * @property {number} DEBUG=1 DEBUG value + * @property {number} INFO=2 INFO value + */ + ImportJobSpec.LogLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEBUG"] = 1; + values[valuesById[2] = "INFO"] = 2; + return values; + })(); - v1.ListLakesResponse = (function() { + ImportJobSpec.ImportJobScope = (function() { - /** - * Properties of a ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakesResponse - * @property {Array.|null} [lakes] ListLakesResponse lakes - * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations - */ + /** + * Properties of an ImportJobScope. + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @interface IImportJobScope + * @property {Array.|null} [entryGroups] ImportJobScope entryGroups + * @property {Array.|null} [entryTypes] ImportJobScope entryTypes + * @property {Array.|null} [aspectTypes] ImportJobScope aspectTypes + */ - /** - * Constructs a new ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesResponse. - * @implements IListLakesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - */ - function ListLakesResponse(properties) { - this.lakes = []; - this.unreachableLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ImportJobScope. + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec + * @classdesc Represents an ImportJobScope. + * @implements IImportJobScope + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set + */ + function ImportJobScope(properties) { + this.entryGroups = []; + this.entryTypes = []; + this.aspectTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListLakesResponse lakes. - * @member {Array.} lakes - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.lakes = $util.emptyArray; + /** + * ImportJobScope entryGroups. + * @member {Array.} entryGroups + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.entryGroups = $util.emptyArray; - /** - * ListLakesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.nextPageToken = ""; + /** + * ImportJobScope entryTypes. + * @member {Array.} entryTypes + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.entryTypes = $util.emptyArray; - /** - * ListLakesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + /** + * ImportJobScope aspectTypes. + * @member {Array.} aspectTypes + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + */ + ImportJobScope.prototype.aspectTypes = $util.emptyArray; - /** - * Creates a new ListLakesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance - */ - ListLakesResponse.create = function create(properties) { - return new ListLakesResponse(properties); - }; + /** + * Creates a new ImportJobScope instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope instance + */ + ImportJobScope.create = function create(properties) { + return new ImportJobScope(properties); + }; - /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lakes != null && message.lakes.length) - for (var i = 0; i < message.lakes.length; ++i) - $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; + /** + * Encodes the specified ImportJobScope message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobScope.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) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entryGroups[i]); + if (message.entryTypes != null && message.entryTypes.length) + for (var i = 0; i < message.entryTypes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entryTypes[i]); + if (message.aspectTypes != null && message.aspectTypes.length) + for (var i = 0; i < message.aspectTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aspectTypes[i]); + return writer; + }; - /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ImportJobScope message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.IImportJobScope} message ImportJobScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportJobScope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListLakesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.lakes && message.lakes.length)) - message.lakes = []; - message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); - break; + /** + * Decodes an ImportJobScope message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobScope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.entryGroups && message.entryGroups.length)) + message.entryGroups = []; + message.entryGroups.push(reader.string()); + break; + } + case 2: { + if (!(message.entryTypes && message.entryTypes.length)) + message.entryTypes = []; + message.entryTypes.push(reader.string()); + break; + } + case 3: { + if (!(message.aspectTypes && message.aspectTypes.length)) + message.aspectTypes = []; + message.aspectTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - case 2: { - message.nextPageToken = reader.string(); - break; + return message; + }; + + /** + * Decodes an ImportJobScope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportJobScope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportJobScope message. + * @function verify + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportJobScope.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) + if (!$util.isString(message.entryGroups[i])) + return "entryGroups: string[] expected"; + } + if (message.entryTypes != null && message.hasOwnProperty("entryTypes")) { + if (!Array.isArray(message.entryTypes)) + return "entryTypes: array expected"; + for (var i = 0; i < message.entryTypes.length; ++i) + if (!$util.isString(message.entryTypes[i])) + return "entryTypes: string[] expected"; + } + if (message.aspectTypes != null && message.hasOwnProperty("aspectTypes")) { + if (!Array.isArray(message.aspectTypes)) + return "aspectTypes: array expected"; + for (var i = 0; i < message.aspectTypes.length; ++i) + if (!$util.isString(message.aspectTypes[i])) + return "aspectTypes: string[] expected"; } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; + return null; + }; + + /** + * Creates an ImportJobScope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} ImportJobScope + */ + ImportJobScope.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope(); + if (object.entryGroups) { + if (!Array.isArray(object.entryGroups)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryGroups: array expected"); + message.entryGroups = []; + for (var i = 0; i < object.entryGroups.length; ++i) + message.entryGroups[i] = String(object.entryGroups[i]); + } + if (object.entryTypes) { + if (!Array.isArray(object.entryTypes)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.entryTypes: array expected"); + message.entryTypes = []; + for (var i = 0; i < object.entryTypes.length; ++i) + message.entryTypes[i] = String(object.entryTypes[i]); + } + if (object.aspectTypes) { + if (!Array.isArray(object.aspectTypes)) + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope.aspectTypes: array expected"); + message.aspectTypes = []; + for (var i = 0; i < object.aspectTypes.length; ++i) + message.aspectTypes[i] = String(object.aspectTypes[i]); } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an ImportJobScope message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope} message ImportJobScope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportJobScope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.entryGroups = []; + object.entryTypes = []; + object.aspectTypes = []; + } + if (message.entryGroups && message.entryGroups.length) { + object.entryGroups = []; + for (var j = 0; j < message.entryGroups.length; ++j) + object.entryGroups[j] = message.entryGroups[j]; + } + if (message.entryTypes && message.entryTypes.length) { + object.entryTypes = []; + for (var j = 0; j < message.entryTypes.length; ++j) + object.entryTypes[j] = message.entryTypes[j]; + } + if (message.aspectTypes && message.aspectTypes.length) { + object.aspectTypes = []; + for (var j = 0; j < message.aspectTypes.length; ++j) + object.aspectTypes[j] = message.aspectTypes[j]; + } + return object; + }; - /** - * Verifies a ListLakesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lakes != null && message.hasOwnProperty("lakes")) { - if (!Array.isArray(message.lakes)) - return "lakes: array expected"; - for (var i = 0; i < message.lakes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); - if (error) - return "lakes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; + /** + * Converts this ImportJobScope to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @instance + * @returns {Object.} JSON object + */ + ImportJobScope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - */ - ListLakesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - if (object.lakes) { - if (!Array.isArray(object.lakes)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); - message.lakes = []; - for (var i = 0; i < object.lakes.length; ++i) { - if (typeof object.lakes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); - message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; + /** + * Gets the default type url for ImportJobScope + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportJobScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"; + }; - /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.lakes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.lakes && message.lakes.length) { - object.lakes = []; - for (var j = 0; j < message.lakes.length; ++j) - object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; + return ImportJobScope; + })(); - /** - * Converts this ListLakesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - * @returns {Object.} JSON object - */ - ListLakesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ImportJobSpec; + })(); /** - * Gets the default type url for ListLakesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Type enum. + * @name google.cloud.dataplex.v1.MetadataJob.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} IMPORT=1 IMPORT value */ - ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; - }; - - return ListLakesResponse; - })(); + MetadataJob.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPORT"] = 1; + return values; + })(); - v1.ListLakeActionsRequest = (function() { + MetadataJob.Status = (function() { - /** - * Properties of a ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakeActionsRequest - * @property {string|null} [parent] ListLakeActionsRequest parent - * @property {number|null} [pageSize] ListLakeActionsRequest pageSize - * @property {string|null} [pageToken] ListLakeActionsRequest pageToken - */ + /** + * Properties of a Status. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @interface IStatus + * @property {google.cloud.dataplex.v1.MetadataJob.Status.State|null} [state] Status state + * @property {string|null} [message] Status message + * @property {number|null} [completionPercent] Status completionPercent + * @property {google.protobuf.ITimestamp|null} [updateTime] Status updateTime + */ - /** - * Constructs a new ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakeActionsRequest. - * @implements IListLakeActionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - */ - function ListLakeActionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Status. + * @memberof google.cloud.dataplex.v1.MetadataJob + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set + */ + function Status(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListLakeActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.parent = ""; + /** + * Status state. + * @member {google.cloud.dataplex.v1.MetadataJob.Status.State} state + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.state = 0; - /** - * ListLakeActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageSize = 0; + /** + * Status message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.message = ""; - /** - * ListLakeActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageToken = ""; + /** + * Status completionPercent. + * @member {number} completionPercent + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.completionPercent = 0; - /** - * Creates a new ListLakeActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance - */ - ListLakeActionsRequest.create = function create(properties) { - return new ListLakeActionsRequest(properties); - }; + /** + * Status updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @instance + */ + Status.prototype.updateTime = null; - /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.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; - }; + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.IStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; - /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Status message. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.completionPercent != null && Object.hasOwnProperty.call(message, "completionPercent")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.completionPercent); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakeActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.MetadataJob.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.completionPercent = reader.int32(); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.pageSize = reader.int32(); + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: break; } - case 3: { - message.pageToken = reader.string(); + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) + if (!$util.isInteger(message.completionPercent)) + return "completionPercent: integer expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.MetadataJob.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.MetadataJob.Status) + return object; + var message = new $root.google.cloud.dataplex.v1.MetadataJob.Status(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; break; } - default: - reader.skipType(tag & 7); + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "QUEUED": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "CANCELING": + case 3: + message.state = 3; + break; + case "CANCELED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "SUCCEEDED_WITH_ERRORS": + case 7: + message.state = 7; break; } - } - return message; - }; + if (object.message != null) + message.message = String(object.message); + if (object.completionPercent != null) + message.completionPercent = object.completionPercent | 0; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.MetadataJob.Status.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.MetadataJob.Status + * @static + * @param {google.cloud.dataplex.v1.MetadataJob.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.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.completionPercent = 0; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.MetadataJob.Status.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.completionPercent != null && message.hasOwnProperty("completionPercent")) + object.completionPercent = message.completionPercent; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.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.cloud.dataplex.v1.MetadataJob.Status"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.MetadataJob.Status.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} QUEUED=1 QUEUED value + * @property {number} RUNNING=2 RUNNING value + * @property {number} CANCELING=3 CANCELING value + * @property {number} CANCELED=4 CANCELED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + * @property {number} SUCCEEDED_WITH_ERRORS=7 SUCCEEDED_WITH_ERRORS value + */ + Status.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUEUED"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "CANCELING"] = 3; + values[valuesById[4] = "CANCELED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "SUCCEEDED_WITH_ERRORS"] = 7; + return values; + })(); + + return Status; + })(); + + return MetadataJob; + })(); + + /** + * EntryView enum. + * @name google.cloud.dataplex.v1.EntryView + * @enum {number} + * @property {number} ENTRY_VIEW_UNSPECIFIED=0 ENTRY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + * @property {number} CUSTOM=3 CUSTOM value + * @property {number} ALL=4 ALL value + */ + v1.EntryView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTRY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[3] = "CUSTOM"] = 3; + values[valuesById[4] = "ALL"] = 4; + return values; + })(); + + /** + * TransferStatus enum. + * @name google.cloud.dataplex.v1.TransferStatus + * @enum {number} + * @property {number} TRANSFER_STATUS_UNSPECIFIED=0 TRANSFER_STATUS_UNSPECIFIED value + * @property {number} TRANSFER_STATUS_MIGRATED=1 TRANSFER_STATUS_MIGRATED value + * @property {number} TRANSFER_STATUS_TRANSFERRED=2 TRANSFER_STATUS_TRANSFERRED value + */ + v1.TransferStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFER_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSFER_STATUS_MIGRATED"] = 1; + values[valuesById[2] = "TRANSFER_STATUS_TRANSFERRED"] = 2; + return values; + })(); + + v1.DataplexService = (function() { /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Constructs a new DataplexService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataplexService + * @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 */ - ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + function DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; /** - * Verifies a ListLakeActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. */ - ListLakeActionsRequest.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; + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListLakeActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - 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 ListLakeActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListLakeActionsRequest.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; - }; + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); /** - * Converts this ListLakeActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListLakeActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListLakeActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; - }; - - return ListLakeActionsRequest; - })(); - - v1.ListActionsResponse = (function() { /** - * Properties of a ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListActionsResponse - * @property {Array.|null} [actions] ListActionsResponse actions - * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); /** - * Constructs a new ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListActionsResponse. - * @implements IListActionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - function ListActionsResponse(properties) { - this.actions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ListActionsResponse actions. - * @member {Array.} actions - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListActionsResponse.prototype.actions = $util.emptyArray; /** - * ListActionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListActionsResponse.prototype.nextPageToken = ""; + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); /** - * Creates a new ListActionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListActionsResponse.create = function create(properties) { - return new ListActionsResponse(properties); - }; /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse */ - ListActionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 */ - ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); /** - * Decodes a ListActionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListActionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake */ - ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListActionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 */ - ListActionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListActionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); - message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse */ - ListActionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListActionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListActionsResponse + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 */ - ListActionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); /** - * Gets the default type url for ListActionsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; - }; - return ListActionsResponse; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.GetLakeRequest = (function() { + /** + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); /** - * Properties of a GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetLakeRequest - * @property {string|null} [name] GetLakeRequest name + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetLakeRequest. - * @implements IGetLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function GetLakeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * GetLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetLakeRequest.prototype.name = ""; + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); /** - * Creates a new GetLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetLakeRequest.create = function create(properties) { - return new GetLakeRequest(properties); - }; /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetLakeRequest.encode = function encode(message, writer) { - 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 GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); /** - * Decodes a GetLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - 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 GetLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse */ - GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 */ - GetLakeRequest.verify = function verify(message) { - if (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; - }; + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); /** - * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone */ - GetLakeRequest.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 GetLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetLakeRequest + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 */ - GetLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); /** - * Gets the default type url for GetLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; - }; - - return GetLakeRequest; - })(); - - v1.CreateZoneRequest = (function() { /** - * Properties of a CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateZoneRequest - * @property {string|null} [parent] CreateZoneRequest parent - * @property {string|null} [zoneId] CreateZoneRequest zoneId - * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone - * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse */ /** - * Constructs a new CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateZoneRequest. - * @implements ICreateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 */ - function CreateZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); /** - * CreateZoneRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateZoneRequest.prototype.parent = ""; /** - * CreateZoneRequest zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - CreateZoneRequest.prototype.zoneId = ""; /** - * CreateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateZoneRequest.prototype.zone = null; + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); /** - * CreateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateZoneRequest.prototype.validateOnly = false; /** - * Creates a new CreateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - CreateZoneRequest.create = function create(properties) { - return new CreateZoneRequest(properties); - }; /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateZoneRequest.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.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - CreateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.zoneId = reader.string(); - break; - } - case 3: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); /** - * Verifies a CreateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateZoneRequest.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.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse */ - CreateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 */ - CreateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.zoneId = ""; - object.zone = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); /** - * Converts this CreateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for CreateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset */ - CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; - }; - return CreateZoneRequest; - })(); - - v1.UpdateZoneRequest = (function() { + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); /** - * Properties of an UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateZoneRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask - * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone - * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateZoneRequest. - * @implements IUpdateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse */ - function UpdateZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * UpdateZoneRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 */ - UpdateZoneRequest.prototype.updateMask = null; + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); /** - * UpdateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateZoneRequest.prototype.zone = null; /** - * UpdateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - UpdateZoneRequest.prototype.validateOnly = false; /** - * Creates a new UpdateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - UpdateZoneRequest.create = function create(properties) { - return new UpdateZoneRequest(properties); - }; + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateZoneRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - UpdateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an UpdateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - UpdateZoneRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - UpdateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.zone = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; /** - * Converts this UpdateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - * @returns {Object.} JSON object + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse */ - UpdateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for UpdateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 */ - UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; - }; - - return UpdateZoneRequest; - })(); + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); - v1.DeleteZoneRequest = (function() { + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteZoneRequest - * @property {string|null} [name] DeleteZoneRequest name + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task */ /** - * Constructs a new DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteZoneRequest. - * @implements IDeleteZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 */ - function DeleteZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); /** - * DeleteZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteZoneRequest.prototype.name = ""; /** - * Creates a new DeleteZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse */ - DeleteZoneRequest.create = function create(properties) { - return new DeleteZoneRequest(properties); - }; /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 */ - DeleteZoneRequest.encode = function encode(message, writer) { - 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; - }; + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef RunTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.RunTaskResponse} [response] RunTaskResponse */ - DeleteZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - 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 DeleteZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.RunTaskCallback} callback Node-style callback called with the error, if any, and RunTaskResponse + * @returns {undefined} + * @variation 1 */ - DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataplexService.prototype.runTask = function runTask(request, callback) { + return this.rpcCall(runTask, $root.google.cloud.dataplex.v1.RunTaskRequest, $root.google.cloud.dataplex.v1.RunTaskResponse, request, callback); + }, "name", { value: "RunTask" }); /** - * Verifies a DeleteZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteZoneRequest.verify = function verify(message) { - if (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 DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job */ - DeleteZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 */ - DeleteZoneRequest.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; - }; + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); /** - * Converts this DeleteZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeleteZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for DeleteZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; - }; - return DeleteZoneRequest; + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); + + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListSessionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse + */ + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { + return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); + }, "name", { value: "ListSessions" }); + + /** + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataplexService; })(); - v1.ListZonesRequest = (function() { + v1.CreateLakeRequest = (function() { /** - * Properties of a ListZonesRequest. + * Properties of a CreateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListZonesRequest - * @property {string|null} [parent] ListZonesRequest parent - * @property {number|null} [pageSize] ListZonesRequest pageSize - * @property {string|null} [pageToken] ListZonesRequest pageToken - * @property {string|null} [filter] ListZonesRequest filter - * @property {string|null} [orderBy] ListZonesRequest orderBy + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly */ /** - * Constructs a new ListZonesRequest. + * Constructs a new CreateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesRequest. - * @implements IListZonesRequest + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set */ - function ListZonesRequest(properties) { + function CreateLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29769,110 +30697,100 @@ } /** - * ListZonesRequest parent. + * CreateLakeRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.parent = ""; - - /** - * ListZonesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - ListZonesRequest.prototype.pageSize = 0; + CreateLakeRequest.prototype.parent = ""; /** - * ListZonesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - ListZonesRequest.prototype.pageToken = ""; + CreateLakeRequest.prototype.lakeId = ""; /** - * ListZonesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - ListZonesRequest.prototype.filter = ""; + CreateLakeRequest.prototype.lake = null; /** - * ListZonesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - ListZonesRequest.prototype.orderBy = ""; + CreateLakeRequest.prototype.validateOnly = false; /** - * Creates a new ListZonesRequest instance using the specified properties. + * Creates a new CreateLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance */ - ListZonesRequest.create = function create(properties) { - return new ListZonesRequest(properties); + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); }; /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesRequest.encode = function encode(message, writer) { + CreateLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZonesRequest message from the specified reader or buffer. + * Decodes a CreateLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesRequest.decode = function decode(reader, length) { + CreateLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -29881,19 +30799,15 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.lakeId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -29905,157 +30819,154 @@ }; /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZonesRequest message. + * Verifies a CreateLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZonesRequest.verify = function verify(message) { + CreateLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest */ - ListZonesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZonesRequest.toObject = function toObject(message, options) { + CreateLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListZonesRequest to JSON. + * Converts this CreateLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance * @returns {Object.} JSON object */ - ListZonesRequest.prototype.toJSON = function toJSON() { + CreateLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListZonesRequest + * Gets the default type url for CreateLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; }; - return ListZonesRequest; + return CreateLakeRequest; })(); - v1.ListZonesResponse = (function() { + v1.UpdateLakeRequest = (function() { /** - * Properties of a ListZonesResponse. + * Properties of an UpdateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListZonesResponse - * @property {Array.|null} [zones] ListZonesResponse zones - * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly */ /** - * Constructs a new ListZonesResponse. + * Constructs a new UpdateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesResponse. - * @implements IListZonesResponse + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set */ - function ListZonesResponse(properties) { - this.zones = []; + function UpdateLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30063,92 +30974,103 @@ } /** - * ListZonesResponse zones. - * @member {Array.} zones - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance */ - ListZonesResponse.prototype.zones = $util.emptyArray; + UpdateLakeRequest.prototype.updateMask = null; /** - * ListZonesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - */ - ListZonesResponse.prototype.nextPageToken = ""; + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.lake = null; /** - * Creates a new ListZonesResponse instance using the specified properties. + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @instance + */ + UpdateLakeRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance */ - ListZonesResponse.create = function create(properties) { - return new ListZonesResponse(properties); + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); }; /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesResponse.encode = function encode(message, writer) { + UpdateLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - $root.google.cloud.dataplex.v1.Zone.encode(message.zones[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZonesResponse message from the specified reader or buffer. + * Decodes an UpdateLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesResponse.decode = function decode(reader, length) { + UpdateLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); break; } default: @@ -30160,150 +31082,149 @@ }; /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZonesResponse message. + * Verifies an UpdateLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZonesResponse.verify = function verify(message) { + UpdateLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); - if (error) - return "zones." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); + if (error) + return "lake." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest */ - ListZonesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) { - if (typeof object.zones[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); - message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); - } + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZonesResponse.toObject = function toObject(message, options) { + UpdateLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.zones = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); + if (options.defaults) { + object.updateMask = null; + object.lake = null; + object.validateOnly = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListZonesResponse to JSON. + * Converts this UpdateLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance * @returns {Object.} JSON object */ - ListZonesResponse.prototype.toJSON = function toJSON() { + UpdateLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListZonesResponse + * Gets the default type url for UpdateLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesResponse + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; }; - return ListZonesResponse; + return UpdateLakeRequest; })(); - v1.ListZoneActionsRequest = (function() { + v1.DeleteLakeRequest = (function() { /** - * Properties of a ListZoneActionsRequest. + * Properties of a DeleteLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListZoneActionsRequest - * @property {string|null} [parent] ListZoneActionsRequest parent - * @property {number|null} [pageSize] ListZoneActionsRequest pageSize - * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name */ /** - * Constructs a new ListZoneActionsRequest. + * Constructs a new DeleteLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZoneActionsRequest. - * @implements IListZoneActionsRequest + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set */ - function ListZoneActionsRequest(properties) { + function DeleteLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30311,103 +31232,75 @@ } /** - * ListZoneActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.parent = ""; - - /** - * ListZoneActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @instance - */ - ListZoneActionsRequest.prototype.pageSize = 0; - - /** - * ListZoneActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @instance */ - ListZoneActionsRequest.prototype.pageToken = ""; + DeleteLakeRequest.prototype.name = ""; /** - * Creates a new ListZoneActionsRequest instance using the specified properties. + * Creates a new DeleteLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance */ - ListZoneActionsRequest.create = function create(properties) { - return new ListZoneActionsRequest(properties); + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); }; /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZoneActionsRequest.encode = function encode(message, writer) { + DeleteLakeRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. + * Decodes a DeleteLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZoneActionsRequest.decode = function decode(reader, length) { + DeleteLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); 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(); + message.name = reader.string(); break; } default: @@ -30419,139 +31312,126 @@ }; /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListZoneActionsRequest message. + * Verifies a DeleteLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListZoneActionsRequest.verify = function verify(message) { + DeleteLakeRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest */ - ListZoneActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - 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); + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static - * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListZoneActionsRequest.toObject = function toObject(message, options) { + DeleteLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListZoneActionsRequest to JSON. + * Converts this DeleteLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @instance * @returns {Object.} JSON object */ - ListZoneActionsRequest.prototype.toJSON = function toJSON() { + DeleteLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListZoneActionsRequest + * Gets the default type url for DeleteLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; }; - return ListZoneActionsRequest; + return DeleteLakeRequest; })(); - v1.GetZoneRequest = (function() { + v1.ListLakesRequest = (function() { /** - * Properties of a GetZoneRequest. + * Properties of a ListLakesRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetZoneRequest - * @property {string|null} [name] GetZoneRequest name + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy */ /** - * Constructs a new GetZoneRequest. + * Constructs a new ListLakesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetZoneRequest. - * @implements IGetZoneRequest + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set */ - function GetZoneRequest(properties) { + function ListLakesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30559,75 +31439,131 @@ } /** - * GetZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - GetZoneRequest.prototype.name = ""; + ListLakesRequest.prototype.parent = ""; /** - * Creates a new GetZoneRequest instance using the specified properties. + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageSize = 0; + + /** + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.pageToken = ""; + + /** + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.filter = ""; + + /** + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @instance + */ + ListLakesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListLakesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance */ - GetZoneRequest.create = function create(properties) { - return new GetZoneRequest(properties); + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); }; /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encode = function encode(message, writer) { + ListLakesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer. + * Decodes a ListLakesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decode = function decode(reader, length) { + ListLakesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -30639,125 +31575,159 @@ }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetZoneRequest message. + * Verifies a ListLakesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetZoneRequest.verify = function verify(message) { + ListLakesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest */ - GetZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetZoneRequest.toObject = function toObject(message, options) { + ListLakesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetZoneRequest to JSON. + * Converts this ListLakesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance * @returns {Object.} JSON object */ - GetZoneRequest.prototype.toJSON = function toJSON() { + ListLakesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetZoneRequest + * Gets the default type url for ListLakesRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; }; - return GetZoneRequest; + return ListLakesRequest; })(); - v1.CreateAssetRequest = (function() { + v1.ListLakesResponse = (function() { /** - * Properties of a CreateAssetRequest. + * Properties of a ListLakesResponse. * @memberof google.cloud.dataplex.v1 - * @interface ICreateAssetRequest - * @property {string|null} [parent] CreateAssetRequest parent - * @property {string|null} [assetId] CreateAssetRequest assetId - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset - * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations */ /** - * Constructs a new CreateAssetRequest. + * Constructs a new ListLakesResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateAssetRequest. - * @implements ICreateAssetRequest + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse * @constructor - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set */ - function CreateAssetRequest(properties) { + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30765,117 +31735,109 @@ } /** - * CreateAssetRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateAssetRequest - * @instance - */ - CreateAssetRequest.prototype.parent = ""; - - /** - * CreateAssetRequest assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance */ - CreateAssetRequest.prototype.assetId = ""; + ListLakesResponse.prototype.lakes = $util.emptyArray; /** - * CreateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance */ - CreateAssetRequest.prototype.asset = null; + ListLakesResponse.prototype.nextPageToken = ""; /** - * CreateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance */ - CreateAssetRequest.prototype.validateOnly = false; + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; /** - * Creates a new CreateAssetRequest instance using the specified properties. + * Creates a new ListLakesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance */ - CreateAssetRequest.create = function create(properties) { - return new CreateAssetRequest(properties); + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); }; /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encode = function encode(message, writer) { + ListLakesResponse.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.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); return writer; }; /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. + * Decodes a ListLakesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decode = function decode(reader, length) { + ListLakesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); break; } case 2: { - message.assetId = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); break; } default: @@ -30887,154 +31849,171 @@ }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAssetRequest message. + * Verifies a ListLakesResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAssetRequest.verify = function verify(message) { + ListLakesResponse.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.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; return null; }; /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse */ - CreateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) return object; - var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static - * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAssetRequest.toObject = function toObject(message, options) { + ListLakesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.assetId = ""; - object.asset = null; - object.validateOnly = false; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateAssetRequest to JSON. + * Converts this ListLakesResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @instance * @returns {Object.} JSON object */ - CreateAssetRequest.prototype.toJSON = function toJSON() { + ListLakesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAssetRequest + * Gets the default type url for ListLakesResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; }; - return CreateAssetRequest; + return ListLakesResponse; })(); - v1.UpdateAssetRequest = (function() { + v1.ListLakeActionsRequest = (function() { /** - * Properties of an UpdateAssetRequest. + * Properties of a ListLakeActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateAssetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset - * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken */ /** - * Constructs a new UpdateAssetRequest. + * Constructs a new ListLakeActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateAssetRequest. - * @implements IUpdateAssetRequest + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set */ - function UpdateAssetRequest(properties) { + function ListLakeActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31042,103 +32021,103 @@ } /** - * UpdateAssetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance */ - UpdateAssetRequest.prototype.updateMask = null; + ListLakeActionsRequest.prototype.parent = ""; /** - * UpdateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance */ - UpdateAssetRequest.prototype.asset = null; + ListLakeActionsRequest.prototype.pageSize = 0; /** - * UpdateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance */ - UpdateAssetRequest.prototype.validateOnly = false; + ListLakeActionsRequest.prototype.pageToken = ""; /** - * Creates a new UpdateAssetRequest instance using the specified properties. + * Creates a new ListLakeActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance */ - UpdateAssetRequest.create = function create(properties) { - return new UpdateAssetRequest(properties); + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); }; /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAssetRequest.encode = function encode(message, writer) { + ListLakeActionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + 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 UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAssetRequest.decode = function decode(reader, length) { + ListLakeActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.validateOnly = reader.bool(); + message.pageToken = reader.string(); break; } default: @@ -31150,149 +32129,141 @@ }; /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAssetRequest message. + * Verifies a ListLakeActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAssetRequest.verify = function verify(message) { + ListLakeActionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean 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 an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest */ - UpdateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + 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 an UpdateAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static - * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAssetRequest.toObject = function toObject(message, options) { + ListLakeActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.asset = null; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + 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 UpdateAssetRequest to JSON. + * Converts this ListLakeActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance * @returns {Object.} JSON object */ - UpdateAssetRequest.prototype.toJSON = function toJSON() { + ListLakeActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateAssetRequest + * Gets the default type url for ListLakeActionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; }; - return UpdateAssetRequest; + return ListLakeActionsRequest; })(); - v1.DeleteAssetRequest = (function() { + v1.ListActionsResponse = (function() { /** - * Properties of a DeleteAssetRequest. + * Properties of a ListActionsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteAssetRequest - * @property {string|null} [name] DeleteAssetRequest name + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken */ /** - * Constructs a new DeleteAssetRequest. + * Constructs a new ListActionsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteAssetRequest. - * @implements IDeleteAssetRequest + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse * @constructor - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set */ - function DeleteAssetRequest(properties) { + function ListActionsResponse(properties) { + this.actions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31300,75 +32271,92 @@ } /** - * DeleteAssetRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance */ - DeleteAssetRequest.prototype.name = ""; + ListActionsResponse.prototype.actions = $util.emptyArray; /** - * Creates a new DeleteAssetRequest instance using the specified properties. + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse + * @instance + */ + ListActionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListActionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance */ - DeleteAssetRequest.create = function create(properties) { - return new DeleteAssetRequest(properties); + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); }; /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAssetRequest.encode = function encode(message, writer) { + ListActionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * Decodes a ListActionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAssetRequest.decode = function decode(reader, length) { + ListActionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -31380,126 +32368,148 @@ }; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAssetRequest message. + * Verifies a ListActionsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAssetRequest.verify = function verify(message) { + ListActionsResponse.verify = function verify(message) { if (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.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse */ - DeleteAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAssetRequest.toObject = function toObject(message, options) { + ListActionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.actions = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteAssetRequest to JSON. + * Converts this ListActionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance * @returns {Object.} JSON object */ - DeleteAssetRequest.prototype.toJSON = function toJSON() { + ListActionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteAssetRequest + * Gets the default type url for ListActionsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; }; - return DeleteAssetRequest; + return ListActionsResponse; })(); - v1.ListAssetsRequest = (function() { + v1.GetLakeRequest = (function() { /** - * Properties of a ListAssetsRequest. + * Properties of a GetLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {number|null} [pageSize] ListAssetsRequest pageSize - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name */ /** - * Constructs a new ListAssetsRequest. + * Constructs a new GetLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set */ - function ListAssetsRequest(properties) { + function GetLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31507,131 +32517,75 @@ } /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.parent = ""; - - /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageSize = 0; - - /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageToken = ""; - - /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.filter = ""; - - /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance */ - ListAssetsRequest.prototype.orderBy = ""; + GetLakeRequest.prototype.name = ""; /** - * Creates a new ListAssetsRequest instance using the specified properties. + * Creates a new GetLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); }; /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encode = function encode(message, writer) { + GetLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. + * Decodes a GetLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decode = function decode(reader, length) { + GetLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); 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; - } - case 5: { - message.orderBy = reader.string(); + message.name = reader.string(); break; } default: @@ -31643,157 +32597,125 @@ }; /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsRequest message. + * Verifies a GetLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsRequest.verify = function verify(message) { + GetLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsRequest.toObject = function toObject(message, options) { + GetLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAssetsRequest to JSON. + * Converts this GetLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance * @returns {Object.} JSON object */ - ListAssetsRequest.prototype.toJSON = function toJSON() { + GetLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAssetsRequest + * Gets the default type url for GetLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; }; - return ListAssetsRequest; + return GetLakeRequest; })(); - v1.ListAssetsResponse = (function() { + v1.CreateZoneRequest = (function() { /** - * Properties of a ListAssetsResponse. + * Properties of a CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [assets] ListAssetsResponse assets - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly */ /** - * Constructs a new ListAssetsResponse. + * Constructs a new CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set */ - function ListAssetsResponse(properties) { - this.assets = []; + function CreateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31801,92 +32723,117 @@ } /** - * ListAssetsResponse assets. - * @member {Array.} assets - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * CreateZoneRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - ListAssetsResponse.prototype.assets = $util.emptyArray; + CreateZoneRequest.prototype.parent = ""; /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - ListAssetsResponse.prototype.nextPageToken = ""; + CreateZoneRequest.prototype.zoneId = ""; /** - * Creates a new ListAssetsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); + CreateZoneRequest.prototype.zone = null; + + /** + * CreateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance + */ + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); }; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encode = function encode(message, writer) { + CreateZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.dataplex.v1.Asset.encode(message.assets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a CreateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decode = function decode(reader, length) { + CreateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.zoneId = reader.string(); + break; + } + case 3: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -31898,150 +32845,154 @@ }; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetsResponse message. + * Verifies a CreateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetsResponse.verify = function verify(message) { + CreateZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); - if (error) - return "assets." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); - } + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetsResponse.toObject = function toObject(message, options) { + CreateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.assets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); + if (options.defaults) { + object.parent = ""; + object.zoneId = ""; + object.zone = null; + object.validateOnly = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this CreateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance * @returns {Object.} JSON object */ - ListAssetsResponse.prototype.toJSON = function toJSON() { + CreateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAssetsResponse + * Gets the default type url for CreateZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; }; - return ListAssetsResponse; + return CreateZoneRequest; })(); - v1.ListAssetActionsRequest = (function() { + v1.UpdateZoneRequest = (function() { /** - * Properties of a ListAssetActionsRequest. + * Properties of an UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetActionsRequest - * @property {string|null} [parent] ListAssetActionsRequest parent - * @property {number|null} [pageSize] ListAssetActionsRequest pageSize - * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly */ /** - * Constructs a new ListAssetActionsRequest. + * Constructs a new UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetActionsRequest. - * @implements IListAssetActionsRequest + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set */ - function ListAssetActionsRequest(properties) { + function UpdateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32049,103 +33000,103 @@ } /** - * ListAssetActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * UpdateZoneRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListAssetActionsRequest.prototype.parent = ""; + UpdateZoneRequest.prototype.updateMask = null; /** - * ListAssetActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListAssetActionsRequest.prototype.pageSize = 0; + UpdateZoneRequest.prototype.zone = null; /** - * ListAssetActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * UpdateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListAssetActionsRequest.prototype.pageToken = ""; + UpdateZoneRequest.prototype.validateOnly = false; /** - * Creates a new ListAssetActionsRequest instance using the specified properties. + * Creates a new UpdateZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance */ - ListAssetActionsRequest.create = function create(properties) { - return new ListAssetActionsRequest(properties); + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); }; /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetActionsRequest.encode = function encode(message, writer) { + UpdateZoneRequest.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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * Decodes an UpdateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetActionsRequest.decode = function decode(reader, length) { + UpdateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -32157,139 +33108,149 @@ }; /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAssetActionsRequest message. + * Verifies an UpdateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAssetActionsRequest.verify = function verify(message) { + UpdateZoneRequest.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.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest */ - ListAssetActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - 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); + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAssetActionsRequest.toObject = function toObject(message, options) { + UpdateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.updateMask = null; + object.zone = null; + object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListAssetActionsRequest to JSON. + * Converts this UpdateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance * @returns {Object.} JSON object */ - ListAssetActionsRequest.prototype.toJSON = function toJSON() { + UpdateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAssetActionsRequest + * Gets the default type url for UpdateZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; }; - return ListAssetActionsRequest; + return UpdateZoneRequest; })(); - v1.GetAssetRequest = (function() { + v1.DeleteZoneRequest = (function() { /** - * Properties of a GetAssetRequest. + * Properties of a DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetAssetRequest - * @property {string|null} [name] GetAssetRequest name + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name */ /** - * Constructs a new GetAssetRequest. + * Constructs a new DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetAssetRequest. - * @implements IGetAssetRequest + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set */ - function GetAssetRequest(properties) { + function DeleteZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32297,35 +33258,35 @@ } /** - * GetAssetRequest name. + * DeleteZoneRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance */ - GetAssetRequest.prototype.name = ""; + DeleteZoneRequest.prototype.name = ""; /** - * Creates a new GetAssetRequest instance using the specified properties. + * Creates a new DeleteZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance */ - GetAssetRequest.create = function create(properties) { - return new GetAssetRequest(properties); + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); }; /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encode = function encode(message, writer) { + DeleteZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -32334,33 +33295,33 @@ }; /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer. + * Decodes a DeleteZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decode = function decode(reader, length) { + DeleteZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -32377,30 +33338,30 @@ }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAssetRequest message. + * Verifies a DeleteZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAssetRequest.verify = function verify(message) { + DeleteZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -32410,32 +33371,32 @@ }; /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest */ - GetAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAssetRequest.toObject = function toObject(message, options) { + DeleteZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -32447,58 +33408,56 @@ }; /** - * Converts this GetAssetRequest to JSON. + * Converts this DeleteZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance * @returns {Object.} JSON object */ - GetAssetRequest.prototype.toJSON = function toJSON() { + DeleteZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAssetRequest + * Gets the default type url for DeleteZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; }; - return GetAssetRequest; + return DeleteZoneRequest; })(); - v1.OperationMetadata = (function() { + v1.ListZonesRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy */ /** - * Constructs a new OperationMetadata. + * Constructs a new ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest * @constructor - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function ListZonesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32506,159 +33465,131 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListZonesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - OperationMetadata.prototype.target = ""; + ListZonesRequest.prototype.parent = ""; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListZonesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - OperationMetadata.prototype.verb = ""; + ListZonesRequest.prototype.pageSize = 0; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListZonesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - OperationMetadata.prototype.statusMessage = ""; + ListZonesRequest.prototype.pageToken = ""; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListZonesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + ListZonesRequest.prototype.filter = ""; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.dataplex.v1.OperationMetadata + * ListZonesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + ListZonesRequest.prototype.orderBy = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListZonesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + ListZonesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListZonesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + ListZonesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.target = reader.string(); + message.pageToken = reader.string(); break; } case 4: { - message.verb = reader.string(); + message.filter = reader.string(); break; } case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.orderBy = reader.string(); break; } default: @@ -32670,184 +33601,157 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a ListZonesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + ListZonesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + ListZonesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListZonesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + ListZonesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for ListZonesRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; }; - return OperationMetadata; + return ListZonesRequest; })(); - v1.CreateTaskRequest = (function() { + v1.ListZonesResponse = (function() { /** - * Properties of a CreateTaskRequest. + * Properties of a ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @interface ICreateTaskRequest - * @property {string|null} [parent] CreateTaskRequest parent - * @property {string|null} [taskId] CreateTaskRequest taskId - * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task - * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken */ /** - * Constructs a new CreateTaskRequest. + * Constructs a new ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateTaskRequest. - * @implements ICreateTaskRequest + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse * @constructor - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set */ - function CreateTaskRequest(properties) { + function ListZonesResponse(properties) { + this.zones = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32855,117 +33759,92 @@ } /** - * CreateTaskRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.parent = ""; - - /** - * CreateTaskRequest taskId. - * @member {string} taskId - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.taskId = ""; - - /** - * CreateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - CreateTaskRequest.prototype.task = null; + ListZonesResponse.prototype.zones = $util.emptyArray; /** - * CreateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * ListZonesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - CreateTaskRequest.prototype.validateOnly = false; + ListZonesResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateTaskRequest instance using the specified properties. + * Creates a new ListZonesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance */ - CreateTaskRequest.create = function create(properties) { - return new CreateTaskRequest(properties); + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); }; /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskRequest.encode = function encode(message, writer) { + ListZonesResponse.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. + * Decodes a ListZonesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskRequest.decode = function decode(reader, length) { + ListZonesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); break; } case 2: { - message.taskId = reader.string(); - break; - } - case 3: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -32977,154 +33856,150 @@ }; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTaskRequest message. + * Verifies a ListZonesResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTaskRequest.verify = function verify(message) { + ListZonesResponse.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.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + if (error) + return "zones." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse */ - CreateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) return object; - var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTaskRequest.toObject = function toObject(message, options) { + ListZonesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.taskId = ""; - object.task = null; - object.validateOnly = false; + if (options.arrays || options.defaults) + object.zones = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateTaskRequest to JSON. + * Converts this ListZonesResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance * @returns {Object.} JSON object */ - CreateTaskRequest.prototype.toJSON = function toJSON() { + ListZonesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTaskRequest + * Gets the default type url for ListZonesResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; }; - return CreateTaskRequest; + return ListZonesResponse; })(); - v1.UpdateTaskRequest = (function() { + v1.ListZoneActionsRequest = (function() { /** - * Properties of an UpdateTaskRequest. + * Properties of a ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateTaskRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask - * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task - * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken */ /** - * Constructs a new UpdateTaskRequest. + * Constructs a new ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateTaskRequest. - * @implements IUpdateTaskRequest + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set */ - function UpdateTaskRequest(properties) { + function ListZoneActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33132,103 +34007,103 @@ } /** - * UpdateTaskRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * ListZoneActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - UpdateTaskRequest.prototype.updateMask = null; + ListZoneActionsRequest.prototype.parent = ""; /** - * UpdateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * ListZoneActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - UpdateTaskRequest.prototype.task = null; + ListZoneActionsRequest.prototype.pageSize = 0; /** - * UpdateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * ListZoneActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - UpdateTaskRequest.prototype.validateOnly = false; + ListZoneActionsRequest.prototype.pageToken = ""; /** - * Creates a new UpdateTaskRequest instance using the specified properties. + * Creates a new ListZoneActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance */ - UpdateTaskRequest.create = function create(properties) { - return new UpdateTaskRequest(properties); + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); }; /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTaskRequest.encode = function encode(message, writer) { + ListZoneActionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + 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 UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTaskRequest.decode = function decode(reader, length) { + ListZoneActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.validateOnly = reader.bool(); + message.pageToken = reader.string(); break; } default: @@ -33240,149 +34115,139 @@ }; /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTaskRequest message. + * Verifies a ListZoneActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTaskRequest.verify = function verify(message) { + ListZoneActionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean 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 an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest */ - UpdateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); + 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 an UpdateTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTaskRequest.toObject = function toObject(message, options) { + ListZoneActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.task = null; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + 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 UpdateTaskRequest to JSON. + * Converts this ListZoneActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance * @returns {Object.} JSON object */ - UpdateTaskRequest.prototype.toJSON = function toJSON() { + ListZoneActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTaskRequest + * Gets the default type url for ListZoneActionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; }; - return UpdateTaskRequest; + return ListZoneActionsRequest; })(); - v1.DeleteTaskRequest = (function() { + v1.GetZoneRequest = (function() { /** - * Properties of a DeleteTaskRequest. + * Properties of a GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteTaskRequest - * @property {string|null} [name] DeleteTaskRequest name + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name */ /** - * Constructs a new DeleteTaskRequest. + * Constructs a new GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteTaskRequest. - * @implements IDeleteTaskRequest + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set */ - function DeleteTaskRequest(properties) { + function GetZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33390,35 +34255,35 @@ } /** - * DeleteTaskRequest name. + * GetZoneRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance */ - DeleteTaskRequest.prototype.name = ""; + GetZoneRequest.prototype.name = ""; /** - * Creates a new DeleteTaskRequest instance using the specified properties. + * Creates a new GetZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance */ - DeleteTaskRequest.create = function create(properties) { - return new DeleteTaskRequest(properties); + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); }; /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encode = function encode(message, writer) { + GetZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -33427,33 +34292,33 @@ }; /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * Decodes a GetZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decode = function decode(reader, length) { + GetZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -33470,30 +34335,30 @@ }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTaskRequest message. + * Verifies a GetZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTaskRequest.verify = function verify(message) { + GetZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -33503,32 +34368,32 @@ }; /** - * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest */ - DeleteTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTaskRequest.toObject = function toObject(message, options) { + GetZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -33540,56 +34405,55 @@ }; /** - * Converts this DeleteTaskRequest to JSON. + * Converts this GetZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance * @returns {Object.} JSON object */ - DeleteTaskRequest.prototype.toJSON = function toJSON() { + GetZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTaskRequest + * Gets the default type url for GetZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; }; - return DeleteTaskRequest; + return GetZoneRequest; })(); - v1.ListTasksRequest = (function() { + v1.CreateAssetRequest = (function() { /** - * Properties of a ListTasksRequest. + * Properties of a CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListTasksRequest - * @property {string|null} [parent] ListTasksRequest parent - * @property {number|null} [pageSize] ListTasksRequest pageSize - * @property {string|null} [pageToken] ListTasksRequest pageToken - * @property {string|null} [filter] ListTasksRequest filter - * @property {string|null} [orderBy] ListTasksRequest orderBy + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly */ /** - * Constructs a new ListTasksRequest. + * Constructs a new CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksRequest. - * @implements IListTasksRequest + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set */ - function ListTasksRequest(properties) { + function CreateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33597,110 +34461,100 @@ } /** - * ListTasksRequest parent. + * CreateAssetRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.parent = ""; - - /** - * ListTasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListTasksRequest.prototype.pageSize = 0; + CreateAssetRequest.prototype.parent = ""; /** - * ListTasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListTasksRequest.prototype.pageToken = ""; + CreateAssetRequest.prototype.assetId = ""; /** - * ListTasksRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListTasksRequest.prototype.filter = ""; + CreateAssetRequest.prototype.asset = null; /** - * ListTasksRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListTasksRequest.prototype.orderBy = ""; + CreateAssetRequest.prototype.validateOnly = false; /** - * Creates a new ListTasksRequest instance using the specified properties. + * Creates a new CreateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance */ - ListTasksRequest.create = function create(properties) { - return new ListTasksRequest(properties); + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); }; /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksRequest.encode = function encode(message, writer) { + CreateAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTasksRequest message from the specified reader or buffer. + * Decodes a CreateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksRequest.decode = function decode(reader, length) { + CreateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -33709,19 +34563,15 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.assetId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -33733,159 +34583,154 @@ }; /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTasksRequest message. + * Verifies a CreateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTasksRequest.verify = function verify(message) { + CreateAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest */ - ListTasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTasksRequest.toObject = function toObject(message, options) { + CreateAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListTasksRequest to JSON. + * Converts this CreateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance * @returns {Object.} JSON object */ - ListTasksRequest.prototype.toJSON = function toJSON() { + CreateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTasksRequest + * Gets the default type url for CreateAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; }; - return ListTasksRequest; + return CreateAssetRequest; })(); - v1.ListTasksResponse = (function() { + v1.UpdateAssetRequest = (function() { /** - * Properties of a ListTasksResponse. + * Properties of an UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListTasksResponse - * @property {Array.|null} [tasks] ListTasksResponse tasks - * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly */ /** - * Constructs a new ListTasksResponse. + * Constructs a new UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksResponse. - * @implements IListTasksResponse + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set */ - function ListTasksResponse(properties) { - this.tasks = []; - this.unreachableLocations = []; + function UpdateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33893,109 +34738,103 @@ } /** - * ListTasksResponse tasks. - * @member {Array.} tasks - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - ListTasksResponse.prototype.tasks = $util.emptyArray; + UpdateAssetRequest.prototype.updateMask = null; /** - * ListTasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - ListTasksResponse.prototype.nextPageToken = ""; + UpdateAssetRequest.prototype.asset = null; /** - * ListTasksResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * UpdateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + UpdateAssetRequest.prototype.validateOnly = false; /** - * Creates a new ListTasksResponse instance using the specified properties. + * Creates a new UpdateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance */ - ListTasksResponse.create = function create(properties) { - return new ListTasksResponse(properties); + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); }; /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksResponse.encode = function encode(message, writer) { + UpdateAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tasks != null && message.tasks.length) - for (var i = 0; i < message.tasks.length; ++i) - $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTasksResponse message from the specified reader or buffer. + * Decodes an UpdateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksResponse.decode = function decode(reader, length) { + UpdateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.tasks && message.tasks.length)) - message.tasks = []; - message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); + message.validateOnly = reader.bool(); break; } default: @@ -34007,169 +34846,149 @@ }; /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTasksResponse message. + * Verifies an UpdateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTasksResponse.verify = function verify(message) { + UpdateAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!Array.isArray(message.tasks)) - return "tasks: array expected"; - for (var i = 0; i < message.tasks.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); - if (error) - return "tasks." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest */ - ListTasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - if (object.tasks) { - if (!Array.isArray(object.tasks)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); - message.tasks = []; - for (var i = 0; i < object.tasks.length; ++i) { - if (typeof object.tasks[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); - message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); - } + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTasksResponse.toObject = function toObject(message, options) { + UpdateAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.tasks = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.tasks && message.tasks.length) { - object.tasks = []; - for (var j = 0; j < message.tasks.length; ++j) - object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; + if (options.defaults) { + object.updateMask = null; + object.asset = null; + object.validateOnly = false; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListTasksResponse to JSON. + * Converts this UpdateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance * @returns {Object.} JSON object */ - ListTasksResponse.prototype.toJSON = function toJSON() { + UpdateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTasksResponse + * Gets the default type url for UpdateAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; }; - return ListTasksResponse; + return UpdateAssetRequest; })(); - v1.GetTaskRequest = (function() { + v1.DeleteAssetRequest = (function() { /** - * Properties of a GetTaskRequest. + * Properties of a DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetTaskRequest - * @property {string|null} [name] GetTaskRequest name + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name */ /** - * Constructs a new GetTaskRequest. + * Constructs a new DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetTaskRequest. - * @implements IGetTaskRequest + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set */ - function GetTaskRequest(properties) { + function DeleteAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34177,35 +34996,35 @@ } /** - * GetTaskRequest name. + * DeleteAssetRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance */ - GetTaskRequest.prototype.name = ""; + DeleteAssetRequest.prototype.name = ""; /** - * Creates a new GetTaskRequest instance using the specified properties. + * Creates a new DeleteAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance */ - GetTaskRequest.create = function create(properties) { - return new GetTaskRequest(properties); + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); }; /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaskRequest.encode = function encode(message, writer) { + DeleteAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -34214,33 +35033,33 @@ }; /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer. + * Decodes a DeleteAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaskRequest.decode = function decode(reader, length) { + DeleteAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34257,30 +35076,30 @@ }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTaskRequest message. + * Verifies a DeleteAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTaskRequest.verify = function verify(message) { + DeleteAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -34290,32 +35109,32 @@ }; /** - * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest */ - GetTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static - * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTaskRequest.toObject = function toObject(message, options) { + DeleteAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -34327,52 +35146,56 @@ }; /** - * Converts this GetTaskRequest to JSON. + * Converts this DeleteAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance * @returns {Object.} JSON object */ - GetTaskRequest.prototype.toJSON = function toJSON() { + DeleteAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTaskRequest + * Gets the default type url for DeleteAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; }; - return GetTaskRequest; + return DeleteAssetRequest; })(); - v1.GetJobRequest = (function() { + v1.ListAssetsRequest = (function() { /** - * Properties of a GetJobRequest. + * Properties of a ListAssetsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetJobRequest - * @property {string|null} [name] GetJobRequest name + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy */ /** - * Constructs a new GetJobRequest. + * Constructs a new ListAssetsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetJobRequest. - * @implements IGetJobRequest + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set */ - function GetJobRequest(properties) { + function ListAssetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34380,75 +35203,131 @@ } /** - * GetJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetJobRequest + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - GetJobRequest.prototype.name = ""; + ListAssetsRequest.prototype.parent = ""; /** - * Creates a new GetJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance */ - GetJobRequest.create = function create(properties) { - return new GetJobRequest(properties); - }; + ListAssetsRequest.prototype.pageSize = 0; /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.pageToken = ""; + + /** + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.filter = ""; + + /** + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + */ + ListAssetsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAssetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance + */ + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); + }; + + /** + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRequest.encode = function encode(message, writer) { + ListAssetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetJobRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRequest.decode = function decode(reader, length) { + ListAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -34460,126 +35339,157 @@ }; /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetJobRequest message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetJobRequest.verify = function verify(message) { + ListAssetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest */ - GetJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetJobRequest.toObject = function toObject(message, options) { + ListAssetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetJobRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance * @returns {Object.} JSON object */ - GetJobRequest.prototype.toJSON = function toJSON() { + ListAssetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetJobRequest + * Gets the default type url for ListAssetsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetJobRequest + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; }; - return GetJobRequest; + return ListAssetsRequest; })(); - v1.RunTaskRequest = (function() { + v1.ListAssetsResponse = (function() { /** - * Properties of a RunTaskRequest. + * Properties of a ListAssetsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IRunTaskRequest - * @property {string|null} [name] RunTaskRequest name - * @property {Object.|null} [labels] RunTaskRequest labels - * @property {Object.|null} [args] RunTaskRequest args + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken */ /** - * Constructs a new RunTaskRequest. + * Constructs a new ListAssetsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunTaskRequest. - * @implements IRunTaskRequest + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse * @constructor - * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set */ - function RunTaskRequest(properties) { - this.labels = {}; - this.args = {}; + function ListAssetsResponse(properties) { + this.assets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34587,143 +35497,92 @@ } /** - * RunTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.RunTaskRequest - * @instance - */ - RunTaskRequest.prototype.name = ""; - - /** - * RunTaskRequest labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance */ - RunTaskRequest.prototype.labels = $util.emptyObject; + ListAssetsResponse.prototype.assets = $util.emptyArray; /** - * RunTaskRequest args. - * @member {Object.} args - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance */ - RunTaskRequest.prototype.args = $util.emptyObject; + ListAssetsResponse.prototype.nextPageToken = ""; /** - * Creates a new RunTaskRequest instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest instance + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance */ - RunTaskRequest.create = function create(properties) { - return new RunTaskRequest(properties); + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); }; /** - * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTaskRequest.encode = function encode(message, writer) { + ListAssetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.args != null && Object.hasOwnProperty.call(message, "args")) - for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunTaskRequest message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunTaskRequest.decode = function decode(reader, length) { + ListAssetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskRequest(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 3: { - 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; + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); break; } - case 4: { - if (message.args === $util.emptyObject) - message.args = {}; - 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.args[key] = value; + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -34735,167 +35594,150 @@ }; /** - * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunTaskRequest.decodeDelimited = function decodeDelimited(reader) { + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunTaskRequest message. + * Verifies a ListAssetsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunTaskRequest.verify = function verify(message) { + ListAssetsResponse.verify = function verify(message) { if (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.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.args != null && message.hasOwnProperty("args")) { - if (!$util.isObject(message.args)) - return "args: object expected"; - var key = Object.keys(message.args); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.args[key[i]])) - return "args: string{k:string} expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse */ - RunTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunTaskRequest) + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.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.args) { - if (typeof object.args !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.args: object expected"); - message.args = {}; - for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) - message.args[keys[i]] = String(object.args[keys[i]]); + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.RunTaskRequest} message RunTaskRequest + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunTaskRequest.toObject = function toObject(message, options) { + ListAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.args = {}; - } + if (options.arrays || options.defaults) + object.assets = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.args && (keys2 = Object.keys(message.args)).length) { - object.args = {}; - for (var j = 0; j < keys2.length; ++j) - object.args[keys2[j]] = message.args[keys2[j]]; + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this RunTaskRequest to JSON. + * Converts this ListAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance * @returns {Object.} JSON object */ - RunTaskRequest.prototype.toJSON = function toJSON() { + ListAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunTaskRequest + * Gets the default type url for ListAssetsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; }; - return RunTaskRequest; + return ListAssetsResponse; })(); - v1.RunTaskResponse = (function() { + v1.ListAssetActionsRequest = (function() { /** - * Properties of a RunTaskResponse. + * Properties of a ListAssetActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IRunTaskResponse - * @property {google.cloud.dataplex.v1.IJob|null} [job] RunTaskResponse job + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken */ /** - * Constructs a new RunTaskResponse. + * Constructs a new ListAssetActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a RunTaskResponse. - * @implements IRunTaskResponse + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set */ - function RunTaskResponse(properties) { + function ListAssetActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34903,75 +35745,103 @@ } /** - * RunTaskResponse job. - * @member {google.cloud.dataplex.v1.IJob|null|undefined} job - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @instance */ - RunTaskResponse.prototype.job = null; + ListAssetActionsRequest.prototype.parent = ""; /** - * Creates a new RunTaskResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.RunTaskResponse - * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse instance + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance */ - RunTaskResponse.create = function create(properties) { - return new RunTaskResponse(properties); + ListAssetActionsRequest.prototype.pageSize = 0; + + /** + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + */ + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); }; /** - * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTaskResponse.encode = function encode(message, writer) { + ListAssetActionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.job != null && Object.hasOwnProperty.call(message, "job")) - $root.google.cloud.dataplex.v1.Job.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RunTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RunTaskResponse message from the specified reader or buffer. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunTaskResponse.decode = function decode(reader, length) { + ListAssetActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.job = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -34983,129 +35853,139 @@ }; /** - * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RunTaskResponse.decodeDelimited = function decodeDelimited(reader) { + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RunTaskResponse message. + * Verifies a ListAssetActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RunTaskResponse.verify = function verify(message) { + ListAssetActionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.job != null && message.hasOwnProperty("job")) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.job); - if (error) - return "job." + error; - } + 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 RunTaskResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest */ - RunTaskResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.RunTaskResponse) + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); - if (object.job != null) { - if (typeof object.job !== "object") - throw TypeError(".google.cloud.dataplex.v1.RunTaskResponse.job: object expected"); - message.job = $root.google.cloud.dataplex.v1.Job.fromObject(object.job); - } + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + 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 RunTaskResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static - * @param {google.cloud.dataplex.v1.RunTaskResponse} message RunTaskResponse + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunTaskResponse.toObject = function toObject(message, options) { + ListAssetActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.job = null; - if (message.job != null && message.hasOwnProperty("job")) - object.job = $root.google.cloud.dataplex.v1.Job.toObject(message.job, options); + 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 RunTaskResponse to JSON. + * Converts this ListAssetActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @instance * @returns {Object.} JSON object */ - RunTaskResponse.prototype.toJSON = function toJSON() { + ListAssetActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RunTaskResponse + * Gets the default type url for ListAssetActionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RunTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; }; - return RunTaskResponse; + return ListAssetActionsRequest; })(); - v1.ListJobsRequest = (function() { + v1.GetAssetRequest = (function() { /** - * Properties of a ListJobsRequest. + * Properties of a GetAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsRequest - * @property {string|null} [parent] ListJobsRequest parent - * @property {number|null} [pageSize] ListJobsRequest pageSize - * @property {string|null} [pageToken] ListJobsRequest pageToken + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name */ /** - * Constructs a new ListJobsRequest. + * Constructs a new GetAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsRequest. - * @implements IListJobsRequest + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set */ - function ListJobsRequest(properties) { + function GetAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35113,103 +35993,75 @@ } /** - * ListJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.parent = ""; - - /** - * ListJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListJobsRequest - * @instance - */ - ListJobsRequest.prototype.pageSize = 0; - - /** - * ListJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @instance */ - ListJobsRequest.prototype.pageToken = ""; + GetAssetRequest.prototype.name = ""; /** - * Creates a new ListJobsRequest instance using the specified properties. + * Creates a new GetAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance */ - ListJobsRequest.create = function create(properties) { - return new ListJobsRequest(properties); + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); }; /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encode = function encode(message, writer) { + GetAssetRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer. + * Decodes a GetAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decode = function decode(reader, length) { + GetAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); 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(); + message.name = reader.string(); break; } default: @@ -35221,141 +36073,128 @@ }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsRequest message. + * Verifies a GetAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsRequest.verify = function verify(message) { + GetAssetRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest */ - ListJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); - 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); + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsRequest.toObject = function toObject(message, options) { + GetAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListJobsRequest to JSON. + * Converts this GetAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @instance * @returns {Object.} JSON object */ - ListJobsRequest.prototype.toJSON = function toJSON() { + GetAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobsRequest + * Gets the default type url for GetAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; }; - return ListJobsRequest; + return GetAssetRequest; })(); - v1.ListJobsResponse = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a ListJobsResponse. + * Properties of an OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsResponse - * @property {Array.|null} [jobs] ListJobsResponse jobs - * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new ListJobsResponse. + * Constructs a new OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsResponse. - * @implements IListJobsResponse + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set */ - function ListJobsResponse(properties) { - this.jobs = []; + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35363,92 +36202,159 @@ } /** - * ListJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - ListJobsResponse.prototype.jobs = $util.emptyArray; + OperationMetadata.prototype.createTime = null; /** - * ListJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - ListJobsResponse.prototype.nextPageToken = ""; + OperationMetadata.prototype.endTime = null; /** - * Creates a new ListJobsResponse instance using the specified properties. + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance */ - ListJobsResponse.create = function create(properties) { - return new ListJobsResponse(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.cloud.dataplex.v1.Job.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -35460,148 +36366,184 @@ }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsResponse message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsResponse.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata */ - ListJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); - } + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsResponse.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this ListJobsResponse to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - ListJobsResponse.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobsResponse + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; }; - return ListJobsResponse; + return OperationMetadata; })(); - v1.CancelJobRequest = (function() { + v1.CreateTaskRequest = (function() { /** - * Properties of a CancelJobRequest. + * Properties of a CreateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICancelJobRequest - * @property {string|null} [name] CancelJobRequest name + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly */ /** - * Constructs a new CancelJobRequest. + * Constructs a new CreateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CancelJobRequest. - * @implements ICancelJobRequest + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set */ - function CancelJobRequest(properties) { + function CreateTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35609,75 +36551,117 @@ } /** - * CancelJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * CreateTaskRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance */ - CancelJobRequest.prototype.name = ""; + CreateTaskRequest.prototype.parent = ""; /** - * Creates a new CancelJobRequest instance using the specified properties. + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskId = ""; + + /** + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.task = null; + + /** + * CreateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance */ - CancelJobRequest.create = function create(properties) { - return new CancelJobRequest(properties); + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); }; /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encode = function encode(message, writer) { + CreateTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer. + * Decodes a CreateTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decode = function decode(reader, length) { + CreateTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -35689,125 +36673,154 @@ }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelJobRequest message. + * Verifies a CreateTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelJobRequest.verify = function verify(message) { + CreateTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest */ - CancelJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static - * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelJobRequest.toObject = function toObject(message, options) { + CreateTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.taskId = ""; + object.task = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CancelJobRequest to JSON. + * Converts this CreateTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @instance * @returns {Object.} JSON object */ - CancelJobRequest.prototype.toJSON = function toJSON() { + CreateTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CancelJobRequest + * Gets the default type url for CreateTaskRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.CreateTaskRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; }; - return CancelJobRequest; + return CreateTaskRequest; })(); - v1.CreateEnvironmentRequest = (function() { + v1.UpdateTaskRequest = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of an UpdateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new UpdateTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set */ - function CreateEnvironmentRequest(properties) { + function UpdateTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35815,116 +36828,102 @@ } /** - * CreateEnvironmentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.parent = ""; - - /** - * CreateEnvironmentRequest environmentId. - * @member {string} environmentId - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * UpdateTaskRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - CreateEnvironmentRequest.prototype.environmentId = ""; + UpdateTaskRequest.prototype.updateMask = null; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - CreateEnvironmentRequest.prototype.environment = null; + UpdateTaskRequest.prototype.task = null; /** - * CreateEnvironmentRequest validateOnly. + * UpdateTaskRequest validateOnly. * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance */ - CreateEnvironmentRequest.prototype.validateOnly = false; + UpdateTaskRequest.prototype.validateOnly = false; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * Creates a new UpdateTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); }; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encode = function encode(message, writer) { + UpdateTaskRequest.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.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes an UpdateTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decode = function decode(reader, length) { + UpdateTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.environmentId = reader.string(); + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); break; } case 3: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 4: { message.validateOnly = reader.bool(); break; } @@ -35937,42 +36936,41 @@ }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies an UpdateTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEnvironmentRequest.verify = function verify(message) { + UpdateTaskRequest.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.environmentId != null && message.hasOwnProperty("environmentId")) - if (!$util.isString(message.environmentId)) - return "environmentId: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "environment." + error; + return "updateMask." + error; + } + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; } if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") @@ -35981,25 +36979,26 @@ }; /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environmentId != null) - message.environmentId = String(object.environmentId); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); } if (object.validateOnly != null) message.validateOnly = Boolean(object.validateOnly); @@ -36007,84 +37006,79 @@ }; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static - * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { + UpdateTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.environmentId = ""; - object.environment = null; + object.updateMask = null; + object.task = null; object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - object.environmentId = message.environmentId; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this UpdateTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @instance * @returns {Object.} JSON object */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + UpdateTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEnvironmentRequest + * Gets the default type url for UpdateTaskRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; }; - return CreateEnvironmentRequest; + return UpdateTaskRequest; })(); - v1.UpdateEnvironmentRequest = (function() { + v1.DeleteTaskRequest = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of a DeleteTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEnvironmentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name */ /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new DeleteTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set */ - function UpdateEnvironmentRequest(properties) { + function DeleteTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36092,103 +37086,75 @@ } /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.updateMask = null; - - /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.environment = null; - - /** - * UpdateEnvironmentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * DeleteTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @instance */ - UpdateEnvironmentRequest.prototype.validateOnly = false; + DeleteTaskRequest.prototype.name = ""; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new DeleteTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); }; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { + DeleteTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeleteTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { + DeleteTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); + message.name = reader.string(); break; } default: @@ -36200,149 +37166,126 @@ }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies a DeleteTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEnvironmentRequest.verify = function verify(message) { + DeleteTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static - * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { + DeleteTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.environment = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this DeleteTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @instance * @returns {Object.} JSON object */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + DeleteTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEnvironmentRequest + * Gets the default type url for DeleteTaskRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; }; - return UpdateEnvironmentRequest; + return DeleteTaskRequest; })(); - v1.DeleteEnvironmentRequest = (function() { + v1.ListTasksRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a ListTasksRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy */ /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new ListTasksRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set */ - function DeleteEnvironmentRequest(properties) { + function ListTasksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36350,75 +37293,131 @@ } /** - * DeleteEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * ListTasksRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance */ - DeleteEnvironmentRequest.prototype.name = ""; + ListTasksRequest.prototype.parent = ""; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * ListTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageSize = 0; + + /** + * ListTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageToken = ""; + + /** + * ListTasksRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.filter = ""; + + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; + + /** + * Creates a new ListTasksRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); }; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { + ListTasksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListTasksRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { + ListTasksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -36430,126 +37429,159 @@ }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a ListTasksRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEnvironmentRequest.verify = function verify(message) { + ListTasksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static - * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { + ListTasksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this ListTasksRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @instance * @returns {Object.} JSON object */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + ListTasksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEnvironmentRequest + * Gets the default type url for ListTasksRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListTasksRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; }; - return DeleteEnvironmentRequest; + return ListTasksRequest; })(); - v1.ListEnvironmentsRequest = (function() { + v1.ListTasksResponse = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Properties of a ListTasksResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken - * @property {string|null} [filter] ListEnvironmentsRequest filter - * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations */ /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new ListTasksResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set */ - function ListEnvironmentsRequest(properties) { + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36557,131 +37589,109 @@ } /** - * ListEnvironmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance */ - ListEnvironmentsRequest.prototype.parent = ""; + ListTasksResponse.prototype.tasks = $util.emptyArray; /** - * ListEnvironmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageSize = 0; - - /** - * ListEnvironmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageToken = ""; - - /** - * ListEnvironmentsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * ListTasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance */ - ListEnvironmentsRequest.prototype.filter = ""; + ListTasksResponse.prototype.nextPageToken = ""; /** - * ListEnvironmentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance */ - ListEnvironmentsRequest.prototype.orderBy = ""; + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListTasksResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); }; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encode = function encode(message, writer) { + ListTasksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); return writer; }; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListTasksResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decode = function decode(reader, length) { + ListTasksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); break; } default: @@ -36693,157 +37703,169 @@ }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListTasksResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsRequest.verify = function verify(message) { + ListTasksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); + if (error) + return "tasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } return null; }; /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } return message; }; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { + ListTasksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListTasksResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @instance * @returns {Object.} JSON object */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + ListTasksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsRequest + * Gets the default type url for ListTasksResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListTasksResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; }; - return ListEnvironmentsRequest; + return ListTasksResponse; })(); - v1.ListEnvironmentsResponse = (function() { + v1.GetTaskRequest = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of a GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name */ /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set */ - function ListEnvironmentsResponse(properties) { - this.environments = []; + function GetTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36851,92 +37873,75 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - - /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @instance */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; + GetTaskRequest.prototype.name = ""; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new GetTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); }; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encode = function encode(message, writer) { + GetTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dataplex.v1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a GetTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decode = function decode(reader, length) { + GetTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -36948,148 +37953,122 @@ }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a GetTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsResponse.verify = function verify(message) { + GetTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { + GetTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.environments = []; if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this GetTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @instance * @returns {Object.} JSON object */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + GetTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsResponse + * Gets the default type url for GetTaskRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; }; - return ListEnvironmentsResponse; + return GetTaskRequest; })(); - v1.GetEnvironmentRequest = (function() { + v1.GetJobRequest = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of a GetJobRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name */ /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new GetJobRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set */ - function GetEnvironmentRequest(properties) { + function GetJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37097,35 +38076,35 @@ } /** - * GetEnvironmentRequest name. + * GetJobRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @instance */ - GetEnvironmentRequest.prototype.name = ""; + GetJobRequest.prototype.name = ""; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * Creates a new GetJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); }; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encode = function encode(message, writer) { + GetJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -37134,33 +38113,33 @@ }; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decode = function decode(reader, length) { + GetJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -37177,30 +38156,30 @@ }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a GetJobRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnvironmentRequest.verify = function verify(message) { + GetJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -37210,32 +38189,32 @@ }; /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentRequest.toObject = function toObject(message, options) { + GetJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -37247,55 +38226,56 @@ }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this GetJobRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @instance * @returns {Object.} JSON object */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { + GetJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEnvironmentRequest + * Gets the default type url for GetJobRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; }; - return GetEnvironmentRequest; + return GetJobRequest; })(); - v1.ListSessionsRequest = (function() { + v1.RunTaskRequest = (function() { /** - * Properties of a ListSessionsRequest. + * Properties of a RunTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsRequest - * @property {string|null} [parent] ListSessionsRequest parent - * @property {number|null} [pageSize] ListSessionsRequest pageSize - * @property {string|null} [pageToken] ListSessionsRequest pageToken - * @property {string|null} [filter] ListSessionsRequest filter + * @interface IRunTaskRequest + * @property {string|null} [name] RunTaskRequest name + * @property {Object.|null} [labels] RunTaskRequest labels + * @property {Object.|null} [args] RunTaskRequest args */ /** - * Constructs a new ListSessionsRequest. + * Constructs a new RunTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsRequest. - * @implements IListSessionsRequest + * @classdesc Represents a RunTaskRequest. + * @implements IRunTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set */ - function ListSessionsRequest(properties) { + function RunTaskRequest(properties) { + this.labels = {}; + this.args = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37303,117 +38283,143 @@ } /** - * ListSessionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.parent = ""; - - /** - * ListSessionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * RunTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @instance */ - ListSessionsRequest.prototype.pageSize = 0; + RunTaskRequest.prototype.name = ""; /** - * ListSessionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * RunTaskRequest labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @instance */ - ListSessionsRequest.prototype.pageToken = ""; + RunTaskRequest.prototype.labels = $util.emptyObject; /** - * ListSessionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * RunTaskRequest args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @instance */ - ListSessionsRequest.prototype.filter = ""; + RunTaskRequest.prototype.args = $util.emptyObject; /** - * Creates a new ListSessionsRequest instance using the specified properties. + * Creates a new RunTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest instance */ - ListSessionsRequest.create = function create(properties) { - return new ListSessionsRequest(properties); + RunTaskRequest.create = function create(properties) { + return new RunTaskRequest(properties); }; /** - * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsRequest.encode = function encode(message, writer) { + RunTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + RunTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer. + * Decodes a RunTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsRequest.decode = function decode(reader, length) { + RunTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskRequest(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); + message.name = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + 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 4: { - message.filter = reader.string(); + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; break; } default: @@ -37425,149 +38431,167 @@ }; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. + * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { + RunTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionsRequest message. + * Verifies a RunTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionsRequest.verify = function verify(message) { + RunTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } return null; }; /** - * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest */ - ListSessionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) + RunTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); - 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); + var message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.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.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskRequest.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } return message; }; /** - * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static - * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest + * @param {google.cloud.dataplex.v1.RunTaskRequest} message RunTaskRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionsRequest.toObject = function toObject(message, options) { + RunTaskRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + if (options.objects || options.defaults) { + object.labels = {}; + object.args = {}; + } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; } - 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 ListSessionsRequest to JSON. + * Converts this RunTaskRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @instance * @returns {Object.} JSON object */ - ListSessionsRequest.prototype.toJSON = function toJSON() { + RunTaskRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionsRequest + * Gets the default type url for RunTaskRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.RunTaskRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskRequest"; }; - return ListSessionsRequest; + return RunTaskRequest; })(); - v1.ListSessionsResponse = (function() { + v1.RunTaskResponse = (function() { /** - * Properties of a ListSessionsResponse. + * Properties of a RunTaskResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsResponse - * @property {Array.|null} [sessions] ListSessionsResponse sessions - * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken + * @interface IRunTaskResponse + * @property {google.cloud.dataplex.v1.IJob|null} [job] RunTaskResponse job */ /** - * Constructs a new ListSessionsResponse. + * Constructs a new RunTaskResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsResponse. - * @implements IListSessionsResponse + * @classdesc Represents a RunTaskResponse. + * @implements IRunTaskResponse * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set */ - function ListSessionsResponse(properties) { - this.sessions = []; + function RunTaskResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37575,92 +38599,75 @@ } /** - * ListSessionsResponse sessions. - * @member {Array.} sessions - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @instance - */ - ListSessionsResponse.prototype.sessions = $util.emptyArray; - - /** - * ListSessionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * RunTaskResponse job. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} job + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @instance */ - ListSessionsResponse.prototype.nextPageToken = ""; + RunTaskResponse.prototype.job = null; /** - * Creates a new ListSessionsResponse instance using the specified properties. + * Creates a new RunTaskResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse instance */ - ListSessionsResponse.create = function create(properties) { - return new ListSessionsResponse(properties); + RunTaskResponse.create = function create(properties) { + return new RunTaskResponse(properties); }; /** - * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsResponse.encode = function encode(message, writer) { + RunTaskResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessions != null && message.sessions.length) - for (var i = 0; i < message.sessions.length; ++i) - $root.google.cloud.dataplex.v1.Session.encode(message.sessions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.dataplex.v1.Job.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + RunTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer. + * Decodes a RunTaskResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsResponse.decode = function decode(reader, length) { + RunTaskResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sessions && message.sessions.length)) - message.sessions = []; - message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.job = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); break; } default: @@ -37672,161 +38679,129 @@ }; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { + RunTaskResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionsResponse message. + * Verifies a RunTaskResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionsResponse.verify = function verify(message) { + RunTaskResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessions != null && message.hasOwnProperty("sessions")) { - if (!Array.isArray(message.sessions)) - return "sessions: array expected"; - for (var i = 0; i < message.sessions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); - if (error) - return "sessions." + error; - } + if (message.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.job); + if (error) + return "job." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse */ - ListSessionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) + RunTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); - if (object.sessions) { - if (!Array.isArray(object.sessions)) - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); - message.sessions = []; - for (var i = 0; i < object.sessions.length; ++i) { - if (typeof object.sessions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); - message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); - } + var message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskResponse.job: object expected"); + message.job = $root.google.cloud.dataplex.v1.Job.fromObject(object.job); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static - * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse + * @param {google.cloud.dataplex.v1.RunTaskResponse} message RunTaskResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionsResponse.toObject = function toObject(message, options) { + RunTaskResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sessions = []; if (options.defaults) - object.nextPageToken = ""; - if (message.sessions && message.sessions.length) { - object.sessions = []; - for (var j = 0; j < message.sessions.length; ++j) - object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.job = null; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.dataplex.v1.Job.toObject(message.job, options); return object; }; /** - * Converts this ListSessionsResponse to JSON. + * Converts this RunTaskResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @instance * @returns {Object.} JSON object */ - ListSessionsResponse.prototype.toJSON = function toJSON() { + RunTaskResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionsResponse + * Gets the default type url for RunTaskResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.RunTaskResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RunTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskResponse"; }; - return ListSessionsResponse; + return RunTaskResponse; })(); - v1.Task = (function() { + v1.ListJobsRequest = (function() { /** - * Properties of a Task. + * Properties of a ListJobsRequest. * @memberof google.cloud.dataplex.v1 - * @interface ITask - * @property {string|null} [name] Task name - * @property {string|null} [uid] Task uid - * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime - * @property {string|null} [description] Task description - * @property {string|null} [displayName] Task displayName - * @property {google.cloud.dataplex.v1.State|null} [state] Task state - * @property {Object.|null} [labels] Task labels - * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus - * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark - * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken */ /** - * Constructs a new Task. + * Constructs a new ListJobsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Task. - * @implements ITask + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest * @constructor - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set */ - function Task(properties) { - this.labels = {}; + function ListJobsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37834,277 +38809,342 @@ } /** - * Task name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Task + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - Task.prototype.name = ""; + ListJobsRequest.prototype.parent = ""; /** - * Task uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Task + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - Task.prototype.uid = ""; + ListJobsRequest.prototype.pageSize = 0; /** - * Task createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Task + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance */ - Task.prototype.createTime = null; + ListJobsRequest.prototype.pageToken = ""; /** - * Task updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance */ - Task.prototype.updateTime = null; + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; /** - * Task description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Task.prototype.description = ""; + ListJobsRequest.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; + }; /** - * Task displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Task.prototype.displayName = ""; + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Task state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.prototype.state = 0; + ListJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + 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; + }; /** - * Task labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.prototype.labels = $util.emptyObject; + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Task triggerSpec. - * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Task.prototype.triggerSpec = null; + ListJobsRequest.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; + }; /** - * Task executionSpec. - * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest */ - Task.prototype.executionSpec = null; + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + 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; + }; /** - * Task executionStatus. - * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Task.prototype.executionStatus = null; + ListJobsRequest.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; + }; /** - * Task spark. - * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark - * @memberof google.cloud.dataplex.v1.Task + * Converts this ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsRequest * @instance + * @returns {Object.} JSON object */ - Task.prototype.spark = null; + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Task notebook. - * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook - * @memberof google.cloud.dataplex.v1.Task - * @instance + * Gets the default type url for ListJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Task.prototype.notebook = null; + ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return ListJobsRequest; + })(); + + v1.ListJobsResponse = (function() { /** - * Task config. - * @member {"spark"|"notebook"|undefined} config - * @memberof google.cloud.dataplex.v1.Task + * Properties of a ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ + + /** + * Constructs a new ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + */ + function ListJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @instance */ - Object.defineProperty(Task.prototype, "config", { - get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListJobsResponse.prototype.jobs = $util.emptyArray; /** - * Creates a new Task instance using the specified properties. + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task} Task instance + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance */ - Task.create = function create(properties) { - return new Task(properties); + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); }; /** - * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Task.encode = function encode(message, writer) { + ListJobsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) - $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) - $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) - $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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 Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Task.encodeDelimited = function encodeDelimited(message, writer) { + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Task message from the specified reader or buffer. + * Decodes a ListJobsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.decode = function decode(reader, length) { + ListJobsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); break; } case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 100: { - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); - break; - } - case 101: { - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); - break; - } - case 201: { - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); - break; - } - case 300: { - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); - break; - } - case 302: { - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } default: @@ -38116,3194 +39156,7043 @@ }; /** - * Decodes a Task message from the specified reader or buffer, length delimited. + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.decodeDelimited = function decodeDelimited(reader) { + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Task message. + * Verifies a ListJobsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Task.verify = function verify(message) { + ListJobsResponse.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); - if (error) - return "triggerSpec." + error; } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); - if (error) - return "executionSpec." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } } - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); - if (error) - return "executionStatus." + error; + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); } - if (message.spark != null && message.hasOwnProperty("spark")) { - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); - if (error) - return "spark." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - if (properties.config === 1) - return "config: multiple values"; - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); - if (error) - return "notebook." + error; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + }; + + return ListJobsResponse; + })(); + + v1.CancelJobRequest = (function() { + + /** + * Properties of a CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name + */ + + /** + * Constructs a new CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + */ + function CancelJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @instance + */ + CancelJobRequest.prototype.name = ""; + + /** + * Creates a new CancelJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + */ + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); + }; + + /** + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encode = function encode(message, writer) { + 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 CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + 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 CancelJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelJobRequest.verify = function verify(message) { + if (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 Task message from a plain object. Also converts values to their respective internal types. + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest */ - Task.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task) + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) return object; - var message = new $root.google.cloud.dataplex.v1.Task(); + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); if (object.name != null) message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.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.dataplex.v1.Task.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.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.triggerSpec != null) { - if (typeof object.triggerSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); - } - if (object.executionStatus != null) { - if (typeof object.executionStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); - } - if (object.spark != null) { - if (typeof object.spark !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); - } - if (object.notebook != null) { - if (typeof object.notebook !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); - } return message; }; /** - * Creates a plain object from a Task message. Also converts values to other types if specified. + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static - * @param {google.cloud.dataplex.v1.Task} message Task + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Task.toObject = function toObject(message, options) { + CancelJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.triggerSpec = null; - object.executionSpec = null; - object.executionStatus = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) - object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) - object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); - if (message.spark != null && message.hasOwnProperty("spark")) { - object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); - if (options.oneofs) - object.config = "spark"; - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); - if (options.oneofs) - object.config = "notebook"; - } return object; }; /** - * Converts this Task to JSON. + * Converts this CancelJobRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @instance * @returns {Object.} JSON object */ - Task.prototype.toJSON = function toJSON() { + CancelJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Task + * Gets the default type url for CancelJobRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; }; - Task.InfrastructureSpec = (function() { + return CancelJobRequest; + })(); - /** - * Properties of an InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IInfrastructureSpec - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork - */ + v1.CreateEnvironmentRequest = (function() { - /** - * Constructs a new InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an InfrastructureSpec. - * @implements IInfrastructureSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - */ - function InfrastructureSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly + */ - /** - * InfrastructureSpec batch. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.batch = null; + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * InfrastructureSpec containerImage. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.containerImage = null; + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; - /** - * InfrastructureSpec vpcNetwork. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.vpcNetwork = null; + /** + * CreateEnvironmentRequest environmentId. + * @member {string} environmentId + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environmentId = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; - /** - * InfrastructureSpec resources. - * @member {"batch"|undefined} resources - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "resources", { - get: $util.oneOfGetter($oneOfFields = ["batch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec runtime. - * @member {"containerImage"|undefined} runtime - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "runtime", { - get: $util.oneOfGetter($oneOfFields = ["containerImage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec network. - * @member {"vpcNetwork"|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "network", { - get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * CreateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.validateOnly = false; - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance - */ - InfrastructureSpec.create = function create(properties) { - return new InfrastructureSpec(properties); - }; + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 52: { - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); - break; - } - case 101: { - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); - break; - } - case 150: { - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; } - } - return message; - }; - - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InfrastructureSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InfrastructureSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - properties.resources = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); - if (error) - return "batch." + error; + case 2: { + message.environmentId = reader.string(); + break; } - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - properties.runtime = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); - if (error) - return "containerImage." + error; + case 3: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; } - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - properties.network = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); - if (error) - return "vpcNetwork." + error; + case 4: { + message.validateOnly = reader.bool(); + break; } + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - */ - InfrastructureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - if (object.batch != null) { - if (typeof object.batch !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); - } - if (object.containerImage != null) { - if (typeof object.containerImage !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); - } - if (object.vpcNetwork != null) { - if (typeof object.vpcNetwork !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); - } - return message; - }; + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InfrastructureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); - if (options.oneofs) - object.resources = "batch"; - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); - if (options.oneofs) - object.runtime = "containerImage"; - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); - if (options.oneofs) - object.network = "vpcNetwork"; - } + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + if (!$util.isString(message.environmentId)) + return "environmentId: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) return object; - }; + var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environmentId != null) + message.environmentId = String(object.environmentId); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - /** - * Converts this InfrastructureSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - * @returns {Object.} JSON object - */ - InfrastructureSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environmentId = ""; + object.environment = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + object.environmentId = message.environmentId; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - /** - * Gets the default type url for InfrastructureSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; - }; + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - InfrastructureSpec.BatchComputeResources = (function() { + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + }; - /** - * Properties of a BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IBatchComputeResources - * @property {number|null} [executorsCount] BatchComputeResources executorsCount - * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount - */ + return CreateEnvironmentRequest; + })(); - /** - * Constructs a new BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a BatchComputeResources. - * @implements IBatchComputeResources - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - */ - function BatchComputeResources(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.UpdateEnvironmentRequest = (function() { - /** - * BatchComputeResources executorsCount. - * @member {number} executorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.executorsCount = 0; + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEnvironmentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly + */ - /** - * BatchComputeResources maxExecutorsCount. - * @member {number} maxExecutorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.maxExecutorsCount = 0; + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new BatchComputeResources instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance - */ - BatchComputeResources.create = function create(properties) { - return new BatchComputeResources(properties); - }; - - /** - * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); - if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); - return writer; - }; + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; - /** - * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; - /** - * Decodes a BatchComputeResources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.executorsCount = reader.int32(); - break; - } - case 2: { - message.maxExecutorsCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * UpdateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.validateOnly = false; - /** - * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; - /** - * Verifies a BatchComputeResources message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchComputeResources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - if (!$util.isInteger(message.executorsCount)) - return "executorsCount: integer expected"; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - if (!$util.isInteger(message.maxExecutorsCount)) - return "maxExecutorsCount: integer expected"; - return null; - }; + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; - /** - * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - */ - BatchComputeResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - if (object.executorsCount != null) - message.executorsCount = object.executorsCount | 0; - if (object.maxExecutorsCount != null) - message.maxExecutorsCount = object.maxExecutorsCount | 0; - return message; - }; + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchComputeResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.executorsCount = 0; - object.maxExecutorsCount = 0; + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; } - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - object.executorsCount = message.executorsCount; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - object.maxExecutorsCount = message.maxExecutorsCount; - return object; - }; - - /** - * Converts this BatchComputeResources to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - * @returns {Object.} JSON object - */ - BatchComputeResources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchComputeResources - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + case 2: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; - }; - - return BatchComputeResources; - })(); + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - InfrastructureSpec.ContainerImageRuntime = (function() { + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IContainerImageRuntime - * @property {string|null} [image] ContainerImageRuntime image - * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars - * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages - * @property {Object.|null} [properties] ContainerImageRuntime properties - */ + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * Constructs a new ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a ContainerImageRuntime. - * @implements IContainerImageRuntime - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - */ - function ContainerImageRuntime(properties) { - this.javaJars = []; - this.pythonPackages = []; - this.properties = {}; - if (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 an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - /** - * ContainerImageRuntime image. - * @member {string} image - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.image = ""; + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.environment = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - /** - * ContainerImageRuntime javaJars. - * @member {Array.} javaJars - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.javaJars = $util.emptyArray; + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ContainerImageRuntime pythonPackages. - * @member {Array.} pythonPackages - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + }; - /** - * ContainerImageRuntime properties. - * @member {Object.} properties - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.properties = $util.emptyObject; + return UpdateEnvironmentRequest; + })(); - /** - * Creates a new ContainerImageRuntime instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance - */ - ContainerImageRuntime.create = function create(properties) { - return new ContainerImageRuntime(properties); - }; + v1.DeleteEnvironmentRequest = (function() { - /** - * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); - if (message.javaJars != null && message.javaJars.length) - for (var i = 0; i < message.javaJars.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); - if (message.pythonPackages != null && message.pythonPackages.length) - for (var i = 0; i < message.pythonPackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); - if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); - return writer; - }; + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ - /** - * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.image = reader.string(); - break; - } - case 2: { - if (!(message.javaJars && message.javaJars.length)) - message.javaJars = []; - message.javaJars.push(reader.string()); - break; - } - case 3: { - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - } - case 4: { - if (message.properties === $util.emptyObject) - message.properties = {}; - 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.properties[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; - /** - * Verifies a ContainerImageRuntime message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContainerImageRuntime.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) - if (!$util.isString(message.image)) - return "image: string expected"; - if (message.javaJars != null && message.hasOwnProperty("javaJars")) { - if (!Array.isArray(message.javaJars)) - return "javaJars: array expected"; - for (var i = 0; i < message.javaJars.length; ++i) - if (!$util.isString(message.javaJars[i])) - return "javaJars: string[] expected"; - } - if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { - if (!Array.isArray(message.pythonPackages)) - return "pythonPackages: array expected"; - for (var i = 0; i < message.pythonPackages.length; ++i) - if (!$util.isString(message.pythonPackages[i])) - return "pythonPackages: string[] expected"; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.properties[key[i]])) - return "properties: string{k:string} expected"; - } - return null; - }; + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - */ - ContainerImageRuntime.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); - if (object.image != null) - message.image = String(object.image); - if (object.javaJars) { - if (!Array.isArray(object.javaJars)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); - message.javaJars = []; - for (var i = 0; i < object.javaJars.length; ++i) - message.javaJars[i] = String(object.javaJars[i]); - } - if (object.pythonPackages) { - if (!Array.isArray(object.pythonPackages)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); - message.pythonPackages = []; - for (var i = 0; i < object.pythonPackages.length; ++i) - message.pythonPackages[i] = String(object.pythonPackages[i]); - } - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) - message.properties[keys[i]] = String(object.properties[keys[i]]); - } - return message; - }; + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContainerImageRuntime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.javaJars = []; - object.pythonPackages = []; - } - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - object.image = ""; - if (message.image != null && message.hasOwnProperty("image")) - object.image = message.image; - if (message.javaJars && message.javaJars.length) { - object.javaJars = []; - for (var j = 0; j < message.javaJars.length; ++j) - object.javaJars[j] = message.javaJars[j]; - } - if (message.pythonPackages && message.pythonPackages.length) { - object.pythonPackages = []; - for (var j = 0; j < message.pythonPackages.length; ++j) - object.pythonPackages[j] = message.pythonPackages[j]; - } - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = message.properties[keys2[j]]; + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return object; - }; - - /** - * Converts this ContainerImageRuntime to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - * @returns {Object.} JSON object - */ - ContainerImageRuntime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for ContainerImageRuntime - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; - }; + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return ContainerImageRuntime; - })(); + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - InfrastructureSpec.VpcNetwork = (function() { + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of a VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IVpcNetwork - * @property {string|null} [network] VpcNetwork network - * @property {string|null} [subNetwork] VpcNetwork subNetwork - * @property {Array.|null} [networkTags] VpcNetwork networkTags - */ + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Constructs a new VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a VpcNetwork. - * @implements IVpcNetwork - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set - */ - function VpcNetwork(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * VpcNetwork network. - * @member {string|null|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.network = null; + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + }; - /** - * VpcNetwork subNetwork. - * @member {string|null|undefined} subNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.subNetwork = null; + return DeleteEnvironmentRequest; + })(); - /** - * VpcNetwork networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.networkTags = $util.emptyArray; + v1.ListEnvironmentsRequest = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @property {string|null} [filter] ListEnvironmentsRequest filter + * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy + */ - /** - * VpcNetwork networkName. - * @member {"network"|"subNetwork"|undefined} networkName - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - Object.defineProperty(VpcNetwork.prototype, "networkName", { - get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new VpcNetwork instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance - */ - VpcNetwork.create = function create(properties) { - return new VpcNetwork(properties); - }; + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; - /** - * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcNetwork.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); - return writer; - }; + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; - /** - * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; - /** - * Decodes a VpcNetwork message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcNetwork.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subNetwork = reader.string(); - break; - } - case 3: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListEnvironmentsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.filter = ""; - /** - * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcNetwork.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListEnvironmentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.orderBy = ""; - /** - * Verifies a VpcNetwork message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcNetwork.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties.networkName = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - if (properties.networkName === 1) - return "networkName: multiple values"; - properties.networkName = 1; - if (!$util.isString(message.subNetwork)) - return "subNetwork: string expected"; - } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - return null; - }; + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; - /** - * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - */ - VpcNetwork.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); - if (object.network != null) - message.network = String(object.network); - if (object.subNetwork != null) - message.subNetwork = String(object.subNetwork); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - return message; - }; + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; - /** - * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcNetwork.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object.networkName = "network"; + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - object.subNetwork = message.subNetwork; - if (options.oneofs) - object.networkName = "subNetwork"; + case 2: { + message.pageSize = reader.int32(); + break; } - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; + case 3: { + message.pageToken = reader.string(); + break; } - return object; - }; - - /** - * Converts this VpcNetwork to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - * @returns {Object.} JSON object - */ - VpcNetwork.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcNetwork - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + case 4: { + message.filter = reader.string(); + break; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; - }; - - return VpcNetwork; - })(); + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return InfrastructureSpec; - })(); + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - Task.TriggerSpec = (function() { + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; - /** - * Properties of a TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface ITriggerSpec - * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type - * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime - * @property {boolean|null} [disabled] TriggerSpec disabled - * @property {number|null} [maxRetries] TriggerSpec maxRetries - * @property {string|null} [schedule] TriggerSpec schedule - */ + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; - /** - * Constructs a new TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a TriggerSpec. - * @implements ITriggerSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set - */ - function TriggerSpec(properties) { - if (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 plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; - /** - * TriggerSpec type. - * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.type = 0; - - /** - * TriggerSpec startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.startTime = null; + /** + * Converts this ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * TriggerSpec disabled. - * @member {boolean} disabled - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.disabled = false; + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + }; - /** - * TriggerSpec maxRetries. - * @member {number} maxRetries - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.maxRetries = 0; + return ListEnvironmentsRequest; + })(); - /** - * TriggerSpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.schedule = null; + v1.ListEnvironmentsResponse = (function() { - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ - /** - * TriggerSpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - Object.defineProperty(TriggerSpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new TriggerSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance - */ - TriggerSpec.create = function create(properties) { - return new TriggerSpec(properties); - }; + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - /** - * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); - return writer; - }; + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; - /** - * Decodes a TriggerSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.disabled = reader.bool(); - break; - } - case 7: { - message.maxRetries = reader.int32(); - break; - } - case 100: { - message.schedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dataplex.v1.Environment.encode(message.environments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a TriggerSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggerSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); break; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - if (!$util.isInteger(message.maxRetries)) - return "maxRetries: integer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; - } - return null; - }; - - /** - * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec - */ - TriggerSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ON_DEMAND": - case 1: - message.type = 1; - break; - case "RECURRING": - case 2: - message.type = 2; - break; - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.maxRetries != null) - message.maxRetries = object.maxRetries | 0; - if (object.schedule != null) - message.schedule = String(object.schedule); - return message; - }; - - /** - * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggerSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.disabled = false; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.startTime = null; - object.maxRetries = 0; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - object.maxRetries = message.maxRetries; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; } - return object; - }; + } + return message; + }; - /** - * Converts this TriggerSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - * @returns {Object.} JSON object - */ - TriggerSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for TriggerSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; - }; - - /** - * Type enum. - * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ON_DEMAND=1 ON_DEMAND value - * @property {number} RECURRING=2 RECURRING value - */ - TriggerSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ON_DEMAND"] = 1; - values[valuesById[2] = "RECURRING"] = 2; - return values; - })(); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - return TriggerSpec; - })(); + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - Task.ExecutionSpec = (function() { + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Properties of an ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionSpec - * @property {Object.|null} [args] ExecutionSpec args - * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount - * @property {string|null} [project] ExecutionSpec project - * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime - * @property {string|null} [kmsKey] ExecutionSpec kmsKey - */ + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionSpec. - * @implements IExecutionSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set - */ - function ExecutionSpec(properties) { - this.args = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + }; - /** - * ExecutionSpec args. - * @member {Object.} args - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.args = $util.emptyObject; - - /** - * ExecutionSpec serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.serviceAccount = ""; + return ListEnvironmentsResponse; + })(); - /** - * ExecutionSpec project. - * @member {string} project - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.project = ""; + v1.GetEnvironmentRequest = (function() { - /** - * ExecutionSpec maxJobExecutionLifetime. - * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.maxJobExecutionLifetime = null; + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ - /** - * ExecutionSpec kmsKey. - * @member {string} kmsKey - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.kmsKey = ""; + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ExecutionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance - */ - ExecutionSpec.create = function create(properties) { - return new ExecutionSpec(properties); - }; + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; - /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.args != null && Object.hasOwnProperty.call(message, "args")) - for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); - if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) - $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); - return writer; - }; + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; - /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Decodes an ExecutionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - if (message.args === $util.emptyObject) - message.args = {}; - 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.args[key] = value; - break; - } - case 5: { - message.serviceAccount = reader.string(); - break; - } - case 7: { - message.project = reader.string(); - break; - } - case 8: { - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 9: { - message.kmsKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies an ExecutionSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!$util.isObject(message.args)) - return "args: object expected"; - var key = Object.keys(message.args); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.args[key[i]])) - return "args: string{k:string} expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { - var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); - if (error) - return "maxJobExecutionLifetime." + error; - } - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - if (!$util.isString(message.kmsKey)) - return "kmsKey: string expected"; - return null; - }; + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec - */ - ExecutionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); - if (object.args) { - if (typeof object.args !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); - message.args = {}; - for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) - message.args[keys[i]] = String(object.args[keys[i]]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.project != null) - message.project = String(object.project); - if (object.maxJobExecutionLifetime != null) { - if (typeof object.maxJobExecutionLifetime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); - } - if (object.kmsKey != null) - message.kmsKey = String(object.kmsKey); - return message; - }; + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.args = {}; - if (options.defaults) { - object.serviceAccount = ""; - object.project = ""; - object.maxJobExecutionLifetime = null; - object.kmsKey = ""; - } - var keys2; - if (message.args && (keys2 = Object.keys(message.args)).length) { - object.args = {}; - for (var j = 0; j < keys2.length; ++j) - object.args[keys2[j]] = message.args[keys2[j]]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) - object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - object.kmsKey = message.kmsKey; + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) return object; - }; - - /** - * Converts this ExecutionSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - * @returns {Object.} JSON object - */ - ExecutionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; - }; - - return ExecutionSpec; - })(); + var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - Task.SparkTaskConfig = (function() { + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Properties of a SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface ISparkTaskConfig - * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri - * @property {string|null} [mainClass] SparkTaskConfig mainClass - * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile - * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile - * @property {string|null} [sqlScript] SparkTaskConfig sqlScript - * @property {Array.|null} [fileUris] SparkTaskConfig fileUris - * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec - */ + /** + * Converts this GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a SparkTaskConfig. - * @implements ISparkTaskConfig - * @constructor - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set - */ - function SparkTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; + }; - /** - * SparkTaskConfig mainJarFileUri. - * @member {string|null|undefined} mainJarFileUri - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainJarFileUri = null; + return GetEnvironmentRequest; + })(); - /** - * SparkTaskConfig mainClass. - * @member {string|null|undefined} mainClass - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainClass = null; + v1.ListSessionsRequest = (function() { - /** - * SparkTaskConfig pythonScriptFile. - * @member {string|null|undefined} pythonScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.pythonScriptFile = null; + /** + * Properties of a ListSessionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListSessionsRequest + * @property {string|null} [parent] ListSessionsRequest parent + * @property {number|null} [pageSize] ListSessionsRequest pageSize + * @property {string|null} [pageToken] ListSessionsRequest pageToken + * @property {string|null} [filter] ListSessionsRequest filter + */ - /** - * SparkTaskConfig sqlScriptFile. - * @member {string|null|undefined} sqlScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScriptFile = null; - - /** - * SparkTaskConfig sqlScript. - * @member {string|null|undefined} sqlScript - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScript = null; - - /** - * SparkTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.fileUris = $util.emptyArray; + /** + * Constructs a new ListSessionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListSessionsRequest. + * @implements IListSessionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + */ + function ListSessionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SparkTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + /** + * ListSessionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.parent = ""; - /** - * SparkTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.infrastructureSpec = null; + /** + * ListSessionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.pageSize = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ListSessionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.pageToken = ""; - /** - * SparkTaskConfig driver. - * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - Object.defineProperty(SparkTaskConfig.prototype, "driver", { - get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListSessionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.filter = ""; - /** - * Creates a new SparkTaskConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance - */ - SparkTaskConfig.create = function create(properties) { - return new SparkTaskConfig(properties); - }; + /** + * Creates a new ListSessionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance + */ + ListSessionsRequest.create = function create(properties) { + return new ListSessionsRequest(properties); + }; - /** - * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkTaskConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); - if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); - if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); - if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); - if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); - return writer; - }; + /** + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsRequest.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 SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkTaskConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 100: { - message.mainJarFileUri = reader.string(); - break; - } - case 101: { - message.mainClass = reader.string(); - break; - } - case 102: { - message.pythonScriptFile = reader.string(); - break; - } - case 104: { - message.sqlScriptFile = reader.string(); - break; - } - case 105: { - message.sqlScript = reader.string(); - break; - } - case 3: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 4: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - } - case 6: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListSessionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + 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; - }; + } + return message; + }; - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SparkTaskConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkTaskConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - properties.driver = 1; - if (!$util.isString(message.mainJarFileUri)) - return "mainJarFileUri: string expected"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.mainClass)) - return "mainClass: string expected"; - } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.pythonScriptFile)) - return "pythonScriptFile: string expected"; - } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScriptFile)) - return "sqlScriptFile: string expected"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScript)) - return "sqlScript: string expected"; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - return null; - }; + /** + * Verifies a ListSessionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionsRequest.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 SparkTaskConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - */ - SparkTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); - if (object.mainJarFileUri != null) - message.mainJarFileUri = String(object.mainJarFileUri); - if (object.mainClass != null) - message.mainClass = String(object.mainClass); - if (object.pythonScriptFile != null) - message.pythonScriptFile = String(object.pythonScriptFile); - if (object.sqlScriptFile != null) - message.sqlScriptFile = String(object.sqlScriptFile); - if (object.sqlScript != null) - message.sqlScript = String(object.sqlScript); - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - return message; - }; + /** + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + */ + ListSessionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + 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 SparkTaskConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SparkTaskConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) - object.infrastructureSpec = null; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - object.mainJarFileUri = message.mainJarFileUri; - if (options.oneofs) - object.driver = "mainJarFileUri"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - object.mainClass = message.mainClass; - if (options.oneofs) + /** + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionsRequest.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 ListSessionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSessionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSessionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; + }; + + return ListSessionsRequest; + })(); + + v1.ListSessionsResponse = (function() { + + /** + * Properties of a ListSessionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListSessionsResponse + * @property {Array.|null} [sessions] ListSessionsResponse sessions + * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken + */ + + /** + * Constructs a new ListSessionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListSessionsResponse. + * @implements IListSessionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + */ + function ListSessionsResponse(properties) { + this.sessions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSessionsResponse sessions. + * @member {Array.} sessions + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.sessions = $util.emptyArray; + + /** + * ListSessionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSessionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance + */ + ListSessionsResponse.create = function create(properties) { + return new ListSessionsResponse(properties); + }; + + /** + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessions != null && message.sessions.length) + for (var i = 0; i < message.sessions.length; ++i) + $root.google.cloud.dataplex.v1.Session.encode(message.sessions[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 ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.sessions && message.sessions.length)) + message.sessions = []; + message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSessionsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSessionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessions != null && message.hasOwnProperty("sessions")) { + if (!Array.isArray(message.sessions)) + return "sessions: array expected"; + for (var i = 0; i < message.sessions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); + if (error) + return "sessions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + */ + ListSessionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + if (object.sessions) { + if (!Array.isArray(object.sessions)) + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); + message.sessions = []; + for (var i = 0; i < object.sessions.length; ++i) { + if (typeof object.sessions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); + message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sessions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.sessions && message.sessions.length) { + object.sessions = []; + for (var j = 0; j < message.sessions.length; ++j) + object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSessionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSessionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSessionsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; + }; + + return ListSessionsResponse; + })(); + + v1.Task = (function() { + + /** + * Properties of a Task. + * @memberof google.cloud.dataplex.v1 + * @interface ITask + * @property {string|null} [name] Task name + * @property {string|null} [uid] Task uid + * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime + * @property {string|null} [description] Task description + * @property {string|null} [displayName] Task displayName + * @property {google.cloud.dataplex.v1.State|null} [state] Task state + * @property {Object.|null} [labels] Task labels + * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus + * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook + */ + + /** + * Constructs a new Task. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Task. + * @implements ITask + * @constructor + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + */ + function Task(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]]; + } + + /** + * Task name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.name = ""; + + /** + * Task uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.uid = ""; + + /** + * Task createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.createTime = null; + + /** + * Task updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.updateTime = null; + + /** + * Task description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.description = ""; + + /** + * Task displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.displayName = ""; + + /** + * Task state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.state = 0; + + /** + * Task labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.labels = $util.emptyObject; + + /** + * Task triggerSpec. + * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.triggerSpec = null; + + /** + * Task executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionSpec = null; + + /** + * Task executionStatus. + * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionStatus = null; + + /** + * Task spark. + * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.spark = null; + + /** + * Task notebook. + * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.notebook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Task config. + * @member {"spark"|"notebook"|undefined} config + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Object.defineProperty(Task.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Task instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task} Task instance + */ + Task.create = function create(properties) { + return new Task(properties); + }; + + /** + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) + $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) + $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Task.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Task message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 100: { + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 201: { + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); + break; + } + case 300: { + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; + } + case 302: { + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task} Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Task.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Task message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Task.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (error) + return "triggerSpec." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } + if (message.spark != null && message.hasOwnProperty("spark")) { + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); + if (error) + return "spark." + error; + } + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.config === 1) + return "config: multiple values"; + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); + if (error) + return "notebook." + error; + } + } + return null; + }; + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task} Task + */ + Task.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task) + return object; + var message = new $root.google.cloud.dataplex.v1.Task(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.dataplex.v1.Task.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.triggerSpec != null) { + if (typeof object.triggerSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); + } + if (object.spark != null) { + if (typeof object.spark !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); + } + return message; + }; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {google.cloud.dataplex.v1.Task} message Task + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Task.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.triggerSpec = null; + object.executionSpec = null; + object.executionStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + 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.triggerSpec != null && message.hasOwnProperty("triggerSpec")) + object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); + if (message.spark != null && message.hasOwnProperty("spark")) { + object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); + if (options.oneofs) + object.config = "spark"; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); + if (options.oneofs) + object.config = "notebook"; + } + return object; + }; + + /** + * Converts this Task to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task + * @instance + * @returns {Object.} JSON object + */ + Task.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Task + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; + }; + + Task.InfrastructureSpec = (function() { + + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork + */ + + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfrastructureSpec batch. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.batch = null; + + /** + * InfrastructureSpec containerImage. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.containerImage = null; + + /** + * InfrastructureSpec vpcNetwork. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.vpcNetwork = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfrastructureSpec resources. + * @member {"batch"|undefined} resources + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["batch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec runtime. + * @member {"containerImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["containerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * InfrastructureSpec network. + * @member {"vpcNetwork"|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "network", { + get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 52: { + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + } + case 101: { + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + } + case 150: { + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); + if (error) + return "batch." + error; + } + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); + if (error) + return "containerImage." + error; + } + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + properties.network = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); + if (error) + return "vpcNetwork." + error; + } + } + return null; + }; + + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); + } + if (object.containerImage != null) { + if (typeof object.containerImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); + } + if (object.vpcNetwork != null) { + if (typeof object.vpcNetwork !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); + } + return message; + }; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); + if (options.oneofs) + object.resources = "batch"; + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); + if (options.oneofs) + object.runtime = "containerImage"; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); + if (options.oneofs) + object.network = "vpcNetwork"; + } + return object; + }; + + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; + }; + + InfrastructureSpec.BatchComputeResources = (function() { + + /** + * Properties of a BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IBatchComputeResources + * @property {number|null} [executorsCount] BatchComputeResources executorsCount + * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount + */ + + /** + * Constructs a new BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a BatchComputeResources. + * @implements IBatchComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + */ + function BatchComputeResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchComputeResources executorsCount. + * @member {number} executorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.executorsCount = 0; + + /** + * BatchComputeResources maxExecutorsCount. + * @member {number} maxExecutorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.maxExecutorsCount = 0; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance + */ + BatchComputeResources.create = function create(properties) { + return new BatchComputeResources(properties); + }; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); + if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); + return writer; + }; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.executorsCount = reader.int32(); + break; + } + case 2: { + message.maxExecutorsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + if (!$util.isInteger(message.executorsCount)) + return "executorsCount: integer expected"; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + if (!$util.isInteger(message.maxExecutorsCount)) + return "maxExecutorsCount: integer expected"; + return null; + }; + + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + */ + BatchComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + if (object.executorsCount != null) + message.executorsCount = object.executorsCount | 0; + if (object.maxExecutorsCount != null) + message.maxExecutorsCount = object.maxExecutorsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executorsCount = 0; + object.maxExecutorsCount = 0; + } + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + object.executorsCount = message.executorsCount; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + object.maxExecutorsCount = message.maxExecutorsCount; + return object; + }; + + /** + * Converts this BatchComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + * @returns {Object.} JSON object + */ + BatchComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; + }; + + return BatchComputeResources; + })(); + + InfrastructureSpec.ContainerImageRuntime = (function() { + + /** + * Properties of a ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IContainerImageRuntime + * @property {string|null} [image] ContainerImageRuntime image + * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars + * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages + * @property {Object.|null} [properties] ContainerImageRuntime properties + */ + + /** + * Constructs a new ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a ContainerImageRuntime. + * @implements IContainerImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + */ + function ContainerImageRuntime(properties) { + this.javaJars = []; + this.pythonPackages = []; + this.properties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContainerImageRuntime image. + * @member {string} image + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.image = ""; + + /** + * ContainerImageRuntime javaJars. + * @member {Array.} javaJars + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.javaJars = $util.emptyArray; + + /** + * ContainerImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; + + /** + * ContainerImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.properties = $util.emptyObject; + + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance + */ + ContainerImageRuntime.create = function create(properties) { + return new ContainerImageRuntime(properties); + }; + + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); + if (message.javaJars != null && message.javaJars.length) + for (var i = 0; i < message.javaJars.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.image = reader.string(); + break; + } + case 2: { + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + 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.properties[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContainerImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.javaJars != null && message.hasOwnProperty("javaJars")) { + if (!Array.isArray(message.javaJars)) + return "javaJars: array expected"; + for (var i = 0; i < message.javaJars.length; ++i) + if (!$util.isString(message.javaJars[i])) + return "javaJars: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + */ + ContainerImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.image != null) + message.image = String(object.image); + if (object.javaJars) { + if (!Array.isArray(object.javaJars)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); + message.javaJars = []; + for (var i = 0; i < object.javaJars.length; ++i) + message.javaJars[i] = String(object.javaJars[i]); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); + } + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaJars = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + object.image = ""; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + if (message.javaJars && message.javaJars.length) { + object.javaJars = []; + for (var j = 0; j < message.javaJars.length; ++j) + object.javaJars[j] = message.javaJars[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; + + /** + * Converts this ContainerImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + * @returns {Object.} JSON object + */ + ContainerImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContainerImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; + }; + + return ContainerImageRuntime; + })(); + + InfrastructureSpec.VpcNetwork = (function() { + + /** + * Properties of a VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IVpcNetwork + * @property {string|null} [network] VpcNetwork network + * @property {string|null} [subNetwork] VpcNetwork subNetwork + * @property {Array.|null} [networkTags] VpcNetwork networkTags + */ + + /** + * Constructs a new VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a VpcNetwork. + * @implements IVpcNetwork + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + */ + function VpcNetwork(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcNetwork network. + * @member {string|null|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.network = null; + + /** + * VpcNetwork subNetwork. + * @member {string|null|undefined} subNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.subNetwork = null; + + /** + * VpcNetwork networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.networkTags = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcNetwork networkName. + * @member {"network"|"subNetwork"|undefined} networkName + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + Object.defineProperty(VpcNetwork.prototype, "networkName", { + get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcNetwork instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + */ + VpcNetwork.create = function create(properties) { + return new VpcNetwork(properties); + }; + + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + return writer; + }; + + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subNetwork = reader.string(); + break; + } + case 3: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcNetwork message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcNetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties.networkName = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + if (properties.networkName === 1) + return "networkName: multiple values"; + properties.networkName = 1; + if (!$util.isString(message.subNetwork)) + return "subNetwork: string expected"; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + return null; + }; + + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + */ + VpcNetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + if (object.network != null) + message.network = String(object.network); + if (object.subNetwork != null) + message.subNetwork = String(object.subNetwork); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + return message; + }; + + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcNetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object.networkName = "network"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + object.subNetwork = message.subNetwork; + if (options.oneofs) + object.networkName = "subNetwork"; + } + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + return object; + }; + + /** + * Converts this VpcNetwork to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + * @returns {Object.} JSON object + */ + VpcNetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcNetwork + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; + }; + + return VpcNetwork; + })(); + + return InfrastructureSpec; + })(); + + Task.TriggerSpec = (function() { + + /** + * Properties of a TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface ITriggerSpec + * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type + * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime + * @property {boolean|null} [disabled] TriggerSpec disabled + * @property {number|null} [maxRetries] TriggerSpec maxRetries + * @property {string|null} [schedule] TriggerSpec schedule + */ + + /** + * Constructs a new TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a TriggerSpec. + * @implements ITriggerSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + */ + function TriggerSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerSpec type. + * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.type = 0; + + /** + * TriggerSpec startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.startTime = null; + + /** + * TriggerSpec disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.disabled = false; + + /** + * TriggerSpec maxRetries. + * @member {number} maxRetries + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.maxRetries = 0; + + /** + * TriggerSpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TriggerSpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + Object.defineProperty(TriggerSpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TriggerSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + */ + TriggerSpec.create = function create(properties) { + return new TriggerSpec(properties); + }; + + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 7: { + message.maxRetries = reader.int32(); + break; + } + case 100: { + message.schedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + if (!$util.isInteger(message.maxRetries)) + return "maxRetries: integer expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + */ + TriggerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ON_DEMAND": + case 1: + message.type = 1; + break; + case "RECURRING": + case 2: + message.type = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.maxRetries != null) + message.maxRetries = object.maxRetries | 0; + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.maxRetries = 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + object.maxRetries = message.maxRetries; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this TriggerSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + * @returns {Object.} JSON object + */ + TriggerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} RECURRING=2 RECURRING value + */ + TriggerSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "RECURRING"] = 2; + return values; + })(); + + return TriggerSpec; + })(); + + Task.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionSpec + * @property {Object.|null} [args] ExecutionSpec args + * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {string|null} [project] ExecutionSpec project + * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + * @property {string|null} [kmsKey] ExecutionSpec kmsKey + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + this.args = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionSpec args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.args = $util.emptyObject; + + /** + * ExecutionSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.serviceAccount = ""; + + /** + * ExecutionSpec project. + * @member {string} project + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.project = ""; + + /** + * ExecutionSpec maxJobExecutionLifetime. + * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.maxJobExecutionLifetime = null; + + /** + * ExecutionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.kmsKey = ""; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); + if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) + $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 7: { + message.project = reader.string(); + break; + } + case 8: { + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.kmsKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); + if (error) + return "maxJobExecutionLifetime." + error; + } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); + if (object.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.project != null) + message.project = String(object.project); + if (object.maxJobExecutionLifetime != null) { + if (typeof object.maxJobExecutionLifetime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + } + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.args = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.project = ""; + object.maxJobExecutionLifetime = null; + object.kmsKey = ""; + } + var keys2; + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) + object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; + }; + + return ExecutionSpec; + })(); + + Task.SparkTaskConfig = (function() { + + /** + * Properties of a SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface ISparkTaskConfig + * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri + * @property {string|null} [mainClass] SparkTaskConfig mainClass + * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile + * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile + * @property {string|null} [sqlScript] SparkTaskConfig sqlScript + * @property {Array.|null} [fileUris] SparkTaskConfig fileUris + * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + */ + + /** + * Constructs a new SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a SparkTaskConfig. + * @implements ISparkTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + */ + function SparkTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SparkTaskConfig mainJarFileUri. + * @member {string|null|undefined} mainJarFileUri + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainJarFileUri = null; + + /** + * SparkTaskConfig mainClass. + * @member {string|null|undefined} mainClass + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainClass = null; + + /** + * SparkTaskConfig pythonScriptFile. + * @member {string|null|undefined} pythonScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.pythonScriptFile = null; + + /** + * SparkTaskConfig sqlScriptFile. + * @member {string|null|undefined} sqlScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScriptFile = null; + + /** + * SparkTaskConfig sqlScript. + * @member {string|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScript = null; + + /** + * SparkTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * SparkTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * SparkTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.infrastructureSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SparkTaskConfig driver. + * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + Object.defineProperty(SparkTaskConfig.prototype, "driver", { + get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + */ + SparkTaskConfig.create = function create(properties) { + return new SparkTaskConfig(properties); + }; + + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); + if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); + if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); + if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + return writer; + }; + + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.mainJarFileUri = reader.string(); + break; + } + case 101: { + message.mainClass = reader.string(); + break; + } + case 102: { + message.pythonScriptFile = reader.string(); + break; + } + case 104: { + message.sqlScriptFile = reader.string(); + break; + } + case 105: { + message.sqlScript = reader.string(); + break; + } + case 3: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 4: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + case 6: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + properties.driver = 1; + if (!$util.isString(message.mainJarFileUri)) + return "mainJarFileUri: string expected"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.mainClass)) + return "mainClass: string expected"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.pythonScriptFile)) + return "pythonScriptFile: string expected"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScriptFile)) + return "sqlScriptFile: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + return null; + }; + + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + */ + SparkTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + if (object.mainJarFileUri != null) + message.mainJarFileUri = String(object.mainJarFileUri); + if (object.mainClass != null) + message.mainClass = String(object.mainClass); + if (object.pythonScriptFile != null) + message.pythonScriptFile = String(object.pythonScriptFile); + if (object.sqlScriptFile != null) + message.sqlScriptFile = String(object.sqlScriptFile); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + return message; + }; + + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) + object.infrastructureSpec = null; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + object.mainJarFileUri = message.mainJarFileUri; + if (options.oneofs) + object.driver = "mainJarFileUri"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + object.mainClass = message.mainClass; + if (options.oneofs) object.driver = "mainClass"; } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - object.pythonScriptFile = message.pythonScriptFile; - if (options.oneofs) - object.driver = "pythonScriptFile"; + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + object.pythonScriptFile = message.pythonScriptFile; + if (options.oneofs) + object.driver = "pythonScriptFile"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + object.sqlScriptFile = message.sqlScriptFile; + if (options.oneofs) + object.driver = "sqlScriptFile"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = message.sqlScript; + if (options.oneofs) + object.driver = "sqlScript"; + } + return object; + }; + + /** + * Converts this SparkTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + * @returns {Object.} JSON object + */ + SparkTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SparkTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; + }; + + return SparkTaskConfig; + })(); + + Task.NotebookTaskConfig = (function() { + + /** + * Properties of a NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface INotebookTaskConfig + * @property {string|null} [notebook] NotebookTaskConfig notebook + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec + * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris + * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris + */ + + /** + * Constructs a new NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a NotebookTaskConfig. + * @implements INotebookTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + */ + function NotebookTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotebookTaskConfig notebook. + * @member {string} notebook + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.notebook = ""; + + /** + * NotebookTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.infrastructureSpec = null; + + /** + * NotebookTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.fileUris = $util.emptyArray; + + /** + * NotebookTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; + + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance + */ + NotebookTaskConfig.create = function create(properties) { + return new NotebookTaskConfig(properties); + }; + + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); + return writer; + }; + + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.notebook = reader.string(); + break; + } + case 3: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 6: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotebookTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotebookTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebook != null && message.hasOwnProperty("notebook")) + if (!$util.isString(message.notebook)) + return "notebook: string expected"; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + return null; + }; + + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + */ + NotebookTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + if (object.notebook != null) + message.notebook = String(object.notebook); + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + return message; + }; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotebookTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) { + object.infrastructureSpec = null; + object.notebook = ""; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = message.notebook; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + return object; + }; + + /** + * Converts this NotebookTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + * @returns {Object.} JSON object + */ + NotebookTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotebookTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; + }; + + return NotebookTaskConfig; + })(); + + Task.ExecutionStatus = (function() { + + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime + * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob + */ + + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecutionStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.updateTime = null; + + /** + * ExecutionStatus latestJob. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJob = null; + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.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 3, wireType 2 =*/26).fork()).ldelim(); + if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) + $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.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.latestJob != null && message.hasOwnProperty("latestJob")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); + if (error) + return "latestJob." + error; + } + return null; + }; + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.latestJob != null) { + if (typeof object.latestJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); + message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.latestJob = null; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.latestJob != null && message.hasOwnProperty("latestJob")) + object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + return object; + }; + + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; + }; + + return ExecutionStatus; + })(); + + return Task; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.dataplex.v1 + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [uid] Job uid + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state + * @property {number|null} [retryCount] Job retryCount + * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service + * @property {string|null} [serviceJob] Job serviceJob + * @property {string|null} [message] Job message + * @property {Object.|null} [labels] Job labels + * @property {google.cloud.dataplex.v1.Job.Trigger|null} [trigger] Job trigger + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Job executionSpec + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + */ + function Job(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]]; + } + + /** + * Job name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.name = ""; + + /** + * Job uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.uid = ""; + + /** + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.startTime = null; + + /** + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.endTime = null; + + /** + * Job state. + * @member {google.cloud.dataplex.v1.Job.State} state + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job retryCount. + * @member {number} retryCount + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.retryCount = 0; + + /** + * Job service. + * @member {google.cloud.dataplex.v1.Job.Service} service + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.service = 0; + + /** + * Job serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.serviceJob = ""; + + /** + * Job message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.message = ""; + + /** + * Job labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.labels = $util.emptyObject; + + /** + * Job trigger. + * @member {google.cloud.dataplex.v1.Job.Trigger} trigger + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.trigger = 0; + + /** + * Job executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Job + * @instance + */ + Job.prototype.executionSpec = null; + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.trigger); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retryCount = reader.uint32(); + break; + } + case 7: { + message.service = reader.int32(); + break; + } + case 8: { + message.serviceJob = reader.string(); + break; + } + case 9: { + message.message = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 11: { + message.trigger = reader.int32(); + break; + } + case 100: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - object.sqlScriptFile = message.sqlScriptFile; - if (options.oneofs) - object.driver = "sqlScriptFile"; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + if (!$util.isInteger(message.retryCount)) + return "retryCount: integer expected"; + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - object.sqlScript = message.sqlScript; - if (options.oneofs) - object.driver = "sqlScript"; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Job) return object; - }; + var message = new $root.google.cloud.dataplex.v1.Job(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELLING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.retryCount != null) + message.retryCount = object.retryCount >>> 0; + 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 "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + if (object.message != null) + message.message = String(object.message); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "TRIGGER_UNSPECIFIED": + case 0: + message.trigger = 0; + break; + case "TASK_CONFIG": + case 1: + message.trigger = 1; + break; + case "RUN_REQUEST": + case 2: + message.trigger = 2; + break; + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {google.cloud.dataplex.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retryCount = 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.message = ""; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.executionSpec = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + object.retryCount = message.retryCount; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + 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.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] : message.trigger; + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; + }; + + /** + * Service enum. + * @name google.cloud.dataplex.v1.Job.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + Job.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; + })(); + + /** + * Trigger enum. + * @name google.cloud.dataplex.v1.Job.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} TASK_CONFIG=1 TASK_CONFIG value + * @property {number} RUN_REQUEST=2 RUN_REQUEST value + */ + Job.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "TASK_CONFIG"] = 1; + values[valuesById[2] = "RUN_REQUEST"] = 2; + return values; + })(); + + return Job; + })(); + + v1.ContentService = (function() { + + /** + * Constructs a new ContentService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ContentService + * @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 ContentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; + + /** + * Creates new ContentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.ContentService + * @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 {ContentService} RPC service. Useful where requests and/or responses are streamed. + */ + ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef CreateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ + + /** + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.CreateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.createContent = function createContent(request, callback) { + return this.rpcCall(createContent, $root.google.cloud.dataplex.v1.CreateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "CreateContent" }); - /** - * Converts this SparkTaskConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - * @returns {Object.} JSON object - */ - SparkTaskConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls CreateContent. + * @function createContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Gets the default type url for SparkTaskConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef UpdateContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ - return SparkTaskConfig; - })(); + /** + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.UpdateContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.updateContent = function updateContent(request, callback) { + return this.rpcCall(updateContent, $root.google.cloud.dataplex.v1.UpdateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "UpdateContent" }); - Task.NotebookTaskConfig = (function() { + /** + * Calls UpdateContent. + * @function updateContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface INotebookTaskConfig - * @property {string|null} [notebook] NotebookTaskConfig notebook - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec - * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris - * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris - */ + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef DeleteContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Constructs a new NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a NotebookTaskConfig. - * @implements INotebookTaskConfig - * @constructor - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set - */ - function NotebookTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.DeleteContentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.deleteContent = function deleteContent(request, callback) { + return this.rpcCall(deleteContent, $root.google.cloud.dataplex.v1.DeleteContentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteContent" }); - /** - * NotebookTaskConfig notebook. - * @member {string} notebook - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.notebook = ""; + /** + * Calls DeleteContent. + * @function deleteContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * NotebookTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.infrastructureSpec = null; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef GetContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Content} [response] Content + */ - /** - * NotebookTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.fileUris = $util.emptyArray; + /** + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { + return this.rpcCall(getContent, $root.google.cloud.dataplex.v1.GetContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); + }, "name", { value: "GetContent" }); - /** - * NotebookTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; + /** + * Calls GetContent. + * @function getContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new NotebookTaskConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance - */ - NotebookTaskConfig.create = function create(properties) { - return new NotebookTaskConfig(properties); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ - /** - * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotebookTaskConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); - return writer; - }; + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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" }); - /** - * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotebookTaskConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - message.notebook = reader.string(); - break; - } - case 3: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 6: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ - /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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" }); - /** - * Verifies a NotebookTaskConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotebookTaskConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.notebook != null && message.hasOwnProperty("notebook")) - if (!$util.isString(message.notebook)) - return "notebook: string expected"; - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } - return null; - }; + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig - */ - NotebookTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); - if (object.notebook != null) - message.notebook = String(object.notebook); - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ - /** - * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotebookTaskConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) { - object.infrastructureSpec = null; - object.notebook = ""; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.notebook != null && message.hasOwnProperty("notebook")) - object.notebook = message.notebook; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } - return object; - }; + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.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.dataplex.v1.ContentService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. + * @memberof google.cloud.dataplex.v1.ContentService + * @typedef ListContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListContentResponse} [response] ListContentResponse + */ + + /** + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @param {google.cloud.dataplex.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { + return this.rpcCall(listContent, $root.google.cloud.dataplex.v1.ListContentRequest, $root.google.cloud.dataplex.v1.ListContentResponse, request, callback); + }, "name", { value: "ListContent" }); - /** - * Converts this NotebookTaskConfig to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - * @returns {Object.} JSON object - */ - NotebookTaskConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListContent. + * @function listContent + * @memberof google.cloud.dataplex.v1.ContentService + * @instance + * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Gets the default type url for NotebookTaskConfig - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; - }; + return ContentService; + })(); - return NotebookTaskConfig; - })(); + v1.CreateContentRequest = (function() { - Task.ExecutionStatus = (function() { + /** + * Properties of a CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateContentRequest + * @property {string|null} [parent] CreateContentRequest parent + * @property {google.cloud.dataplex.v1.IContent|null} [content] CreateContentRequest content + * @property {boolean|null} [validateOnly] CreateContentRequest validateOnly + */ - /** - * Properties of an ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionStatus - * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime - * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob - */ + /** + * Constructs a new CreateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateContentRequest. + * @implements ICreateContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + */ + function CreateContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionStatus. - * @implements IExecutionStatus - * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set - */ - function ExecutionStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * CreateContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.parent = ""; - /** - * ExecutionStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.updateTime = null; + /** + * CreateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.content = null; - /** - * ExecutionStatus latestJob. - * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.latestJob = null; + /** + * CreateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + */ + CreateContentRequest.prototype.validateOnly = false; - /** - * Creates a new ExecutionStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance - */ - ExecutionStatus.create = function create(properties) { - return new ExecutionStatus(properties); - }; + /** + * Creates a new CreateContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest instance + */ + CreateContentRequest.create = function create(properties) { + return new CreateContentRequest(properties); + }; - /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.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 3, wireType 2 =*/26).fork()).ldelim(); - if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) - $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateContentRequest.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.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; - /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an ExecutionStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a CreateContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies an ExecutionStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutionStatus.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.latestJob != null && message.hasOwnProperty("latestJob")) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); - if (error) - return "latestJob." + error; - } - return null; - }; + /** + * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus - */ - ExecutionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.latestJob != null) { - if (typeof object.latestJob !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); - message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); - } - return message; - }; + /** + * Verifies a CreateContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateContentRequest.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.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutionStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateTime = null; - object.latestJob = null; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.latestJob != null && message.hasOwnProperty("latestJob")) - object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + /** + * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + */ + CreateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateContentRequest) return object; - }; - - /** - * Converts this ExecutionStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - * @returns {Object.} JSON object - */ - ExecutionStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecutionStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; - }; - - return ExecutionStatus; - })(); + var message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - return Task; - })(); + /** + * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {google.cloud.dataplex.v1.CreateContentRequest} message CreateContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.content = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; - v1.Job = (function() { + /** + * Converts this CreateContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Properties of a Job. - * @memberof google.cloud.dataplex.v1 - * @interface IJob - * @property {string|null} [name] Job name - * @property {string|null} [uid] Job uid - * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime - * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state - * @property {number|null} [retryCount] Job retryCount - * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service - * @property {string|null} [serviceJob] Job serviceJob - * @property {string|null} [message] Job message - * @property {Object.|null} [labels] Job labels - * @property {google.cloud.dataplex.v1.Job.Trigger|null} [trigger] Job trigger - * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Job executionSpec + * Gets the default type url for CreateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateContentRequest"; + }; + + return CreateContentRequest; + })(); + + v1.UpdateContentRequest = (function() { + + /** + * Properties of an UpdateContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateContentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContentRequest updateMask + * @property {google.cloud.dataplex.v1.IContent|null} [content] UpdateContentRequest content + * @property {boolean|null} [validateOnly] UpdateContentRequest validateOnly */ /** - * Constructs a new Job. + * Constructs a new UpdateContentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Job. - * @implements IJob + * @classdesc Represents an UpdateContentRequest. + * @implements IUpdateContentRequest * @constructor - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set */ - function Job(properties) { - this.labels = {}; + function UpdateContentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41311,181 +46200,328 @@ } /** - * Job name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Job + * UpdateContentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateContentRequest * @instance */ - Job.prototype.name = ""; + UpdateContentRequest.prototype.updateMask = null; /** - * Job uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Job + * UpdateContentRequest content. + * @member {google.cloud.dataplex.v1.IContent|null|undefined} content + * @memberof google.cloud.dataplex.v1.UpdateContentRequest * @instance */ - Job.prototype.uid = ""; + UpdateContentRequest.prototype.content = null; /** - * Job startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Job + * UpdateContentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateContentRequest * @instance */ - Job.prototype.startTime = null; + UpdateContentRequest.prototype.validateOnly = false; /** - * Job endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Creates a new UpdateContentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest instance */ - Job.prototype.endTime = null; + UpdateContentRequest.create = function create(properties) { + return new UpdateContentRequest(properties); + }; /** - * Job state. - * @member {google.cloud.dataplex.v1.Job.State} state - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Job.prototype.state = 0; + UpdateContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; /** - * Job retryCount. - * @member {number} retryCount - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Job.prototype.retryCount = 0; + UpdateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Job service. - * @member {google.cloud.dataplex.v1.Job.Service} service - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Decodes an UpdateContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.prototype.service = 0; + UpdateContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Job serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.prototype.serviceJob = ""; + UpdateContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Job message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Verifies an UpdateContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Job.prototype.message = ""; + UpdateContentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Job labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Job - * @instance + * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest */ - Job.prototype.labels = $util.emptyObject; + UpdateContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.content: object expected"); + message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; /** - * Job trigger. - * @member {google.cloud.dataplex.v1.Job.Trigger} trigger - * @memberof google.cloud.dataplex.v1.Job + * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateContentRequest} message UpdateContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.content = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateContentRequest * @instance + * @returns {Object.} JSON object */ - Job.prototype.trigger = 0; + UpdateContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Job executionSpec. - * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.Job + * Gets the default type url for UpdateContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateContentRequest"; + }; + + return UpdateContentRequest; + })(); + + v1.DeleteContentRequest = (function() { + + /** + * Properties of a DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteContentRequest + * @property {string|null} [name] DeleteContentRequest name + */ + + /** + * Constructs a new DeleteContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteContentRequest. + * @implements IDeleteContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + */ + function DeleteContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @instance */ - Job.prototype.executionSpec = null; + DeleteContentRequest.prototype.name = ""; /** - * Creates a new Job instance using the specified properties. + * Creates a new DeleteContentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Job} Job instance + * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest instance */ - Job.create = function create(properties) { - return new Job(properties); + DeleteContentRequest.create = function create(properties) { + return new DeleteContentRequest(properties); }; /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encode = function encode(message, writer) { + DeleteContentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.trigger); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); return writer; }; /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encodeDelimited = function encodeDelimited(message, writer) { + DeleteContentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Job message from the specified reader or buffer. + * Decodes a DeleteContentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decode = function decode(reader, length) { + DeleteContentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -41493,69 +46529,6 @@ message.name = reader.string(); break; } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retryCount = reader.uint32(); - break; - } - case 7: { - message.service = reader.int32(); - break; - } - case 8: { - message.serviceJob = reader.string(); - break; - } - case 9: { - message.message = reader.string(); - break; - } - case 10: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 11: { - message.trigger = reader.int32(); - break; - } - case 100: { - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -41565,683 +46538,644 @@ }; /** - * Decodes a Job message from the specified reader or buffer, length delimited. + * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decodeDelimited = function decodeDelimited(reader) { + DeleteContentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Job message. + * Verifies a DeleteContentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Job.verify = function verify(message) { + DeleteContentRequest.verify = function verify(message) { if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - if (!$util.isInteger(message.retryCount)) - return "retryCount: integer expected"; - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; - } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); - if (error) - return "executionSpec." + error; - } return null; }; /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest */ - Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Job) + DeleteContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteContentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.Job(); + var message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); if (object.name != null) message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "RUNNING": - case 1: - message.state = 1; - break; - case "CANCELLING": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "ABORTED": - case 6: - message.state = 6; - break; - } - if (object.retryCount != null) - message.retryCount = object.retryCount >>> 0; - 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 "DATAPROC": - case 1: - message.service = 1; - break; - } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); - if (object.message != null) - message.message = String(object.message); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.trigger) { - default: - if (typeof object.trigger === "number") { - message.trigger = object.trigger; - break; - } - break; - case "TRIGGER_UNSPECIFIED": - case 0: - message.trigger = 0; - break; - case "TASK_CONFIG": - case 1: - message.trigger = 1; - break; - case "RUN_REQUEST": - case 2: - message.trigger = 2; - break; - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); - } return message; }; /** - * Creates a plain object from a Job message. Also converts values to other types if specified. + * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static - * @param {google.cloud.dataplex.v1.Job} message Job + * @param {google.cloud.dataplex.v1.DeleteContentRequest} message DeleteContentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Job.toObject = function toObject(message, options) { + DeleteContentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.uid = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retryCount = 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; - object.message = ""; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.executionSpec = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - object.retryCount = message.retryCount; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - 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.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.Job.Trigger[message.trigger] : message.trigger; - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); return object; }; /** - * Converts this Job to JSON. + * Converts this DeleteContentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @instance * @returns {Object.} JSON object */ - Job.prototype.toJSON = function toJSON() { + DeleteContentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Job + * Gets the default type url for DeleteContentRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.DeleteContentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteContentRequest"; }; + return DeleteContentRequest; + })(); + + v1.ListContentRequest = (function() { + /** - * Service enum. - * @name google.cloud.dataplex.v1.Job.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value + * Properties of a ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentRequest + * @property {string|null} [parent] ListContentRequest parent + * @property {number|null} [pageSize] ListContentRequest pageSize + * @property {string|null} [pageToken] ListContentRequest pageToken + * @property {string|null} [filter] ListContentRequest filter */ - Job.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; - })(); /** - * State enum. - * @name google.cloud.dataplex.v1.Job.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} CANCELLING=2 CANCELLING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} ABORTED=6 ABORTED value + * Constructs a new ListContentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentRequest. + * @implements IListContentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set */ - Job.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "CANCELLING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - return values; - })(); + function ListContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Trigger enum. - * @name google.cloud.dataplex.v1.Job.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} TASK_CONFIG=1 TASK_CONFIG value - * @property {number} RUN_REQUEST=2 RUN_REQUEST value + * ListContentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance */ - Job.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "TASK_CONFIG"] = 1; - values[valuesById[2] = "RUN_REQUEST"] = 2; - return values; - })(); - - return Job; - })(); + ListContentRequest.prototype.parent = ""; - v1.ContentService = (function() { + /** + * ListContentRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.pageSize = 0; /** - * Constructs a new ContentService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ContentService - * @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 + * ListContentRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance */ - function ContentService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + ListContentRequest.prototype.pageToken = ""; - (ContentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContentService; + /** + * ListContentRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @instance + */ + ListContentRequest.prototype.filter = ""; /** - * Creates new ContentService service using the specified rpc implementation. + * Creates a new ListContentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ContentService + * @memberof google.cloud.dataplex.v1.ListContentRequest * @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 {ContentService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest instance */ - ContentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + ListContentRequest.create = function create(properties) { + return new ListContentRequest(properties); }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|createContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef CreateContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content - */ - - /** - * Calls CreateContent. - * @function createContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.CreateContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 + * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ContentService.prototype.createContent = function createContent(request, callback) { - return this.rpcCall(createContent, $root.google.cloud.dataplex.v1.CreateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "CreateContent" }); + ListContentRequest.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; + }; /** - * Calls CreateContent. - * @function createContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.ICreateContentRequest} request CreateContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|updateContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef UpdateContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content + * Decodes a ListContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListContentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + 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; + }; /** - * Calls UpdateContent. - * @function updateContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.UpdateContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 + * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ContentService.prototype.updateContent = function updateContent(request, callback) { - return this.rpcCall(updateContent, $root.google.cloud.dataplex.v1.UpdateContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "UpdateContent" }); + ListContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateContent. - * @function updateContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} request UpdateContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListContentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListContentRequest.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; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|deleteContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef DeleteContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest */ + ListContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListContentRequest(); + 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; + }; /** - * Calls DeleteContent. - * @function deleteContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.DeleteContentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {google.cloud.dataplex.v1.ListContentRequest} message ListContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ContentService.prototype.deleteContent = function deleteContent(request, callback) { - return this.rpcCall(deleteContent, $root.google.cloud.dataplex.v1.DeleteContentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteContent" }); + ListContentRequest.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; + }; /** - * Calls DeleteContent. - * @function deleteContent - * @memberof google.cloud.dataplex.v1.ContentService + * Converts this ListContentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} request DeleteContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef GetContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Content} [response] Content + * Gets the default type url for ListContentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentRequest"; + }; + + return ListContentRequest; + })(); + + v1.ListContentResponse = (function() { /** - * Calls GetContent. - * @function getContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.GetContentCallback} callback Node-style callback called with the error, if any, and Content - * @returns {undefined} - * @variation 1 + * Properties of a ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListContentResponse + * @property {Array.|null} [content] ListContentResponse content + * @property {string|null} [nextPageToken] ListContentResponse nextPageToken */ - Object.defineProperty(ContentService.prototype.getContent = function getContent(request, callback) { - return this.rpcCall(getContent, $root.google.cloud.dataplex.v1.GetContentRequest, $root.google.cloud.dataplex.v1.Content, request, callback); - }, "name", { value: "GetContent" }); /** - * Calls GetContent. - * @function getContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IGetContentRequest} request GetContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListContentResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListContentResponse. + * @implements IListContentResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set */ + function ListContentResponse(properties) { + this.content = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|getIamPolicy}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * ListContentResponse content. + * @member {Array.} content + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @instance */ + ListContentResponse.prototype.content = $util.emptyArray; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.dataplex.v1.ContentService + * ListContentResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListContentResponse * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ContentService.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" }); + ListContentResponse.prototype.nextPageToken = ""; /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListContentResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse instance */ + ListContentResponse.create = function create(properties) { + return new ListContentResponse(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|setIamPolicy}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy + * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.content.length) + for (var i = 0; i < message.content.length; ++i) + $root.google.cloud.dataplex.v1.Content.encode(message.content[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; + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 + * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ContentService.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" }); + ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListContentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.content && message.content.length)) + message.content = []; + message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|testIamPermissions}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 + * Verifies a ListContentResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ContentService.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" }); + ListContentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + if (!Array.isArray(message.content)) + return "content: array expected"; + for (var i = 0; i < message.content.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Content.verify(message.content[i]); + if (error) + return "content." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse */ + ListContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListContentResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListContentResponse(); + if (object.content) { + if (!Array.isArray(object.content)) + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: array expected"); + message.content = []; + for (var i = 0; i < object.content.length; ++i) { + if (typeof object.content[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: object expected"); + message.content[i] = $root.google.cloud.dataplex.v1.Content.fromObject(object.content[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.ContentService|listContent}. - * @memberof google.cloud.dataplex.v1.ContentService - * @typedef ListContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListContentResponse} [response] ListContentResponse + * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {google.cloud.dataplex.v1.ListContentResponse} message ListContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.content = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.content && message.content.length) { + object.content = []; + for (var j = 0; j < message.content.length; ++j) + object.content[j] = $root.google.cloud.dataplex.v1.Content.toObject(message.content[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls ListContent. - * @function listContent - * @memberof google.cloud.dataplex.v1.ContentService + * Converts this ListContentResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListContentResponse * @instance - * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object - * @param {google.cloud.dataplex.v1.ContentService.ListContentCallback} callback Node-style callback called with the error, if any, and ListContentResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ContentService.prototype.listContent = function listContent(request, callback) { - return this.rpcCall(listContent, $root.google.cloud.dataplex.v1.ListContentRequest, $root.google.cloud.dataplex.v1.ListContentResponse, request, callback); - }, "name", { value: "ListContent" }); + ListContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListContent. - * @function listContent - * @memberof google.cloud.dataplex.v1.ContentService - * @instance - * @param {google.cloud.dataplex.v1.IListContentRequest} request ListContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for ListContentResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentResponse"; + }; - return ContentService; + return ListContentResponse; })(); - v1.CreateContentRequest = (function() { + v1.GetContentRequest = (function() { /** - * Properties of a CreateContentRequest. + * Properties of a GetContentRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateContentRequest - * @property {string|null} [parent] CreateContentRequest parent - * @property {google.cloud.dataplex.v1.IContent|null} [content] CreateContentRequest content - * @property {boolean|null} [validateOnly] CreateContentRequest validateOnly + * @interface IGetContentRequest + * @property {string|null} [name] GetContentRequest name + * @property {google.cloud.dataplex.v1.GetContentRequest.ContentView|null} [view] GetContentRequest view */ /** - * Constructs a new CreateContentRequest. + * Constructs a new GetContentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateContentRequest. - * @implements ICreateContentRequest + * @classdesc Represents a GetContentRequest. + * @implements IGetContentRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set */ - function CreateContentRequest(properties) { + function GetContentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42249,103 +47183,89 @@ } /** - * CreateContentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateContentRequest - * @instance - */ - CreateContentRequest.prototype.parent = ""; - - /** - * CreateContentRequest content. - * @member {google.cloud.dataplex.v1.IContent|null|undefined} content - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * GetContentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetContentRequest * @instance */ - CreateContentRequest.prototype.content = null; + GetContentRequest.prototype.name = ""; /** - * CreateContentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * GetContentRequest view. + * @member {google.cloud.dataplex.v1.GetContentRequest.ContentView} view + * @memberof google.cloud.dataplex.v1.GetContentRequest * @instance */ - CreateContentRequest.prototype.validateOnly = false; + GetContentRequest.prototype.view = 0; /** - * Creates a new CreateContentRequest instance using the specified properties. + * Creates a new GetContentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest instance + * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest instance */ - CreateContentRequest.create = function create(properties) { - return new CreateContentRequest(properties); + GetContentRequest.create = function create(properties) { + return new GetContentRequest(properties); }; /** - * Encodes the specified CreateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateContentRequest.encode = function encode(message, writer) { + GetContentRequest.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.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified CreateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateContentRequest.verify|verify} messages. + * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateContentRequest} message CreateContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateContentRequest message from the specified reader or buffer. + * Decodes a GetContentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateContentRequest.decode = function decode(reader, length) { + GetContentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetContentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); + message.view = reader.int32(); break; } default: @@ -42357,146 +47277,172 @@ }; /** - * Decodes a CreateContentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateContentRequest.decodeDelimited = function decodeDelimited(reader) { + GetContentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateContentRequest message. + * Verifies a GetContentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateContentRequest.verify = function verify(message) { + GetContentRequest.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.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); - if (error) - return "content." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CreateContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateContentRequest} CreateContentRequest + * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest */ - CreateContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateContentRequest) + GetContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetContentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateContentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateContentRequest.content: object expected"); - message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + var message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "CONTENT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 2: + message.view = 2; + break; } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateContentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static - * @param {google.cloud.dataplex.v1.CreateContentRequest} message CreateContentRequest + * @param {google.cloud.dataplex.v1.GetContentRequest} message GetContentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateContentRequest.toObject = function toObject(message, options) { + GetContentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.content = null; - object.validateOnly = false; + object.name = ""; + object.view = options.enums === String ? "CONTENT_VIEW_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] : message.view; return object; }; /** - * Converts this CreateContentRequest to JSON. + * Converts this GetContentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @instance * @returns {Object.} JSON object */ - CreateContentRequest.prototype.toJSON = function toJSON() { + GetContentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateContentRequest + * Gets the default type url for GetContentRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateContentRequest + * @memberof google.cloud.dataplex.v1.GetContentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateContentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetContentRequest"; }; - return CreateContentRequest; + /** + * ContentView enum. + * @name google.cloud.dataplex.v1.GetContentRequest.ContentView + * @enum {number} + * @property {number} CONTENT_VIEW_UNSPECIFIED=0 CONTENT_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=2 FULL value + */ + GetContentRequest.ContentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + return GetContentRequest; })(); - v1.UpdateContentRequest = (function() { + v1.DataDiscoverySpec = (function() { /** - * Properties of an UpdateContentRequest. + * Properties of a DataDiscoverySpec. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateContentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContentRequest updateMask - * @property {google.cloud.dataplex.v1.IContent|null} [content] UpdateContentRequest content - * @property {boolean|null} [validateOnly] UpdateContentRequest validateOnly + * @interface IDataDiscoverySpec + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null} [bigqueryPublishingConfig] DataDiscoverySpec bigqueryPublishingConfig + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null} [storageConfig] DataDiscoverySpec storageConfig */ /** - * Constructs a new UpdateContentRequest. + * Constructs a new DataDiscoverySpec. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateContentRequest. - * @implements IUpdateContentRequest + * @classdesc Represents a DataDiscoverySpec. + * @implements IDataDiscoverySpec * @constructor - * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set */ - function UpdateContentRequest(properties) { + function DataDiscoverySpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42504,103 +47450,103 @@ } /** - * UpdateContentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * DataDiscoverySpec bigqueryPublishingConfig. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig|null|undefined} bigqueryPublishingConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @instance */ - UpdateContentRequest.prototype.updateMask = null; + DataDiscoverySpec.prototype.bigqueryPublishingConfig = null; /** - * UpdateContentRequest content. - * @member {google.cloud.dataplex.v1.IContent|null|undefined} content - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * DataDiscoverySpec storageConfig. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig|null|undefined} storageConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @instance */ - UpdateContentRequest.prototype.content = null; + DataDiscoverySpec.prototype.storageConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UpdateContentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * DataDiscoverySpec resourceConfig. + * @member {"storageConfig"|undefined} resourceConfig + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @instance */ - UpdateContentRequest.prototype.validateOnly = false; + Object.defineProperty(DataDiscoverySpec.prototype, "resourceConfig", { + get: $util.oneOfGetter($oneOfFields = ["storageConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new UpdateContentRequest instance using the specified properties. + * Creates a new DataDiscoverySpec instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest instance + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec instance */ - UpdateContentRequest.create = function create(properties) { - return new UpdateContentRequest(properties); + DataDiscoverySpec.create = function create(properties) { + return new DataDiscoverySpec(properties); }; /** - * Encodes the specified UpdateContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * Encodes the specified DataDiscoverySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateContentRequest.encode = function encode(message, writer) { + DataDiscoverySpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.cloud.dataplex.v1.Content.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.bigqueryPublishingConfig != null && Object.hasOwnProperty.call(message, "bigqueryPublishingConfig")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.encode(message.bigqueryPublishingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateContentRequest.verify|verify} messages. + * Encodes the specified DataDiscoverySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static - * @param {google.cloud.dataplex.v1.IUpdateContentRequest} message UpdateContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataDiscoverySpec} message DataDiscoverySpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataDiscoverySpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateContentRequest message from the specified reader or buffer. + * Decodes a DataDiscoverySpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateContentRequest.decode = function decode(reader, length) { + DataDiscoverySpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.content = $root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32()); + message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.decode(reader, reader.uint32()); break; } - case 3: { - message.validateOnly = reader.bool(); + case 100: { + message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.decode(reader, reader.uint32()); break; } default: @@ -42612,874 +47558,1253 @@ }; /** - * Decodes an UpdateContentRequest message from the specified reader or buffer, length delimited. + * Decodes a DataDiscoverySpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateContentRequest.decodeDelimited = function decodeDelimited(reader) { + DataDiscoverySpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateContentRequest message. + * Verifies a DataDiscoverySpec message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateContentRequest.verify = function verify(message) { + DataDiscoverySpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + var properties = {}; + if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify(message.bigqueryPublishingConfig); if (error) - return "updateMask." + error; + return "bigqueryPublishingConfig." + error; } - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content); - if (error) - return "content." + error; + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + properties.resourceConfig = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify(message.storageConfig); + if (error) + return "storageConfig." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; return null; }; /** - * Creates an UpdateContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataDiscoverySpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateContentRequest} UpdateContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec} DataDiscoverySpec */ - UpdateContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateContentRequest) + DataDiscoverySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateContentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec(); + if (object.bigqueryPublishingConfig != null) { + if (typeof object.bigqueryPublishingConfig !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.bigqueryPublishingConfig: object expected"); + message.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.fromObject(object.bigqueryPublishingConfig); } - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateContentRequest.content: object expected"); - message.content = $root.google.cloud.dataplex.v1.Content.fromObject(object.content); + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.storageConfig: object expected"); + message.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.fromObject(object.storageConfig); } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from an UpdateContentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataDiscoverySpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static - * @param {google.cloud.dataplex.v1.UpdateContentRequest} message UpdateContentRequest + * @param {google.cloud.dataplex.v1.DataDiscoverySpec} message DataDiscoverySpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateContentRequest.toObject = function toObject(message, options) { + DataDiscoverySpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.content = null; - object.validateOnly = false; + if (options.defaults) + object.bigqueryPublishingConfig = null; + if (message.bigqueryPublishingConfig != null && message.hasOwnProperty("bigqueryPublishingConfig")) + object.bigqueryPublishingConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.toObject(message.bigqueryPublishingConfig, options); + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + object.storageConfig = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.toObject(message.storageConfig, options); + if (options.oneofs) + object.resourceConfig = "storageConfig"; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.cloud.dataplex.v1.Content.toObject(message.content, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this UpdateContentRequest to JSON. + * Converts this DataDiscoverySpec to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @instance * @returns {Object.} JSON object */ - UpdateContentRequest.prototype.toJSON = function toJSON() { + DataDiscoverySpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateContentRequest + * Gets the default type url for DataDiscoverySpec * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataDiscoverySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateContentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec"; }; - return UpdateContentRequest; - })(); + DataDiscoverySpec.BigQueryPublishingConfig = (function() { - v1.DeleteContentRequest = (function() { + /** + * Properties of a BigQueryPublishingConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @interface IBigQueryPublishingConfig + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType|null} [tableType] BigQueryPublishingConfig tableType + * @property {string|null} [connection] BigQueryPublishingConfig connection + */ - /** - * Properties of a DeleteContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteContentRequest - * @property {string|null} [name] DeleteContentRequest name - */ + /** + * Constructs a new BigQueryPublishingConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @classdesc Represents a BigQueryPublishingConfig. + * @implements IBigQueryPublishingConfig + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set + */ + function BigQueryPublishingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new DeleteContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteContentRequest. - * @implements IDeleteContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set - */ - function DeleteContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * BigQueryPublishingConfig tableType. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType} tableType + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + */ + BigQueryPublishingConfig.prototype.tableType = 0; - /** - * DeleteContentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @instance - */ - DeleteContentRequest.prototype.name = ""; + /** + * BigQueryPublishingConfig connection. + * @member {string} connection + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + */ + BigQueryPublishingConfig.prototype.connection = ""; - /** - * Creates a new DeleteContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest instance - */ - DeleteContentRequest.create = function create(properties) { - return new DeleteContentRequest(properties); - }; + /** + * Creates a new BigQueryPublishingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig instance + */ + BigQueryPublishingConfig.create = function create(properties) { + return new BigQueryPublishingConfig(properties); + }; - /** - * Encodes the specified DeleteContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContentRequest.encode = function encode(message, writer) { - 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 BigQueryPublishingConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableType != null && Object.hasOwnProperty.call(message, "tableType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tableType); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.connection); + return writer; + }; - /** - * Encodes the specified DeleteContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteContentRequest} message DeleteContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified BigQueryPublishingConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IBigQueryPublishingConfig} message BigQueryPublishingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DeleteContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.tableType = reader.int32(); + break; + } + case 3: { + message.connection = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryPublishingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryPublishingConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryPublishingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tableType != null && message.hasOwnProperty("tableType")) + switch (message.tableType) { + default: + return "tableType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.connection != null && message.hasOwnProperty("connection")) + if (!$util.isString(message.connection)) + return "connection: string expected"; + return null; + }; + + /** + * Creates a BigQueryPublishingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} BigQueryPublishingConfig + */ + BigQueryPublishingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig(); + switch (object.tableType) { + default: + if (typeof object.tableType === "number") { + message.tableType = object.tableType; + break; + } + break; + case "TABLE_TYPE_UNSPECIFIED": + case 0: + message.tableType = 0; + break; + case "EXTERNAL": + case 1: + message.tableType = 1; + break; + case "BIGLAKE": + case 2: + message.tableType = 2; + break; + } + if (object.connection != null) + message.connection = String(object.connection); + return message; + }; + + /** + * Creates a plain object from a BigQueryPublishingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig} message BigQueryPublishingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryPublishingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableType = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; + object.connection = ""; + } + if (message.tableType != null && message.hasOwnProperty("tableType")) + object.tableType = options.enums === String ? $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] === undefined ? message.tableType : $root.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType[message.tableType] : message.tableType; + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = message.connection; + return object; + }; + + /** + * Converts this BigQueryPublishingConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @instance + * @returns {Object.} JSON object + */ + BigQueryPublishingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryPublishingConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryPublishingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"; + }; + + /** + * TableType enum. + * @name google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType + * @enum {number} + * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value + * @property {number} EXTERNAL=1 EXTERNAL value + * @property {number} BIGLAKE=2 BIGLAKE value + */ + BigQueryPublishingConfig.TableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTERNAL"] = 1; + values[valuesById[2] = "BIGLAKE"] = 2; + return values; + })(); + + return BigQueryPublishingConfig; + })(); + + DataDiscoverySpec.StorageConfig = (function() { + + /** + * Properties of a StorageConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @interface IStorageConfig + * @property {Array.|null} [includePatterns] StorageConfig includePatterns + * @property {Array.|null} [excludePatterns] StorageConfig excludePatterns + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null} [csvOptions] StorageConfig csvOptions + * @property {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null} [jsonOptions] StorageConfig jsonOptions + */ + + /** + * Constructs a new StorageConfig. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec + * @classdesc Represents a StorageConfig. + * @implements IStorageConfig + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set + */ + function StorageConfig(properties) { + this.includePatterns = []; + this.excludePatterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageConfig includePatterns. + * @member {Array.} includePatterns + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.includePatterns = $util.emptyArray; + + /** + * StorageConfig excludePatterns. + * @member {Array.} excludePatterns + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.excludePatterns = $util.emptyArray; + + /** + * StorageConfig csvOptions. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions|null|undefined} csvOptions + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.csvOptions = null; + + /** + * StorageConfig jsonOptions. + * @member {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions|null|undefined} jsonOptions + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + */ + StorageConfig.prototype.jsonOptions = null; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig instance + */ + StorageConfig.create = function create(properties) { + return new StorageConfig(properties); + }; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includePatterns != null && message.includePatterns.length) + for (var i = 0; i < message.includePatterns.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.includePatterns[i]); + if (message.excludePatterns != null && message.excludePatterns.length) + for (var i = 0; i < message.excludePatterns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludePatterns[i]); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.encode(message.csvOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.jsonOptions != null && Object.hasOwnProperty.call(message, "jsonOptions")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.encode(message.jsonOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.includePatterns && message.includePatterns.length)) + message.includePatterns = []; + message.includePatterns.push(reader.string()); + break; + } + case 2: { + if (!(message.excludePatterns && message.excludePatterns.length)) + message.excludePatterns = []; + message.excludePatterns.push(reader.string()); + break; + } + case 3: { + message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a DeleteContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a DeleteContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteContentRequest.verify = function verify(message) { - if (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; - }; + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DeleteContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteContentRequest} DeleteContentRequest - */ - DeleteContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.DeleteContentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Verifies a StorageConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includePatterns != null && message.hasOwnProperty("includePatterns")) { + if (!Array.isArray(message.includePatterns)) + return "includePatterns: array expected"; + for (var i = 0; i < message.includePatterns.length; ++i) + if (!$util.isString(message.includePatterns[i])) + return "includePatterns: string[] expected"; + } + if (message.excludePatterns != null && message.hasOwnProperty("excludePatterns")) { + if (!Array.isArray(message.excludePatterns)) + return "excludePatterns: array expected"; + for (var i = 0; i < message.excludePatterns.length; ++i) + if (!$util.isString(message.excludePatterns[i])) + return "excludePatterns: string[] expected"; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify(message.jsonOptions); + if (error) + return "jsonOptions." + error; + } + return null; + }; - /** - * Creates a plain object from a DeleteContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteContentRequest} message DeleteContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteContentRequest.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; - }; + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} StorageConfig + */ + StorageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig(); + if (object.includePatterns) { + if (!Array.isArray(object.includePatterns)) + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.includePatterns: array expected"); + message.includePatterns = []; + for (var i = 0; i < object.includePatterns.length; ++i) + message.includePatterns[i] = String(object.includePatterns[i]); + } + if (object.excludePatterns) { + if (!Array.isArray(object.excludePatterns)) + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.excludePatterns: array expected"); + message.excludePatterns = []; + for (var i = 0; i < object.excludePatterns.length; ++i) + message.excludePatterns[i] = String(object.excludePatterns[i]); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.fromObject(object.csvOptions); + } + if (object.jsonOptions != null) { + if (typeof object.jsonOptions !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.jsonOptions: object expected"); + message.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.fromObject(object.jsonOptions); + } + return message; + }; - /** - * Converts this DeleteContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig} message StorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includePatterns = []; + object.excludePatterns = []; + } + if (options.defaults) { + object.csvOptions = null; + object.jsonOptions = null; + } + if (message.includePatterns && message.includePatterns.length) { + object.includePatterns = []; + for (var j = 0; j < message.includePatterns.length; ++j) + object.includePatterns[j] = message.includePatterns[j]; + } + if (message.excludePatterns && message.excludePatterns.length) { + object.excludePatterns = []; + for (var j = 0; j < message.excludePatterns.length; ++j) + object.excludePatterns[j] = message.excludePatterns[j]; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) + object.csvOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.toObject(message.csvOptions, options); + if (message.jsonOptions != null && message.hasOwnProperty("jsonOptions")) + object.jsonOptions = $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.toObject(message.jsonOptions, options); + return object; + }; - /** - * Gets the default type url for DeleteContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteContentRequest"; - }; + /** + * Converts this StorageConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @instance + * @returns {Object.} JSON object + */ + StorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeleteContentRequest; - })(); + /** + * Gets the default type url for StorageConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"; + }; - v1.ListContentRequest = (function() { + StorageConfig.CsvOptions = (function() { - /** - * Properties of a ListContentRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListContentRequest - * @property {string|null} [parent] ListContentRequest parent - * @property {number|null} [pageSize] ListContentRequest pageSize - * @property {string|null} [pageToken] ListContentRequest pageToken - * @property {string|null} [filter] ListContentRequest filter - */ + /** + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @interface ICsvOptions + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [encoding] CsvOptions encoding + * @property {boolean|null} [typeInferenceDisabled] CsvOptions typeInferenceDisabled + * @property {string|null} [quote] CsvOptions quote + */ - /** - * Constructs a new ListContentRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListContentRequest. - * @implements IListContentRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set - */ - function ListContentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set + */ + function CsvOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListContentRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.parent = ""; + /** + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.headerRows = 0; - /** - * ListContentRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.pageSize = 0; + /** + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.delimiter = ""; - /** - * ListContentRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.pageToken = ""; + /** + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.encoding = ""; - /** - * ListContentRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - */ - ListContentRequest.prototype.filter = ""; + /** + * CsvOptions typeInferenceDisabled. + * @member {boolean} typeInferenceDisabled + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.typeInferenceDisabled = false; - /** - * Creates a new ListContentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest instance - */ - ListContentRequest.create = function create(properties) { - return new ListContentRequest(properties); - }; + /** + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + */ + CsvOptions.prototype.quote = ""; - /** - * Encodes the specified ListContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentRequest.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; - }; + /** + * Creates a new CsvOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions instance + */ + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); + }; - /** - * Encodes the specified ListContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.IListContentRequest} message ListContentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.typeInferenceDisabled); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.quote); + return writer; + }; - /** - * Decodes a ListContentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentRequest(); - 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; - }; + /** + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.ICsvOptions} message CsvOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListContentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a CsvOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.headerRows = reader.int32(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + case 4: { + message.typeInferenceDisabled = reader.bool(); + break; + } + case 5: { + message.quote = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a ListContentRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContentRequest.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; - }; + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ListContentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListContentRequest} ListContentRequest - */ - ListContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListContentRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListContentRequest(); - 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; - }; + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + if (typeof message.typeInferenceDisabled !== "boolean") + return "typeInferenceDisabled: boolean expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + return null; + }; - /** - * Creates a plain object from a ListContentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {google.cloud.dataplex.v1.ListContentRequest} message ListContentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContentRequest.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; - }; + /** + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} CsvOptions + */ + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions(); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.typeInferenceDisabled != null) + message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); + if (object.quote != null) + message.quote = String(object.quote); + return message; + }; - /** - * Converts this ListContentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @instance - * @returns {Object.} JSON object - */ - ListContentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions} message CsvOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CsvOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.headerRows = 0; + object.delimiter = ""; + object.encoding = ""; + object.typeInferenceDisabled = false; + object.quote = ""; + } + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + object.typeInferenceDisabled = message.typeInferenceDisabled; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + return object; + }; - /** - * Gets the default type url for ListContentRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListContentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentRequest"; - }; + /** + * Converts this CsvOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @instance + * @returns {Object.} JSON object + */ + CsvOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListContentRequest; - })(); + /** + * Gets the default type url for CsvOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"; + }; - v1.ListContentResponse = (function() { + return CsvOptions; + })(); - /** - * Properties of a ListContentResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListContentResponse - * @property {Array.|null} [content] ListContentResponse content - * @property {string|null} [nextPageToken] ListContentResponse nextPageToken - */ + StorageConfig.JsonOptions = (function() { - /** - * Constructs a new ListContentResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListContentResponse. - * @implements IListContentResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set - */ - function ListContentResponse(properties) { - this.content = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding + * @property {boolean|null} [typeInferenceDisabled] JsonOptions typeInferenceDisabled + */ - /** - * ListContentResponse content. - * @member {Array.} content - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - */ - ListContentResponse.prototype.content = $util.emptyArray; + /** + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set + */ + function JsonOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListContentResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - */ - ListContentResponse.prototype.nextPageToken = ""; + /** + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + */ + JsonOptions.prototype.encoding = ""; - /** - * Creates a new ListContentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse instance - */ - ListContentResponse.create = function create(properties) { - return new ListContentResponse(properties); - }; + /** + * JsonOptions typeInferenceDisabled. + * @member {boolean} typeInferenceDisabled + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + */ + JsonOptions.prototype.typeInferenceDisabled = false; - /** - * Encodes the specified ListContentResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && message.content.length) - for (var i = 0; i < message.content.length; ++i) - $root.google.cloud.dataplex.v1.Content.encode(message.content[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; - }; + /** + * Creates a new JsonOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions instance + */ + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); + }; - /** - * Encodes the specified ListContentResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListContentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.IListContentResponse} message ListContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.typeInferenceDisabled != null && Object.hasOwnProperty.call(message, "typeInferenceDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.typeInferenceDisabled); + return writer; + }; - /** - * Decodes a ListContentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListContentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.content && message.content.length)) - message.content = []; - message.content.push($root.google.cloud.dataplex.v1.Content.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; + /** + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.IJsonOptions} message JsonOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.string(); + break; + } + case 2: { + message.typeInferenceDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a ListContentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListContentResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) { - if (!Array.isArray(message.content)) - return "content: array expected"; - for (var i = 0; i < message.content.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Content.verify(message.content[i]); - if (error) - return "content." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Verifies a JsonOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + if (typeof message.typeInferenceDisabled !== "boolean") + return "typeInferenceDisabled: boolean expected"; + return null; + }; - /** - * Creates a ListContentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListContentResponse} ListContentResponse - */ - ListContentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListContentResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListContentResponse(); - if (object.content) { - if (!Array.isArray(object.content)) - throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: array expected"); - message.content = []; - for (var i = 0; i < object.content.length; ++i) { - if (typeof object.content[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListContentResponse.content: object expected"); - message.content[i] = $root.google.cloud.dataplex.v1.Content.fromObject(object.content[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} JsonOptions + */ + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.typeInferenceDisabled != null) + message.typeInferenceDisabled = Boolean(object.typeInferenceDisabled); + return message; + }; + + /** + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions} message JsonOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.encoding = ""; + object.typeInferenceDisabled = false; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.typeInferenceDisabled != null && message.hasOwnProperty("typeInferenceDisabled")) + object.typeInferenceDisabled = message.typeInferenceDisabled; + return object; + }; - /** - * Creates a plain object from a ListContentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {google.cloud.dataplex.v1.ListContentResponse} message ListContentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.content = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.content && message.content.length) { - object.content = []; - for (var j = 0; j < message.content.length; ++j) - object.content[j] = $root.google.cloud.dataplex.v1.Content.toObject(message.content[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this JsonOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @instance + * @returns {Object.} JSON object + */ + JsonOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListContentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @instance - * @returns {Object.} JSON object - */ - ListContentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for JsonOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"; + }; - /** - * Gets the default type url for ListContentResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListContentResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListContentResponse"; - }; + return JsonOptions; + })(); - return ListContentResponse; + return StorageConfig; + })(); + + return DataDiscoverySpec; })(); - v1.GetContentRequest = (function() { + v1.DataDiscoveryResult = (function() { /** - * Properties of a GetContentRequest. + * Properties of a DataDiscoveryResult. * @memberof google.cloud.dataplex.v1 - * @interface IGetContentRequest - * @property {string|null} [name] GetContentRequest name - * @property {google.cloud.dataplex.v1.GetContentRequest.ContentView|null} [view] GetContentRequest view + * @interface IDataDiscoveryResult + * @property {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null} [bigqueryPublishing] DataDiscoveryResult bigqueryPublishing */ /** - * Constructs a new GetContentRequest. + * Constructs a new DataDiscoveryResult. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetContentRequest. - * @implements IGetContentRequest + * @classdesc Represents a DataDiscoveryResult. + * @implements IDataDiscoveryResult * @constructor - * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set */ - function GetContentRequest(properties) { + function DataDiscoveryResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43487,89 +48812,75 @@ } /** - * GetContentRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetContentRequest - * @instance - */ - GetContentRequest.prototype.name = ""; - - /** - * GetContentRequest view. - * @member {google.cloud.dataplex.v1.GetContentRequest.ContentView} view - * @memberof google.cloud.dataplex.v1.GetContentRequest + * DataDiscoveryResult bigqueryPublishing. + * @member {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing|null|undefined} bigqueryPublishing + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @instance */ - GetContentRequest.prototype.view = 0; + DataDiscoveryResult.prototype.bigqueryPublishing = null; /** - * Creates a new GetContentRequest instance using the specified properties. + * Creates a new DataDiscoveryResult instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest instance + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult instance */ - GetContentRequest.create = function create(properties) { - return new GetContentRequest(properties); + DataDiscoveryResult.create = function create(properties) { + return new DataDiscoveryResult(properties); }; /** - * Encodes the specified GetContentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * Encodes the specified DataDiscoveryResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetContentRequest.encode = function encode(message, writer) { + DataDiscoveryResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.bigqueryPublishing != null && Object.hasOwnProperty.call(message, "bigqueryPublishing")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.encode(message.bigqueryPublishing, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetContentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetContentRequest.verify|verify} messages. + * Encodes the specified DataDiscoveryResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static - * @param {google.cloud.dataplex.v1.IGetContentRequest} message GetContentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataDiscoveryResult} message DataDiscoveryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataDiscoveryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetContentRequest message from the specified reader or buffer. + * Decodes a DataDiscoveryResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetContentRequest.decode = function decode(reader, length) { + DataDiscoveryResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetContentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); + message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.decode(reader, reader.uint32()); break; } default: @@ -43581,151 +48892,310 @@ }; /** - * Decodes a GetContentRequest message from the specified reader or buffer, length delimited. + * Decodes a DataDiscoveryResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetContentRequest.decodeDelimited = function decodeDelimited(reader) { + DataDiscoveryResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetContentRequest message. + * Verifies a DataDiscoveryResult message. * @function verify - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetContentRequest.verify = function verify(message) { + DataDiscoveryResult.verify = function verify(message) { if (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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify(message.bigqueryPublishing); + if (error) + return "bigqueryPublishing." + error; + } return null; }; /** - * Creates a GetContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataDiscoveryResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetContentRequest} GetContentRequest + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult} DataDiscoveryResult */ - GetContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetContentRequest) + DataDiscoveryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult) return object; - var message = new $root.google.cloud.dataplex.v1.GetContentRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "CONTENT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; + var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult(); + if (object.bigqueryPublishing != null) { + if (typeof object.bigqueryPublishing !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataDiscoveryResult.bigqueryPublishing: object expected"); + message.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.fromObject(object.bigqueryPublishing); } return message; }; /** - * Creates a plain object from a GetContentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataDiscoveryResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static - * @param {google.cloud.dataplex.v1.GetContentRequest} message GetContentRequest + * @param {google.cloud.dataplex.v1.DataDiscoveryResult} message DataDiscoveryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetContentRequest.toObject = function toObject(message, options) { + DataDiscoveryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "CONTENT_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetContentRequest.ContentView[message.view] : message.view; + if (options.defaults) + object.bigqueryPublishing = null; + if (message.bigqueryPublishing != null && message.hasOwnProperty("bigqueryPublishing")) + object.bigqueryPublishing = $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.toObject(message.bigqueryPublishing, options); return object; }; /** - * Converts this GetContentRequest to JSON. + * Converts this DataDiscoveryResult to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @instance * @returns {Object.} JSON object */ - GetContentRequest.prototype.toJSON = function toJSON() { + DataDiscoveryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetContentRequest + * Gets the default type url for DataDiscoveryResult * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetContentRequest + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataDiscoveryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetContentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult"; }; - /** - * ContentView enum. - * @name google.cloud.dataplex.v1.GetContentRequest.ContentView - * @enum {number} - * @property {number} CONTENT_VIEW_UNSPECIFIED=0 CONTENT_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - GetContentRequest.ContentView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTENT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; + DataDiscoveryResult.BigQueryPublishing = (function() { + + /** + * Properties of a BigQueryPublishing. + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @interface IBigQueryPublishing + * @property {string|null} [dataset] BigQueryPublishing dataset + */ + + /** + * Constructs a new BigQueryPublishing. + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult + * @classdesc Represents a BigQueryPublishing. + * @implements IBigQueryPublishing + * @constructor + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set + */ + function BigQueryPublishing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryPublishing dataset. + * @member {string} dataset + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @instance + */ + BigQueryPublishing.prototype.dataset = ""; + + /** + * Creates a new BigQueryPublishing instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing instance + */ + BigQueryPublishing.create = function create(properties) { + return new BigQueryPublishing(properties); + }; + + /** + * Encodes the specified BigQueryPublishing message. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishing.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); + return writer; + }; + + /** + * Encodes the specified BigQueryPublishing message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.IBigQueryPublishing} message BigQueryPublishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryPublishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryPublishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryPublishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryPublishing message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryPublishing.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"; + return null; + }; + + /** + * Creates a BigQueryPublishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} BigQueryPublishing + */ + BigQueryPublishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing) + return object; + var message = new $root.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing(); + if (object.dataset != null) + message.dataset = String(object.dataset); + return message; + }; + + /** + * Creates a plain object from a BigQueryPublishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing} message BigQueryPublishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryPublishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataset = ""; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + return object; + }; + + /** + * Converts this BigQueryPublishing to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @instance + * @returns {Object.} JSON object + */ + BigQueryPublishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryPublishing + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryPublishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"; + }; + + return BigQueryPublishing; })(); - return GetContentRequest; + return DataDiscoveryResult; })(); v1.DataProfileSpec = (function() { @@ -52618,6 +58088,7 @@ * @property {number|null} [threshold] DataQualityRule threshold * @property {string|null} [name] DataQualityRule name * @property {string|null} [description] DataQualityRule description + * @property {boolean|null} [suspended] DataQualityRule suspended */ /** @@ -52755,6 +58226,14 @@ */ DataQualityRule.prototype.description = ""; + /** + * DataQualityRule suspended. + * @member {boolean} suspended + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.suspended = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -52823,6 +58302,8 @@ writer.uint32(/* id 504, wireType 2 =*/4034).string(message.name); if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 505, wireType 2 =*/4042).string(message.description); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 506, wireType 0 =*/4048).bool(message.suspended); return writer; }; @@ -52917,6 +58398,10 @@ message.description = reader.string(); break; } + case 506: { + message.suspended = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -53059,6 +58544,9 @@ if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; return null; }; @@ -53131,6 +58619,8 @@ message.name = String(object.name); if (object.description != null) message.description = String(object.description); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); return message; }; @@ -53154,6 +58644,7 @@ object.threshold = 0; object.name = ""; object.description = ""; + object.suspended = false; } if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { object.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.toObject(message.rangeExpectation, options); @@ -53212,6 +58703,8 @@ object.name = message.name; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; return object; }; @@ -66510,8 +72003,10 @@ * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScan type * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScan dataQualitySpec * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScan dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScan dataDiscoverySpec * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScan dataQualityResult * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScan dataProfileResult + * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScan dataDiscoveryResult */ /** @@ -66642,6 +72137,14 @@ */ DataScan.prototype.dataProfileSpec = null; + /** + * DataScan dataDiscoverySpec. + * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataDiscoverySpec = null; + /** * DataScan dataQualityResult. * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult @@ -66658,28 +72161,36 @@ */ DataScan.prototype.dataProfileResult = null; + /** + * DataScan dataDiscoveryResult. + * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataDiscoveryResult = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * DataScan spec. - * @member {"dataQualitySpec"|"dataProfileSpec"|undefined} spec + * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec * @memberof google.cloud.dataplex.v1.DataScan * @instance */ Object.defineProperty(DataScan.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec"]), + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), set: $util.oneOfSetter($oneOfFields) }); /** * DataScan result. - * @member {"dataQualityResult"|"dataProfileResult"|undefined} result + * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result * @memberof google.cloud.dataplex.v1.DataScan * @instance */ Object.defineProperty(DataScan.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult"]), + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), set: $util.oneOfSetter($oneOfFields) }); @@ -66736,10 +72247,14 @@ $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); return writer; }; @@ -66849,6 +72364,10 @@ message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); break; } + case 102: { + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); + break; + } case 200: { message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); break; @@ -66857,6 +72376,10 @@ message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); break; } + case 202: { + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -66956,6 +72479,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { @@ -66976,6 +72500,16 @@ return "dataProfileSpec." + error; } } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); + if (error) + return "dataDiscoverySpec." + error; + } + } if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { properties.result = 1; { @@ -66994,6 +72528,16 @@ return "dataProfileResult." + error; } } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); + if (error) + return "dataDiscoveryResult." + error; + } + } return null; }; @@ -67096,6 +72640,10 @@ case 2: message.type = 2; break; + case "DATA_DISCOVERY": + case 3: + message.type = 3; + break; } if (object.dataQualitySpec != null) { if (typeof object.dataQualitySpec !== "object") @@ -67107,6 +72655,11 @@ throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileSpec: object expected"); message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); } + if (object.dataDiscoverySpec != null) { + if (typeof object.dataDiscoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoverySpec: object expected"); + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); + } if (object.dataQualityResult != null) { if (typeof object.dataQualityResult !== "object") throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualityResult: object expected"); @@ -67117,6 +72670,11 @@ throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileResult: object expected"); message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); } + if (object.dataDiscoveryResult != null) { + if (typeof object.dataDiscoveryResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataDiscoveryResult: object expected"); + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); + } return message; }; @@ -67186,6 +72744,11 @@ if (options.oneofs) object.spec = "dataProfileSpec"; } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); + if (options.oneofs) + object.spec = "dataDiscoverySpec"; + } if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); if (options.oneofs) @@ -67196,6 +72759,11 @@ if (options.oneofs) object.result = "dataProfileResult"; } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); + if (options.oneofs) + object.result = "dataDiscoveryResult"; + } return object; }; @@ -67751,6 +73319,7 @@ * @interface IDataScanJob * @property {string|null} [name] DataScanJob name * @property {string|null} [uid] DataScanJob uid + * @property {google.protobuf.ITimestamp|null} [createTime] DataScanJob createTime * @property {google.protobuf.ITimestamp|null} [startTime] DataScanJob startTime * @property {google.protobuf.ITimestamp|null} [endTime] DataScanJob endTime * @property {google.cloud.dataplex.v1.DataScanJob.State|null} [state] DataScanJob state @@ -67758,8 +73327,10 @@ * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScanJob type * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScanJob dataQualitySpec * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScanJob dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataDiscoverySpec|null} [dataDiscoverySpec] DataScanJob dataDiscoverySpec * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScanJob dataQualityResult * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScanJob dataProfileResult + * @property {google.cloud.dataplex.v1.IDataDiscoveryResult|null} [dataDiscoveryResult] DataScanJob dataDiscoveryResult */ /** @@ -67793,6 +73364,14 @@ */ DataScanJob.prototype.uid = ""; + /** + * DataScanJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.createTime = null; + /** * DataScanJob startTime. * @member {google.protobuf.ITimestamp|null|undefined} startTime @@ -67849,6 +73428,14 @@ */ DataScanJob.prototype.dataProfileSpec = null; + /** + * DataScanJob dataDiscoverySpec. + * @member {google.cloud.dataplex.v1.IDataDiscoverySpec|null|undefined} dataDiscoverySpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataDiscoverySpec = null; + /** * DataScanJob dataQualityResult. * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult @@ -67865,28 +73452,36 @@ */ DataScanJob.prototype.dataProfileResult = null; + /** + * DataScanJob dataDiscoveryResult. + * @member {google.cloud.dataplex.v1.IDataDiscoveryResult|null|undefined} dataDiscoveryResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataDiscoveryResult = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * DataScanJob spec. - * @member {"dataQualitySpec"|"dataProfileSpec"|undefined} spec + * @member {"dataQualitySpec"|"dataProfileSpec"|"dataDiscoverySpec"|undefined} spec * @memberof google.cloud.dataplex.v1.DataScanJob * @instance */ Object.defineProperty(DataScanJob.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec"]), + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec", "dataDiscoverySpec"]), set: $util.oneOfSetter($oneOfFields) }); /** * DataScanJob result. - * @member {"dataQualityResult"|"dataProfileResult"|undefined} result + * @member {"dataQualityResult"|"dataProfileResult"|"dataDiscoveryResult"|undefined} result * @memberof google.cloud.dataplex.v1.DataScanJob * @instance */ Object.defineProperty(DataScanJob.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult"]), + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult", "dataDiscoveryResult"]), set: $util.oneOfSetter($oneOfFields) }); @@ -67928,14 +73523,20 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataDiscoverySpec != null && Object.hasOwnProperty.call(message, "dataDiscoverySpec")) + $root.google.cloud.dataplex.v1.DataDiscoverySpec.encode(message.dataDiscoverySpec, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.dataDiscoveryResult != null && Object.hasOwnProperty.call(message, "dataDiscoveryResult")) + $root.google.cloud.dataplex.v1.DataDiscoveryResult.encode(message.dataDiscoveryResult, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); return writer; }; @@ -67978,6 +73579,10 @@ message.uid = reader.string(); break; } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 3: { message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -68006,6 +73611,10 @@ message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); break; } + case 102: { + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.decode(reader, reader.uint32()); + break; + } case 200: { message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); break; @@ -68014,6 +73623,10 @@ message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); break; } + case 202: { + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -68056,6 +73669,11 @@ if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) @@ -68089,6 +73707,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { @@ -68109,6 +73728,16 @@ return "dataProfileSpec." + error; } } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoverySpec.verify(message.dataDiscoverySpec); + if (error) + return "dataDiscoverySpec." + error; + } + } if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { properties.result = 1; { @@ -68127,6 +73756,16 @@ return "dataProfileResult." + error; } } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataDiscoveryResult.verify(message.dataDiscoveryResult); + if (error) + return "dataDiscoveryResult." + error; + } + } return null; }; @@ -68146,6 +73785,11 @@ message.name = String(object.name); if (object.uid != null) message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } if (object.startTime != null) { if (typeof object.startTime !== "object") throw TypeError(".google.cloud.dataplex.v1.DataScanJob.startTime: object expected"); @@ -68213,6 +73857,10 @@ case 2: message.type = 2; break; + case "DATA_DISCOVERY": + case 3: + message.type = 3; + break; } if (object.dataQualitySpec != null) { if (typeof object.dataQualitySpec !== "object") @@ -68224,6 +73872,11 @@ throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileSpec: object expected"); message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); } + if (object.dataDiscoverySpec != null) { + if (typeof object.dataDiscoverySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoverySpec: object expected"); + message.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.fromObject(object.dataDiscoverySpec); + } if (object.dataQualityResult != null) { if (typeof object.dataQualityResult !== "object") throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualityResult: object expected"); @@ -68234,6 +73887,11 @@ throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileResult: object expected"); message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); } + if (object.dataDiscoveryResult != null) { + if (typeof object.dataDiscoveryResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataDiscoveryResult: object expected"); + message.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.fromObject(object.dataDiscoveryResult); + } return message; }; @@ -68258,6 +73916,7 @@ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.message = ""; object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; + object.createTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -68273,6 +73932,8 @@ object.message = message.message; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); if (options.oneofs) @@ -68283,6 +73944,11 @@ if (options.oneofs) object.spec = "dataProfileSpec"; } + if (message.dataDiscoverySpec != null && message.hasOwnProperty("dataDiscoverySpec")) { + object.dataDiscoverySpec = $root.google.cloud.dataplex.v1.DataDiscoverySpec.toObject(message.dataDiscoverySpec, options); + if (options.oneofs) + object.spec = "dataDiscoverySpec"; + } if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); if (options.oneofs) @@ -68293,6 +73959,11 @@ if (options.oneofs) object.result = "dataProfileResult"; } + if (message.dataDiscoveryResult != null && message.hasOwnProperty("dataDiscoveryResult")) { + object.dataDiscoveryResult = $root.google.cloud.dataplex.v1.DataDiscoveryResult.toObject(message.dataDiscoveryResult, options); + if (options.oneofs) + object.result = "dataDiscoveryResult"; + } return object; }; @@ -68356,12 +74027,14 @@ * @property {number} DATA_SCAN_TYPE_UNSPECIFIED=0 DATA_SCAN_TYPE_UNSPECIFIED value * @property {number} DATA_QUALITY=1 DATA_QUALITY value * @property {number} DATA_PROFILE=2 DATA_PROFILE value + * @property {number} DATA_DISCOVERY=3 DATA_DISCOVERY value */ v1.DataScanType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "DATA_SCAN_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "DATA_QUALITY"] = 1; values[valuesById[2] = "DATA_PROFILE"] = 2; + values[valuesById[3] = "DATA_DISCOVERY"] = 3; return values; })(); @@ -68376,11 +74049,13 @@ * @property {string|null} [zoneId] DiscoveryEvent zoneId * @property {string|null} [assetId] DiscoveryEvent assetId * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {string|null} [datascanId] DiscoveryEvent datascanId * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + * @property {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null} [table] DiscoveryEvent table */ /** @@ -68438,6 +74113,14 @@ */ DiscoveryEvent.prototype.dataLocation = ""; + /** + * DiscoveryEvent datascanId. + * @member {string} datascanId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.datascanId = ""; + /** * DiscoveryEvent type. * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type @@ -68478,17 +74161,25 @@ */ DiscoveryEvent.prototype.action = null; + /** + * DiscoveryEvent table. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails|null|undefined} table + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.table = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * DiscoveryEvent details. - * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @member {"config"|"entity"|"partition"|"action"|"table"|undefined} details * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance */ Object.defineProperty(DiscoveryEvent.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action", "table"]), set: $util.oneOfSetter($oneOfFields) }); @@ -68526,6 +74217,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.datascanId != null && Object.hasOwnProperty.call(message, "datascanId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.datascanId); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); if (message.config != null && Object.hasOwnProperty.call(message, "config")) @@ -68536,6 +74229,8 @@ $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.action != null && Object.hasOwnProperty.call(message, "action")) $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.encode(message.table, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -68590,6 +74285,10 @@ message.dataLocation = reader.string(); break; } + case 6: { + message.datascanId = reader.string(); + break; + } case 10: { message.type = reader.int32(); break; @@ -68610,6 +74309,10 @@ message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); break; } + case 24: { + message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -68661,6 +74364,9 @@ if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) if (!$util.isString(message.dataLocation)) return "dataLocation: string expected"; + if (message.datascanId != null && message.hasOwnProperty("datascanId")) + if (!$util.isString(message.datascanId)) + return "datascanId: string expected"; if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { default: @@ -68673,6 +74379,10 @@ case 5: case 6: case 7: + case 10: + case 11: + case 12: + case 13: break; } if (message.config != null && message.hasOwnProperty("config")) { @@ -68713,6 +74423,16 @@ return "action." + error; } } + if (message.table != null && message.hasOwnProperty("table")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify(message.table); + if (error) + return "table." + error; + } + } return null; }; @@ -68738,6 +74458,8 @@ message.assetId = String(object.assetId); if (object.dataLocation != null) message.dataLocation = String(object.dataLocation); + if (object.datascanId != null) + message.datascanId = String(object.datascanId); switch (object.type) { default: if (typeof object.type === "number") { @@ -68777,6 +74499,22 @@ case 7: message.type = 7; break; + case "TABLE_PUBLISHED": + case 10: + message.type = 10; + break; + case "TABLE_UPDATED": + case 11: + message.type = 11; + break; + case "TABLE_IGNORED": + case 12: + message.type = 12; + break; + case "TABLE_DELETED": + case 13: + message.type = 13; + break; } if (object.config != null) { if (typeof object.config !== "object") @@ -68798,6 +74536,11 @@ throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); } + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.table: object expected"); + message.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.fromObject(object.table); + } return message; }; @@ -68820,6 +74563,7 @@ object.zoneId = ""; object.assetId = ""; object.dataLocation = ""; + object.datascanId = ""; object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; } if (message.message != null && message.hasOwnProperty("message")) @@ -68832,6 +74576,8 @@ object.assetId = message.assetId; if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) object.dataLocation = message.dataLocation; + if (message.datascanId != null && message.hasOwnProperty("datascanId")) + object.datascanId = message.datascanId; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; if (message.config != null && message.hasOwnProperty("config")) { @@ -68854,6 +74600,11 @@ if (options.oneofs) object.details = "action"; } + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.toObject(message.table, options); + if (options.oneofs) + object.details = "table"; + } return object; }; @@ -68895,6 +74646,10 @@ * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + * @property {number} TABLE_PUBLISHED=10 TABLE_PUBLISHED value + * @property {number} TABLE_UPDATED=11 TABLE_UPDATED value + * @property {number} TABLE_IGNORED=12 TABLE_IGNORED value + * @property {number} TABLE_DELETED=13 TABLE_DELETED value */ DiscoveryEvent.EventType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -68906,6 +74661,10 @@ values[valuesById[5] = "PARTITION_CREATED"] = 5; values[valuesById[6] = "PARTITION_UPDATED"] = 6; values[valuesById[7] = "PARTITION_DELETED"] = 7; + values[valuesById[10] = "TABLE_PUBLISHED"] = 10; + values[valuesById[11] = "TABLE_UPDATED"] = 11; + values[valuesById[12] = "TABLE_IGNORED"] = 12; + values[valuesById[13] = "TABLE_DELETED"] = 13; return values; })(); @@ -68925,6 +74684,24 @@ return values; })(); + /** + * TableType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.TableType + * @enum {number} + * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value + * @property {number} EXTERNAL_TABLE=1 EXTERNAL_TABLE value + * @property {number} BIGLAKE_TABLE=2 BIGLAKE_TABLE value + * @property {number} OBJECT_TABLE=3 OBJECT_TABLE value + */ + DiscoveryEvent.TableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTERNAL_TABLE"] = 1; + values[valuesById[2] = "BIGLAKE_TABLE"] = 2; + values[valuesById[3] = "OBJECT_TABLE"] = 3; + return values; + })(); + DiscoveryEvent.ConfigDetails = (function() { /** @@ -69414,6 +75191,262 @@ return EntityDetails; })(); + DiscoveryEvent.TableDetails = (function() { + + /** + * Properties of a TableDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface ITableDetails + * @property {string|null} [table] TableDetails table + * @property {google.cloud.dataplex.v1.DiscoveryEvent.TableType|null} [type] TableDetails type + */ + + /** + * Constructs a new TableDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a TableDetails. + * @implements ITableDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set + */ + function TableDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDetails table. + * @member {string} table + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + */ + TableDetails.prototype.table = ""; + + /** + * TableDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.TableType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + */ + TableDetails.prototype.type = 0; + + /** + * Creates a new TableDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails instance + */ + TableDetails.create = function create(properties) { + return new TableDetails(properties); + }; + + /** + * Encodes the specified TableDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified TableDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.TableDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ITableDetails} message TableDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.table = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a TableDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} TableDetails + */ + TableDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.TableDetails(); + if (object.table != null) + message.table = String(object.table); + 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 "EXTERNAL_TABLE": + case 1: + message.type = 1; + break; + case "BIGLAKE_TABLE": + case 2: + message.type = 2; + break; + case "OBJECT_TABLE": + case 3: + message.type = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a TableDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.TableDetails} message TableDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = ""; + object.type = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.TableType[message.type] : message.type; + return object; + }; + + /** + * Converts this TableDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @instance + * @returns {Object.} JSON object + */ + TableDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.TableDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"; + }; + + return TableDetails; + })(); + DiscoveryEvent.PartitionDetails = (function() { /** @@ -69735,6 +75768,7 @@ * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @interface IActionDetails * @property {string|null} [type] ActionDetails type + * @property {string|null} [issue] ActionDetails issue */ /** @@ -69760,6 +75794,14 @@ */ ActionDetails.prototype.type = ""; + /** + * ActionDetails issue. + * @member {string} issue + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.issue = ""; + /** * Creates a new ActionDetails instance using the specified properties. * @function create @@ -69786,6 +75828,8 @@ writer = $Writer.create(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issue); return writer; }; @@ -69824,6 +75868,10 @@ message.type = reader.string(); break; } + case 2: { + message.issue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -69862,6 +75910,9 @@ if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; return null; }; @@ -69879,6 +75930,8 @@ var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); if (object.type != null) message.type = String(object.type); + if (object.issue != null) + message.issue = String(object.issue); return message; }; @@ -69895,10 +75948,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.type = ""; + object.issue = ""; + } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; return object; }; @@ -72453,6 +78510,7 @@ case 0: case 1: case 2: + case 4: break; } if (message.state != null && message.hasOwnProperty("state")) @@ -72585,6 +78643,10 @@ case 2: message.type = 2; break; + case "DATA_DISCOVERY": + case 4: + message.type = 4; + break; } switch (object.state) { default: @@ -72797,12 +78859,14 @@ * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value * @property {number} DATA_PROFILE=1 DATA_PROFILE value * @property {number} DATA_QUALITY=2 DATA_QUALITY value + * @property {number} DATA_DISCOVERY=4 DATA_DISCOVERY value */ DataScanEvent.ScanType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "DATA_PROFILE"] = 1; values[valuesById[2] = "DATA_QUALITY"] = 2; + values[valuesById[4] = "DATA_DISCOVERY"] = 4; return values; })(); @@ -87975,6 +94039,263 @@ return values; })(); + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + return api; })(); @@ -94149,6 +100470,7 @@ * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo */ /** @@ -94290,6 +100612,14 @@ */ FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + /** * Creates a new FieldOptions instance using the specified properties. * @function create @@ -94351,6 +100681,8 @@ } if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; @@ -94463,6 +100795,10 @@ message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -94610,6 +100946,11 @@ if (error) return ".google.api.resourceReference." + error; } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } return null; }; @@ -94829,6 +101170,11 @@ throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } return message; }; @@ -94863,6 +101209,7 @@ object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -94906,6 +101253,8 @@ } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index 62b6f80cd09..940f473fced 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -1865,6 +1868,90 @@ "(google.api.method_signature)": "name,query" } ] + }, + "CreateMetadataJob": { + "requestType": "CreateMetadataJobRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "(google.api.http).body": "metadata_job", + "(google.api.method_signature)": "parent,metadata_job,metadata_job_id", + "(google.longrunning.operation_info).response_type": "MetadataJob", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "body": "metadata_job" + } + }, + { + "(google.api.method_signature)": "parent,metadata_job,metadata_job_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MetadataJob", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetMetadataJob": { + "requestType": "GetMetadataJobRequest", + "responseType": "MetadataJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/metadataJobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/metadataJobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMetadataJobs": { + "requestType": "ListMetadataJobsRequest", + "responseType": "ListMetadataJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/metadataJobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/metadataJobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CancelMetadataJob": { + "requestType": "CancelMetadataJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -2388,6 +2475,10 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 11 + }, + "dataVersion": { + "type": "string", + "id": 12 } } }, @@ -3178,7 +3269,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, "query": { @@ -3249,35 +3341,442 @@ "type": "Entry", "id": 1, "options": { - "deprecated": true + "deprecated": true + } + } + } + } + } + }, + "SearchEntriesResponse": { + "fields": { + "results": { + "rule": "repeated", + "type": "SearchEntriesResult", + "id": 1 + }, + "totalSize": { + "type": "int32", + "id": 2 + }, + "nextPageToken": { + "type": "string", + "id": 3 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ImportItem": { + "fields": { + "entry": { + "type": "Entry", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "aspectKeys": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateMetadataJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "metadataJob": { + "type": "MetadataJob", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metadataJobId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetMetadataJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" + } + } + } + }, + "ListMetadataJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMetadataJobsResponse": { + "fields": { + "metadataJobs": { + "rule": "repeated", + "type": "MetadataJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CancelMetadataJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/MetadataJob" + } + } + } + }, + "MetadataJob": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/MetadataJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/metadataJobs/{metadataJob}" + }, + "oneofs": { + "spec": { + "oneof": [ + "importSpec" + ] + }, + "result": { + "oneof": [ + "importResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "importSpec": { + "type": "ImportJobSpec", + "id": 100 + }, + "importResult": { + "type": "ImportJobResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ImportJobResult": { + "fields": { + "deletedEntries": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updatedEntries": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createdEntries": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unchangedEntries": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "recreatedEntries": { + "type": "int64", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ImportJobSpec": { + "fields": { + "sourceStorageUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sourceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scope": { + "type": "ImportJobScope", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "entrySyncMode": { + "type": "SyncMode", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "aspectSyncMode": { + "type": "SyncMode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "logLevel": { + "type": "LogLevel", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SyncMode": { + "values": { + "SYNC_MODE_UNSPECIFIED": 0, + "FULL": 1, + "INCREMENTAL": 2 + } + }, + "LogLevel": { + "values": { + "LOG_LEVEL_UNSPECIFIED": 0, + "DEBUG": 1, + "INFO": 2 + } + }, + "ImportJobScope": { + "fields": { + "entryGroups": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryGroup" + } + }, + "entryTypes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/EntryType" + } + }, + "aspectTypes": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dataplex.googleapis.com/AspectType" + } + } + } + } + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "IMPORT": 1 + } + }, + "Status": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "completionPercent": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "QUEUED": 1, + "RUNNING": 2, + "CANCELING": 3, + "CANCELED": 4, + "SUCCEEDED": 5, + "FAILED": 6, + "SUCCEEDED_WITH_ERRORS": 7 } } } } } }, - "SearchEntriesResponse": { - "fields": { - "results": { - "rule": "repeated", - "type": "SearchEntriesResult", - "id": 1 - }, - "totalSize": { - "type": "int32", - "id": 2 - }, - "nextPageToken": { - "type": "string", - "id": 3 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, "EntryView": { "values": { "ENTRY_VIEW_UNSPECIFIED": 0, @@ -5895,6 +6394,176 @@ } } }, + "DataDiscoverySpec": { + "oneofs": { + "resourceConfig": { + "oneof": [ + "storageConfig" + ] + } + }, + "fields": { + "bigqueryPublishingConfig": { + "type": "BigQueryPublishingConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageConfig": { + "type": "StorageConfig", + "id": 100 + } + }, + "nested": { + "BigQueryPublishingConfig": { + "fields": { + "tableType": { + "type": "TableType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "connection": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigqueryconnection.googleapis.com/Connection" + } + } + }, + "nested": { + "TableType": { + "values": { + "TABLE_TYPE_UNSPECIFIED": 0, + "EXTERNAL": 1, + "BIGLAKE": 2 + } + } + } + }, + "StorageConfig": { + "fields": { + "includePatterns": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePatterns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "csvOptions": { + "type": "CsvOptions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jsonOptions": { + "type": "JsonOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "headerRows": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encoding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeInferenceDisabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "typeInferenceDisabled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "DataDiscoveryResult": { + "fields": { + "bigqueryPublishing": { + "type": "BigQueryPublishing", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "BigQueryPublishing": { + "fields": { + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "bigquery.googleapis.com/Dataset" + } + } + } + } + } + }, "DataProfileSpec": { "fields": { "samplingPercent": { @@ -6686,6 +7355,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "suspended": { + "type": "bool", + "id": 506, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -8475,13 +9151,15 @@ "spec": { "oneof": [ "dataQualitySpec", - "dataProfileSpec" + "dataProfileSpec", + "dataDiscoverySpec" ] }, "result": { "oneof": [ "dataQualityResult", - "dataProfileResult" + "dataProfileResult", + "dataDiscoveryResult" ] } }, @@ -8579,6 +9257,10 @@ "type": "DataProfileSpec", "id": 101 }, + "dataDiscoverySpec": { + "type": "DataDiscoverySpec", + "id": 102 + }, "dataQualityResult": { "type": "DataQualityResult", "id": 200, @@ -8592,6 +9274,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "dataDiscoveryResult": { + "type": "DataDiscoveryResult", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -8650,13 +9339,15 @@ "spec": { "oneof": [ "dataQualitySpec", - "dataProfileSpec" + "dataProfileSpec", + "dataDiscoverySpec" ] }, "result": { "oneof": [ "dataQualityResult", - "dataProfileResult" + "dataProfileResult", + "dataDiscoveryResult" ] } }, @@ -8675,6 +9366,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "startTime": { "type": "google.protobuf.Timestamp", "id": 3, @@ -8724,6 +9422,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "dataDiscoverySpec": { + "type": "DataDiscoverySpec", + "id": 102, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "dataQualityResult": { "type": "DataQualityResult", "id": 200, @@ -8737,6 +9442,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "dataDiscoveryResult": { + "type": "DataDiscoveryResult", + "id": 202, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -8757,7 +9469,8 @@ "values": { "DATA_SCAN_TYPE_UNSPECIFIED": 0, "DATA_QUALITY": 1, - "DATA_PROFILE": 2 + "DATA_PROFILE": 2, + "DATA_DISCOVERY": 3 } }, "DiscoveryEvent": { @@ -8767,7 +9480,8 @@ "config", "entity", "partition", - "action" + "action", + "table" ] } }, @@ -8792,6 +9506,10 @@ "type": "string", "id": 5 }, + "datascanId": { + "type": "string", + "id": 6 + }, "type": { "type": "EventType", "id": 10 @@ -8811,6 +9529,10 @@ "action": { "type": "ActionDetails", "id": 23 + }, + "table": { + "type": "TableDetails", + "id": 24 } }, "nested": { @@ -8823,7 +9545,11 @@ "ENTITY_DELETED": 4, "PARTITION_CREATED": 5, "PARTITION_UPDATED": 6, - "PARTITION_DELETED": 7 + "PARTITION_DELETED": 7, + "TABLE_PUBLISHED": 10, + "TABLE_UPDATED": 11, + "TABLE_IGNORED": 12, + "TABLE_DELETED": 13 } }, "EntityType": { @@ -8833,6 +9559,14 @@ "FILESET": 2 } }, + "TableType": { + "values": { + "TABLE_TYPE_UNSPECIFIED": 0, + "EXTERNAL_TABLE": 1, + "BIGLAKE_TABLE": 2, + "OBJECT_TABLE": 3 + } + }, "ConfigDetails": { "fields": { "parameters": { @@ -8854,6 +9588,18 @@ } } }, + "TableDetails": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "type": { + "type": "TableType", + "id": 2 + } + } + }, "PartitionDetails": { "fields": { "partition": { @@ -8880,6 +9626,10 @@ "type": { "type": "string", "id": 1 + }, + "issue": { + "type": "string", + "id": 2 } } } @@ -9210,7 +9960,8 @@ "values": { "SCAN_TYPE_UNSPECIFIED": 0, "DATA_PROFILE": 1, - "DATA_QUALITY": 2 + "DATA_QUALITY": 2, + "DATA_DISCOVERY": 4 } }, "State": { @@ -10373,9 +11124,9 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", + "java_outer_classname": "FieldInfoProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -10858,6 +11609,30 @@ "GA": 4, "DEPRECATED": 5 } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } } } }, diff --git a/packages/google-cloud-dataplex/samples/README.md b/packages/google-cloud-dataplex/samples/README.md index eafc55939c2..85fc0d15ae4 100644 --- a/packages/google-cloud-dataplex/samples/README.md +++ b/packages/google-cloud-dataplex/samples/README.md @@ -12,10 +12,12 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Catalog_service.cancel_metadata_job](#catalog_service.cancel_metadata_job) * [Catalog_service.create_aspect_type](#catalog_service.create_aspect_type) * [Catalog_service.create_entry](#catalog_service.create_entry) * [Catalog_service.create_entry_group](#catalog_service.create_entry_group) * [Catalog_service.create_entry_type](#catalog_service.create_entry_type) + * [Catalog_service.create_metadata_job](#catalog_service.create_metadata_job) * [Catalog_service.delete_aspect_type](#catalog_service.delete_aspect_type) * [Catalog_service.delete_entry](#catalog_service.delete_entry) * [Catalog_service.delete_entry_group](#catalog_service.delete_entry_group) @@ -24,10 +26,12 @@ * [Catalog_service.get_entry](#catalog_service.get_entry) * [Catalog_service.get_entry_group](#catalog_service.get_entry_group) * [Catalog_service.get_entry_type](#catalog_service.get_entry_type) + * [Catalog_service.get_metadata_job](#catalog_service.get_metadata_job) * [Catalog_service.list_aspect_types](#catalog_service.list_aspect_types) * [Catalog_service.list_entries](#catalog_service.list_entries) * [Catalog_service.list_entry_groups](#catalog_service.list_entry_groups) * [Catalog_service.list_entry_types](#catalog_service.list_entry_types) + * [Catalog_service.list_metadata_jobs](#catalog_service.list_metadata_jobs) * [Catalog_service.lookup_entry](#catalog_service.lookup_entry) * [Catalog_service.search_entries](#catalog_service.search_entries) * [Catalog_service.update_aspect_type](#catalog_service.update_aspect_type) @@ -125,6 +129,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Catalog_service.cancel_metadata_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js` + + +----- + + + + ### Catalog_service.create_aspect_type View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js). @@ -193,6 +214,23 @@ __Usage:__ +### Catalog_service.create_metadata_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js` + + +----- + + + + ### Catalog_service.delete_aspect_type View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js). @@ -329,6 +367,23 @@ __Usage:__ +### Catalog_service.get_metadata_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js` + + +----- + + + + ### Catalog_service.list_aspect_types View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js). @@ -397,6 +452,23 @@ __Usage:__ +### Catalog_service.list_metadata_jobs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js` + + +----- + + + + ### Catalog_service.lookup_entry View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js). diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js similarity index 100% rename from owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.cancel_metadata_job.js rename to packages/google-cloud-dataplex/samples/generated/v1/catalog_service.cancel_metadata_job.js diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js index b71146ad2f8..9f5c8daf7c7 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_aspect_type.js @@ -31,7 +31,7 @@ function main(parent, aspectTypeId, aspectType) { /** * Required. The resource name of the AspectType, of the form: * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. */ // const parent = 'abc123' /** @@ -39,12 +39,12 @@ function main(parent, aspectTypeId, aspectType) { */ // const aspectTypeId = 'abc123' /** - * Required. AspectType Resource + * Required. AspectType Resource. */ // const aspectType = {} /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. */ // const validateOnly = true diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js index 996b16c560b..7878fa9880f 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry.js @@ -35,18 +35,19 @@ function main(parent, entryId, entry) { // const parent = 'abc123' /** * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * For example if the Full Resource Name of a resource is + * Entries corresponding to Google Cloud resources use an Entry ID format + * based on full resource + * names (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a full resource name of the resource without the + * prefix double slashes in the API service name part of the full resource + * name. This allows retrieval of entries using their associated resource + * name. + * For example, if the full resource name of a resource is * `//library.googleapis.com/shelves/shelf1/books/book2`, * then the suggested entry_id is * `library.googleapis.com/shelves/shelf1/books/book2`. * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google + * corresponding to resources from providers or systems other than Google * Cloud. * The maximum size of the field is 4000 characters. */ diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js index 7687beb6f75..8280461ff74 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_group.js @@ -39,12 +39,12 @@ function main(parent, entryGroupId, entryGroup) { */ // const entryGroupId = 'abc123' /** - * Required. EntryGroup Resource + * Required. EntryGroup Resource. */ // const entryGroup = {} /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. */ // const validateOnly = true diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js index e91dad10ddd..a5a8dc17981 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_entry_type.js @@ -31,7 +31,7 @@ function main(parent, entryTypeId, entryType) { /** * Required. The resource name of the EntryType, of the form: * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. */ // const parent = 'abc123' /** @@ -39,12 +39,12 @@ function main(parent, entryTypeId, entryType) { */ // const entryTypeId = 'abc123' /** - * Required. EntryType Resource + * Required. EntryType Resource. */ // const entryType = {} /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. */ // const validateOnly = true diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js similarity index 100% rename from owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.create_metadata_job.js rename to packages/google-cloud-dataplex/samples/generated/v1/catalog_service.create_metadata_job.js diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js index e3307992318..be62c1257f9 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_aspect_type.js @@ -35,7 +35,8 @@ function main(name) { // const name = 'abc123' /** * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response + * value, the DeleteAspectTypeRequest method returns an ABORTED error + * response. */ // const etag = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js index 85fdef89b14..68f864f6567 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_group.js @@ -35,7 +35,8 @@ function main(name) { // const name = 'abc123' /** * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response + * value, the DeleteEntryGroupRequest method returns an ABORTED error + * response. */ // const etag = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_type.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_type.js index 213c1ebc60d..a9600d68ee9 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_type.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.delete_entry_type.js @@ -35,7 +35,7 @@ function main(name) { // const name = 'abc123' /** * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response + * value, the DeleteEntryTypeRequest method returns an ABORTED error response. */ // const etag = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js index 00f7ed9c61d..50dff5372ff 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_entry.js @@ -34,17 +34,18 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. View for controlling which parts of an entry are to be returned. + * Optional. View to control which parts of an entry the service should + * return. */ // const view = {} /** * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. + * It only works for CUSTOM view. */ // const aspectTypes = ['abc','def'] /** * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. + * paths within the Entry. It only works for CUSTOM view. */ // const paths = ['abc','def'] diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js similarity index 100% rename from owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.get_metadata_job.js rename to packages/google-cloud-dataplex/samples/generated/v1/catalog_service.get_metadata_job.js diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js index a97b7fc67cb..7984ec990c8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_aspect_types.js @@ -31,34 +31,34 @@ function main(parent) { /** * Required. The resource name of the AspectType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. */ // const parent = 'abc123' /** * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. */ // const pageSize = 1234 /** * Optional. Page token received from a previous `ListAspectTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. */ // const pageToken = 'abc123' /** * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * The service supports the following formats: + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. */ // const filter = 'abc123' /** - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. */ // const orderBy = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js index c1996716dde..7f2bc294577 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entries.js @@ -34,27 +34,33 @@ function main(parent) { */ // const parent = 'abc123' /** + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. */ // const pageSize = 1234 /** - * Optional. The pagination token returned by a previous request. + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. */ // const pageToken = 'abc123' /** - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * * entry_type + * * entry_source.display_name + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * You can use the logical operators AND, OR, NOT in the filter. + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * Example filter expressions: + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" */ // const filter = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js index 062ed9d33ec..594addd7df7 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_groups.js @@ -31,21 +31,21 @@ function main(parent) { /** * Required. The resource name of the entryGroup location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. */ // const parent = 'abc123' /** * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. */ // const pageSize = 1234 /** * Optional. Page token received from a previous `ListEntryGroups` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js index 4aec5b22380..d6d9e6108ea 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_entry_types.js @@ -31,34 +31,34 @@ function main(parent) { /** * Required. The resource name of the EntryType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. */ // const parent = 'abc123' /** * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ // const pageSize = 1234 /** * Optional. Page token received from a previous `ListEntryTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. */ // const pageToken = 'abc123' /** * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * The service supports the following formats: + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. */ // const filter = 'abc123' /** - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. */ // const orderBy = 'abc123' diff --git a/owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js similarity index 100% rename from owl-bot-staging/google-cloud-dataplex/v1/samples/generated/v1/catalog_service.list_metadata_jobs.js rename to packages/google-cloud-dataplex/samples/generated/v1/catalog_service.list_metadata_jobs.js diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js index b413f864671..67cb293c769 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.lookup_entry.js @@ -34,17 +34,18 @@ function main(name, entry) { */ // const name = 'abc123' /** - * Optional. View for controlling which parts of an entry are to be returned. + * Optional. View to control which parts of an entry the service should + * return. */ // const view = {} /** * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. + * It only works for CUSTOM view. */ // const aspectTypes = ['abc','def'] /** * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. + * paths within the Entry. It only works for CUSTOM view. */ // const paths = ['abc','def'] /** diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js index 69ed72926b8..d2a3d980ded 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.search_entries.js @@ -38,21 +38,25 @@ function main(name, query) { */ // const query = 'abc123' /** - * Optional. Pagination. + * 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. */ // const pageSize = 1234 /** + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. */ // const pageToken = 'abc123' /** - * Optional. Ordering of the results. Supported options to be added later. + * Optional. Specifies the ordering of results. */ // const orderBy = 'abc123' /** - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. */ // const scope = 'abc123' diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry.js index ce058f4791b..b8eb05b145e 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry.js @@ -35,32 +35,37 @@ function main(entry) { /** * Optional. Mask of fields to update. To update Aspects, the update_mask must * contain the value "aspects". - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. + * If the update_mask is empty, the service will update all modifiable fields + * present in the request. */ // const updateMask = {} /** - * Optional. If set to true and the entry does not exist, it will be created. + * Optional. If set to true and the entry doesn't exist, the service will + * create it. */ // const allowMissing = true /** - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. + * Optional. If set to true and the aspect_keys specify aspect ranges, the + * service deletes any existing aspects from that range that weren't provided + * in the request. */ // const deleteMissingAspects = true /** - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * Existing aspects matching the syntax will not be removed unless + * Optional. The map keys of the Aspects which the service should modify. It + * supports the following syntaxes: + * * `` - matches an aspect of the given type and empty + * path. + * * `@path` - matches an aspect of the given type and + * specified path. For example, to attach an aspect to a field that is + * specified by the `schema` aspect, the path should have the format + * `Schema.`. + * * `*` - matches aspects of the given type for all + * paths. + * * `*@path` - matches aspects of all types on the given path. + * The service will not remove existing aspects matching the syntax unless * `delete_missing_aspects` is set to true. - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. + * If this field is left empty, the service treats it as specifying + * exactly those Aspects present in the request. */ // const aspectKeys = ['abc','def'] diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_group.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_group.js index 393bf1952b4..ecdf55324b0 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_group.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_group.js @@ -29,7 +29,7 @@ function main(entryGroup, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. EntryGroup Resource + * Required. EntryGroup Resource. */ // const entryGroup = {} /** @@ -37,8 +37,8 @@ function main(entryGroup, updateMask) { */ // const updateMask = {} /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request, without performing any + * mutations. The default is false. */ // const validateOnly = true diff --git a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_type.js b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_type.js index f79c2b0e20a..6b8ab21e781 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_type.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/catalog_service.update_entry_type.js @@ -29,7 +29,7 @@ function main(entryType, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. EntryType Resource + * Required. EntryType Resource. */ // const entryType = {} /** @@ -37,8 +37,8 @@ function main(entryType, updateMask) { */ // const updateMask = {} /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. */ // const validateOnly = true diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json index c70e3f14ca4..315169578b5 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata_google.cloud.dataplex.v1.json @@ -15,7 +15,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryType_async", "title": "CatalogService createEntryType Sample", "origin": "API_DEFINITION", - "description": " Creates an EntryType", + "description": " Creates an EntryType.", "canonical": true, "file": "catalog_service.create_entry_type.js", "language": "JAVASCRIPT", @@ -67,7 +67,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryType_async", "title": "CatalogService updateEntryType Sample", "origin": "API_DEFINITION", - "description": " Updates a EntryType resource.", + "description": " Updates an EntryType.", "canonical": true, "file": "catalog_service.update_entry_type.js", "language": "JAVASCRIPT", @@ -115,7 +115,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryType_async", "title": "CatalogService deleteEntryType Sample", "origin": "API_DEFINITION", - "description": " Deletes a EntryType resource.", + "description": " Deletes an EntryType.", "canonical": true, "file": "catalog_service.delete_entry_type.js", "language": "JAVASCRIPT", @@ -215,7 +215,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_GetEntryType_async", "title": "CatalogService getEntryType Sample", "origin": "API_DEFINITION", - "description": " Retrieves a EntryType resource.", + "description": " Gets an EntryType.", "canonical": true, "file": "catalog_service.get_entry_type.js", "language": "JAVASCRIPT", @@ -255,7 +255,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_CreateAspectType_async", "title": "CatalogService createAspectType Sample", "origin": "API_DEFINITION", - "description": " Creates an AspectType", + "description": " Creates an AspectType.", "canonical": true, "file": "catalog_service.create_aspect_type.js", "language": "JAVASCRIPT", @@ -307,7 +307,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_UpdateAspectType_async", "title": "CatalogService updateAspectType Sample", "origin": "API_DEFINITION", - "description": " Updates a AspectType resource.", + "description": " Updates an AspectType.", "canonical": true, "file": "catalog_service.update_aspect_type.js", "language": "JAVASCRIPT", @@ -355,14 +355,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_DeleteAspectType_async", "title": "CatalogService deleteAspectType Sample", "origin": "API_DEFINITION", - "description": " Deletes a AspectType resource.", + "description": " Deletes an AspectType.", "canonical": true, "file": "catalog_service.delete_aspect_type.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 61, "type": "FULL" } ], @@ -455,7 +455,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_GetAspectType_async", "title": "CatalogService getAspectType Sample", "origin": "API_DEFINITION", - "description": " Retrieves a AspectType resource.", + "description": " Gets an AspectType.", "canonical": true, "file": "catalog_service.get_aspect_type.js", "language": "JAVASCRIPT", @@ -495,7 +495,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_async", "title": "CatalogService createEntryGroup Sample", "origin": "API_DEFINITION", - "description": " Creates an EntryGroup", + "description": " Creates an EntryGroup.", "canonical": true, "file": "catalog_service.create_entry_group.js", "language": "JAVASCRIPT", @@ -547,7 +547,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_async", "title": "CatalogService updateEntryGroup Sample", "origin": "API_DEFINITION", - "description": " Updates a EntryGroup resource.", + "description": " Updates an EntryGroup.", "canonical": true, "file": "catalog_service.update_entry_group.js", "language": "JAVASCRIPT", @@ -595,14 +595,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_async", "title": "CatalogService deleteEntryGroup Sample", "origin": "API_DEFINITION", - "description": " Deletes a EntryGroup resource.", + "description": " Deletes an EntryGroup.", "canonical": true, "file": "catalog_service.delete_entry_group.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 60, + "end": 61, "type": "FULL" } ], @@ -695,7 +695,7 @@ "regionTag": "dataplex_v1_generated_CatalogService_GetEntryGroup_async", "title": "CatalogService getEntryGroup Sample", "origin": "API_DEFINITION", - "description": " Retrieves a EntryGroup resource.", + "description": " Gets an EntryGroup.", "canonical": true, "file": "catalog_service.get_entry_group.js", "language": "JAVASCRIPT", @@ -742,7 +742,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 79, "type": "FULL" } ], @@ -790,7 +790,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 89, "type": "FULL" } ], @@ -879,14 +879,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_ListEntries_async", "title": "CatalogService listEntries Sample", "origin": "API_DEFINITION", - "description": " Lists entries within an entry group.", + "description": " Lists Entries within an EntryGroup.", "canonical": true, "file": "catalog_service.list_entries.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 80, + "end": 86, "type": "FULL" } ], @@ -931,14 +931,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_GetEntry_async", "title": "CatalogService getEntry Sample", "origin": "API_DEFINITION", - "description": " Gets a single entry.", + "description": " Gets an Entry. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", "canonical": true, "file": "catalog_service.get_entry.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 68, + "end": 69, "type": "FULL" } ], @@ -983,14 +983,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_LookupEntry_async", "title": "CatalogService lookupEntry Sample", "origin": "API_DEFINITION", - "description": " Looks up a single entry.", + "description": " Looks up a single Entry by name using the permission on the source system. **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is changing. For more information, see [Changes to BigQuery metadata stored in Dataplex Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).", "canonical": true, "file": "catalog_service.lookup_entry.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 74, + "end": 75, "type": "FULL" } ], @@ -1039,14 +1039,14 @@ "regionTag": "dataplex_v1_generated_CatalogService_SearchEntries_async", "title": "CatalogService searchEntries Sample", "origin": "API_DEFINITION", - "description": " Searches for entries matching given query and scope.", + "description": " Searches for Entries matching the given query and scope.", "canonical": true, "file": "catalog_service.search_entries.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 79, + "end": 83, "type": "FULL" } ], @@ -1095,6 +1095,194 @@ } } }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CreateMetadataJob_async", + "title": "CatalogService createMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.", + "canonical": true, + "file": "catalog_service.create_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "metadata_job", + "type": ".google.cloud.dataplex.v1.MetadataJob" + }, + { + "name": "metadata_job_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CreateMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_GetMetadataJob_async", + "title": "CatalogService getMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Gets a metadata job.", + "canonical": true, + "file": "catalog_service.get_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.MetadataJob", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "GetMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_ListMetadataJobs_async", + "title": "CatalogService listMetadataJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists metadata jobs.", + "canonical": true, + "file": "catalog_service.list_metadata_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMetadataJobs", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListMetadataJobsResponse", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "ListMetadataJobs", + "fullName": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_CatalogService_CancelMetadataJob_async", + "title": "CatalogService cancelMetadataJob Sample", + "origin": "API_DEFINITION", + "description": " Cancels a metadata job. If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.", + "canonical": true, + "file": "catalog_service.cancel_metadata_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "CatalogServiceClient", + "fullName": "google.cloud.dataplex.v1.CatalogServiceClient" + }, + "method": { + "shortName": "CancelMetadataJob", + "fullName": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", + "service": { + "shortName": "CatalogService", + "fullName": "google.cloud.dataplex.v1.CatalogService" + } + } + } + }, { "regionTag": "dataplex_v1_generated_ContentService_CreateContent_async", "title": "CatalogService createContent Sample", diff --git a/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts b/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts index c037ebfd925..3c1c0d808d5 100644 --- a/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/catalog_service_client.ts @@ -44,10 +44,10 @@ const version = require('../../../package.json').version; /** * The primary resources offered by this service are EntryGroups, EntryTypes, - * AspectTypes, Entry and Aspect which collectively allow a data administrator - * to organize, manage, secure and catalog data across their organization - * located across cloud projects in a variety of storage systems including Cloud - * Storage and BigQuery. + * AspectTypes, and Entries. They collectively let data administrators organize, + * manage, secure, and catalog data located across cloud projects in their + * organization in a variety of storage systems, including Cloud Storage and + * BigQuery. * @class * @memberof v1 */ @@ -261,6 +261,9 @@ export class CatalogServiceClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -315,6 +318,11 @@ export class CatalogServiceClient { 'nextPageToken', 'results' ), + listMetadataJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metadataJobs' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -367,6 +375,9 @@ export class CatalogServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -376,6 +387,18 @@ export class CatalogServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -419,6 +442,10 @@ export class CatalogServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -431,6 +458,22 @@ export class CatalogServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -474,6 +517,10 @@ export class CatalogServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -486,24 +533,55 @@ export class CatalogServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -564,6 +642,12 @@ export class CatalogServiceClient { const deleteEntryGroupMetadata = protoFilesRoot.lookup( '.google.cloud.dataplex.v1.OperationMetadata' ) as gax.protobuf.Type; + const createMetadataJobResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.MetadataJob' + ) as gax.protobuf.Type; + const createMetadataJobMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createEntryType: new this._gaxModule.LongrunningDescriptor( @@ -611,6 +695,11 @@ export class CatalogServiceClient { deleteEntryGroupResponse.decode.bind(deleteEntryGroupResponse), deleteEntryGroupMetadata.decode.bind(deleteEntryGroupMetadata) ), + createMetadataJob: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMetadataJobResponse.decode.bind(createMetadataJobResponse), + createMetadataJobMetadata.decode.bind(createMetadataJobMetadata) + ), }; // Put together the default options sent with requests. @@ -685,6 +774,10 @@ export class CatalogServiceClient { 'getEntry', 'lookupEntry', 'searchEntries', + 'createMetadataJob', + 'getMetadataJob', + 'listMetadataJobs', + 'cancelMetadataJob', ]; for (const methodName of catalogServiceStubMethods) { const callPromise = this.catalogServiceStub.then( @@ -803,7 +896,7 @@ export class CatalogServiceClient { // -- Service calls -- // ------------------- /** - * Retrieves a EntryType resource. + * Gets an EntryType. * * @param {Object} request * The request object that will be sent. @@ -888,7 +981,7 @@ export class CatalogServiceClient { return this.innerApiCalls.getEntryType(request, options, callback); } /** - * Retrieves a AspectType resource. + * Gets an AspectType. * * @param {Object} request * The request object that will be sent. @@ -973,7 +1066,7 @@ export class CatalogServiceClient { return this.innerApiCalls.getAspectType(request, options, callback); } /** - * Retrieves a EntryGroup resource. + * Gets an EntryGroup. * * @param {Object} request * The request object that will be sent. @@ -1068,20 +1161,21 @@ export class CatalogServiceClient { * @param {string} request.entryId * Required. Entry identifier. It has to be unique within an Entry Group. * - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. + * Entries corresponding to Google Cloud resources use an Entry ID format + * based on [full resource + * names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a full resource name of the resource without the + * prefix double slashes in the API service name part of the full resource + * name. This allows retrieval of entries using their associated resource + * name. * - * For example if the Full Resource Name of a resource is + * For example, if the full resource name of a resource is * `//library.googleapis.com/shelves/shelf1/books/book2`, * then the suggested entry_id is * `library.googleapis.com/shelves/shelf1/books/book2`. * * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google + * corresponding to resources from providers or systems other than Google * Cloud. * * The maximum size of the field is 4000 characters. @@ -1175,28 +1269,34 @@ export class CatalogServiceClient { * Optional. Mask of fields to update. To update Aspects, the update_mask must * contain the value "aspects". * - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. + * If the update_mask is empty, the service will update all modifiable fields + * present in the request. * @param {boolean} [request.allowMissing] - * Optional. If set to true and the entry does not exist, it will be created. + * Optional. If set to true and the entry doesn't exist, the service will + * create it. * @param {boolean} [request.deleteMissingAspects] - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. + * Optional. If set to true and the aspect_keys specify aspect ranges, the + * service deletes any existing aspects from that range that weren't provided + * in the request. * @param {string[]} [request.aspectKeys] - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * - * Existing aspects matching the syntax will not be removed unless + * Optional. The map keys of the Aspects which the service should modify. It + * supports the following syntaxes: + * + * * `` - matches an aspect of the given type and empty + * path. + * * `@path` - matches an aspect of the given type and + * specified path. For example, to attach an aspect to a field that is + * specified by the `schema` aspect, the path should have the format + * `Schema.`. + * * `*` - matches aspects of the given type for all + * paths. + * * `*@path` - matches aspects of all types on the given path. + * + * The service will not remove existing aspects matching the syntax unless * `delete_missing_aspects` is set to true. * - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. + * If this field is left empty, the service treats it as specifying + * exactly those Aspects present in the 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. @@ -1360,7 +1460,12 @@ export class CatalogServiceClient { return this.innerApiCalls.deleteEntry(request, options, callback); } /** - * Gets a single entry. + * Gets an Entry. + * + * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + * changing. For more information, see [Changes to BigQuery metadata stored in + * Dataplex + * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). * * @param {Object} request * The request object that will be sent. @@ -1368,13 +1473,14 @@ export class CatalogServiceClient { * Required. The resource name of the Entry: * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. * @param {google.cloud.dataplex.v1.EntryView} [request.view] - * Optional. View for controlling which parts of an entry are to be returned. + * Optional. View to control which parts of an entry the service should + * return. * @param {string[]} [request.aspectTypes] * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. + * It only works for CUSTOM view. * @param {string[]} [request.paths] * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. + * paths within the Entry. It only works for CUSTOM view. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1451,7 +1557,12 @@ export class CatalogServiceClient { return this.innerApiCalls.getEntry(request, options, callback); } /** - * Looks up a single entry. + * Looks up a single Entry by name using the permission on the source system. + * + * **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is + * changing. For more information, see [Changes to BigQuery metadata stored in + * Dataplex + * Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes). * * @param {Object} request * The request object that will be sent. @@ -1459,13 +1570,14 @@ export class CatalogServiceClient { * Required. The project to which the request should be attributed in the * following form: `projects/{project}/locations/{location}`. * @param {google.cloud.dataplex.v1.EntryView} [request.view] - * Optional. View for controlling which parts of an entry are to be returned. + * Optional. View to control which parts of an entry the service should + * return. * @param {string[]} [request.aspectTypes] * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. + * It only works for CUSTOM view. * @param {string[]} [request.paths] * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. + * paths within the Entry. It only works for CUSTOM view. * @param {string} request.entry * Required. The resource name of the Entry: * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. @@ -1546,23 +1658,204 @@ export class CatalogServiceClient { this.initialize(); return this.innerApiCalls.lookupEntry(request, options, callback); } + /** + * Gets a metadata job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the metadata job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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.dataplex.v1.MetadataJob|MetadataJob}. + * Please see the {@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/catalog_service.get_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_GetMetadataJob_async + */ + getMetadataJob( + request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest | undefined, + {} | undefined, + ] + >; + getMetadataJob( + request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getMetadataJob( + request: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getMetadataJob( + request?: protos.google.cloud.dataplex.v1.IGetMetadataJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + | protos.google.cloud.dataplex.v1.IGetMetadataJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IGetMetadataJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as 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.getMetadataJob(request, options, callback); + } + /** + * Cancels a metadata job. + * + * If you cancel a metadata import job that is in progress, the changes in the + * job might be partially applied. We recommend that you reset the state of + * the entry groups in your project by running another metadata job that + * reverts the changes from the canceled job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the job, in the format + * `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_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/v1/catalog_service.cancel_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CancelMetadataJob_async + */ + cancelMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest | undefined, + {} | undefined, + ] + >; + cancelMetadataJob( + request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelMetadataJob( + request: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.ICancelMetadataJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as 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.cancelMetadataJob(request, options, callback); + } /** - * Creates an EntryType + * Creates an EntryType. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the EntryType, of the form: * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {string} request.entryTypeId * Required. EntryType identifier. * @param {google.cloud.dataplex.v1.EntryType} request.entryType - * Required. EntryType Resource + * Required. EntryType Resource. * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1693,17 +1986,17 @@ export class CatalogServiceClient { >; } /** - * Updates a EntryType resource. + * Updates an EntryType. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.dataplex.v1.EntryType} request.entryType - * Required. EntryType Resource + * Required. EntryType Resource. * @param {google.protobuf.FieldMask} request.updateMask * Required. Mask of fields to update. * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1834,7 +2127,7 @@ export class CatalogServiceClient { >; } /** - * Deletes a EntryType resource. + * Deletes an EntryType. * * @param {Object} request * The request object that will be sent. @@ -1843,7 +2136,7 @@ export class CatalogServiceClient { * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. * @param {string} [request.etag] * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response + * value, the DeleteEntryTypeRequest method returns an ABORTED error response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1974,21 +2267,21 @@ export class CatalogServiceClient { >; } /** - * Creates an AspectType + * Creates an AspectType. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the AspectType, of the form: * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {string} request.aspectTypeId * Required. AspectType identifier. * @param {google.cloud.dataplex.v1.AspectType} request.aspectType - * Required. AspectType Resource + * Required. AspectType Resource. * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2119,7 +2412,7 @@ export class CatalogServiceClient { >; } /** - * Updates a AspectType resource. + * Updates an AspectType. * * @param {Object} request * The request object that will be sent. @@ -2260,7 +2553,7 @@ export class CatalogServiceClient { >; } /** - * Deletes a AspectType resource. + * Deletes an AspectType. * * @param {Object} request * The request object that will be sent. @@ -2269,7 +2562,8 @@ export class CatalogServiceClient { * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. * @param {string} [request.etag] * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response + * value, the DeleteAspectTypeRequest method returns an ABORTED error + * response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2400,7 +2694,7 @@ export class CatalogServiceClient { >; } /** - * Creates an EntryGroup + * Creates an EntryGroup. * * @param {Object} request * The request object that will be sent. @@ -2411,10 +2705,10 @@ export class CatalogServiceClient { * @param {string} request.entryGroupId * Required. EntryGroup identifier. * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup - * Required. EntryGroup Resource + * Required. EntryGroup Resource. * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2545,17 +2839,17 @@ export class CatalogServiceClient { >; } /** - * Updates a EntryGroup resource. + * Updates an EntryGroup. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.dataplex.v1.EntryGroup} request.entryGroup - * Required. EntryGroup Resource + * Required. EntryGroup Resource. * @param {google.protobuf.FieldMask} request.updateMask * Required. Mask of fields to update. * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is false. + * Optional. The service validates the request, without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2686,7 +2980,7 @@ export class CatalogServiceClient { >; } /** - * Deletes a EntryGroup resource. + * Deletes an EntryGroup. * * @param {Object} request * The request object that will be sent. @@ -2695,7 +2989,8 @@ export class CatalogServiceClient { * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. * @param {string} [request.etag] * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response + * value, the DeleteEntryGroupRequest method returns an ABORTED error + * response. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2826,75 +3121,222 @@ export class CatalogServiceClient { >; } /** - * Lists EntryType resources in a project and location. + * Creates a metadata job. For example, use a metadata job to import Dataplex + * Catalog entries and aspects from a third-party system into Dataplex. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param {number} [request.pageSize] - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @param {string} [request.pageToken] - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {google.cloud.dataplex.v1.MetadataJob} request.metadataJob + * Required. The metadata job resource. + * @param {string} [request.metadataJobId] + * Optional. The metadata job ID. If not provided, a unique ID is generated + * with the prefix `metadata-job-`. + * @param {boolean} [request.validateOnly] + * Optional. The service validates the request without performing any + * mutations. The default is false. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.dataplex.v1.EntryType|EntryType}. - * 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 `listEntryTypesAsync()` - * 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 } + * 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/catalog_service.create_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async */ - listEntryTypes( - request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + createMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.dataplex.v1.IEntryType[], - protos.google.cloud.dataplex.v1.IListEntryTypesRequest | null, - protos.google.cloud.dataplex.v1.IListEntryTypesResponse, + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, ] >; - listEntryTypes( - request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + createMetadataJob( + request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - | protos.google.cloud.dataplex.v1.IListEntryTypesResponse - | null - | undefined, - protos.google.cloud.dataplex.v1.IEntryType + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listEntryTypes( - request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - callback: PaginationCallback< - protos.google.cloud.dataplex.v1.IListEntryTypesRequest, - | protos.google.cloud.dataplex.v1.IListEntryTypesResponse - | null - | undefined, + createMetadataJob( + request: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createMetadataJob( + request?: protos.google.cloud.dataplex.v1.ICreateMetadataJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createMetadataJob(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createMetadataJob()`. + * @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/catalog_service.create_metadata_job.js + * region_tag:dataplex_v1_generated_CatalogService_CreateMetadataJob_async + */ + async checkCreateMetadataJobProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.MetadataJob, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + 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.createMetadataJob, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.MetadataJob, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Lists EntryType resources in a project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the EntryType location, of the form: + * `projects/{project_number}/locations/{location_id}` + * where `location_id` refers to a Google Cloud region. + * @param {number} [request.pageSize] + * Optional. Maximum number of EntryTypes to return. The service may return + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListEntryTypes` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. + * @param {string} [request.orderBy] + * Optional. Orders the result by `name` or `create_time` fields. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.EntryType|EntryType}. + * 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 `listEntryTypesAsync()` + * 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. + */ + listEntryTypes( + request?: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IEntryType[], + protos.google.cloud.dataplex.v1.IListEntryTypesRequest | null, + protos.google.cloud.dataplex.v1.IListEntryTypesResponse, + ] + >; + listEntryTypes( + request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + | protos.google.cloud.dataplex.v1.IListEntryTypesResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IEntryType + > + ): void; + listEntryTypes( + request: protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListEntryTypesRequest, + | protos.google.cloud.dataplex.v1.IListEntryTypesResponse + | null + | undefined, protos.google.cloud.dataplex.v1.IEntryType > ): void; @@ -2949,27 +3391,28 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the EntryType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntryTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: + * The service supports the following formats: * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3013,27 +3456,28 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the EntryType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to + * fewer than this value. If unspecified, the service returns at most 10 + * EntryTypes. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntryTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. + * parameters you provided to `ListEntryTypes` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: + * The service supports the following formats: + * + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3076,27 +3520,28 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the AspectType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListAspectTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: + * The service supports the following formats: * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3192,27 +3637,28 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the AspectType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListAspectTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: + * The service supports the following formats: * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3256,27 +3702,28 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the AspectType location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * AspectTypes. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListAspectTypes` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. + * parameters you provide to `ListAspectTypes` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: + * The service supports the following formats: * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. + * * labels.key1 = "value1" + * * labels:key1 + * * name = "value" + * + * These restrictions can be conjoined with AND, OR, and NOT conjunctions. * @param {string} [request.orderBy] - * Optional. Order by fields (`name` or `create_time`) for the result. + * Optional. Orders the result by `name` or `create_time` fields. * If not specified, the ordering is undefined. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -3319,17 +3766,17 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the entryGroup location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntryGroups` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3428,17 +3875,17 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the entryGroup location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntryGroups` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3485,17 +3932,17 @@ export class CatalogServiceClient { * @param {string} request.parent * Required. The resource name of the entryGroup location, of the form: * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. + * where `location_id` refers to a Google Cloud region. * @param {number} [request.pageSize] * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * fewer than this value. If unspecified, the service returns at most 10 + * EntryGroups. The maximum value is 1000; values above 1000 will be coerced + * to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListEntryGroups` call. * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. + * parameters you provide to `ListEntryGroups` must match the call that + * provided the page token. * @param {string} [request.filter] * Optional. Filter request. * @param {string} [request.orderBy] @@ -3534,7 +3981,7 @@ export class CatalogServiceClient { ) as AsyncIterable; } /** - * Lists entries within an entry group. + * Lists Entries within an EntryGroup. * * @param {Object} request * The request object that will be sent. @@ -3542,23 +3989,35 @@ export class CatalogServiceClient { * Required. The resource name of the parent Entry Group: * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. * @param {string} [request.pageToken] - * Optional. The pagination token returned by a previous request. + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.filter] - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3648,23 +4107,35 @@ export class CatalogServiceClient { * Required. The resource name of the parent Entry Group: * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. * @param {string} [request.pageToken] - * Optional. The pagination token returned by a previous request. + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.filter] - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3708,23 +4179,35 @@ export class CatalogServiceClient { * Required. The resource name of the parent Entry Group: * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. * @param {number} [request.pageSize] + * Optional. Number of items to return per page. If there are remaining + * results, the service returns a next_page_token. If unspecified, the service + * returns at most 10 Entries. The maximum value is 100; values above 100 will + * be coerced to 100. * @param {string} [request.pageToken] - * Optional. The pagination token returned by a previous request. + * Optional. Page token received from a previous `ListEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.filter] - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" + * Optional. A filter on the entries to return. Filters are case-sensitive. + * You can filter the request by the following fields: + * + * * entry_type + * * entry_source.display_name + * + * The comparison operators are =, !=, <, >, <=, >=. The service compares + * strings according to lexical order. + * + * You can use the logical operators AND, OR, NOT in the filter. + * + * You can use Wildcard "*", but for entry_type you need to provide the + * full project id or number. + * + * Example filter expressions: + * + * * "entry_source.display_name=AnExampleDisplayName" + * * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + * * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * * "NOT entry_source.display_name=AnotherExampleDisplayName" * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3759,7 +4242,7 @@ export class CatalogServiceClient { ) as AsyncIterable; } /** - * Searches for entries matching given query and scope. + * Searches for Entries matching the given query and scope. * * @param {Object} request * The request object that will be sent. @@ -3769,15 +4252,19 @@ export class CatalogServiceClient { * @param {string} request.query * Required. The query against which entries in scope should be matched. * @param {number} [request.pageSize] - * Optional. Pagination. + * 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. * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.orderBy] - * Optional. Ordering of the results. Supported options to be added later. + * Optional. Specifies the ordering of results. * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3869,15 +4356,19 @@ export class CatalogServiceClient { * @param {string} request.query * Required. The query against which entries in scope should be matched. * @param {number} [request.pageSize] - * Optional. Pagination. + * 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. * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.orderBy] - * Optional. Ordering of the results. Supported options to be added later. + * Optional. Specifies the ordering of results. * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3923,15 +4414,19 @@ export class CatalogServiceClient { * @param {string} request.query * Required. The query against which entries in scope should be matched. * @param {number} [request.pageSize] - * Optional. Pagination. + * 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. * @param {string} [request.pageToken] + * Optional. Page token received from a previous `SearchEntries` call. Provide + * this to retrieve the subsequent page. * @param {string} [request.orderBy] - * Optional. Ordering of the results. Supported options to be added later. + * Optional. Specifies the ordering of results. * @param {string} [request.scope] - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. + * Optional. The scope under which the search should be operating. It must + * either be `organizations/` or `projects/`. If it is + * unspecified, it defaults to the organization where the project provided in + * `name` is located. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3965,6 +4460,249 @@ export class CatalogServiceClient { callSettings ) as AsyncIterable; } + /** + * Lists metadata jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.dataplex.v1.MetadataJob|MetadataJob}. + * 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 `listMetadataJobsAsync()` + * 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. + */ + listMetadataJobs( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IMetadataJob[], + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest | null, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse, + ] + >; + listMetadataJobs( + request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + | protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IMetadataJob + > + ): void; + listMetadataJobs( + request: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + | protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IMetadataJob + > + ): void; + listMetadataJobs( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + | protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IMetadataJob + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + | protos.google.cloud.dataplex.v1.IListMetadataJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IMetadataJob + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IMetadataJob[], + protos.google.cloud.dataplex.v1.IListMetadataJobsRequest | null, + protos.google.cloud.dataplex.v1.IListMetadataJobsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as 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.listMetadataJobs(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 resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.MetadataJob|MetadataJob} 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 `listMetadataJobsAsync()` + * 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. + */ + listMetadataJobsStream( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + 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['listMetadataJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMetadataJobs.createStream( + this.innerApiCalls.listMetadataJobs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMetadataJobs`, 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 resource name of the parent location, in the format + * `projects/{project_id_or_number}/locations/{location_id}` + * @param {number} [request.pageSize] + * Optional. The maximum number of metadata jobs to return. The service might + * return fewer jobs than this value. If unspecified, at most 10 jobs are + * returned. The maximum value is 1,000. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListMetadataJobs` call. + * Provide this token to retrieve the subsequent page of results. When + * paginating, all other parameters that are provided to the + * `ListMetadataJobs` request must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. Filter request. Filters are case-sensitive. + * The service supports the following formats: + * + * * `labels.key1 = "value1"` + * * `labels:key1` + * * `name = "value"` + * + * You can combine filters with `AND`, `OR`, and `NOT` operators. + * @param {string} [request.orderBy] + * Optional. The field to sort the results by, either `name` or `create_time`. + * If not specified, the ordering is undefined. + * @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.dataplex.v1.MetadataJob|MetadataJob}. 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/catalog_service.list_metadata_jobs.js + * region_tag:dataplex_v1_generated_CatalogService_ListMetadataJobs_async + */ + listMetadataJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListMetadataJobsRequest, + 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['listMetadataJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMetadataJobs.asyncIterate( + this.innerApiCalls['listMetadataJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } /** * Gets information about a location. * @@ -5215,6 +5953,58 @@ export class CatalogServiceClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/catalog_service_client_config.json b/packages/google-cloud-dataplex/src/v1/catalog_service_client_config.json index fa7b8aa18c8..4d0adc34635 100644 --- a/packages/google-cloud-dataplex/src/v1/catalog_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/catalog_service_client_config.json @@ -142,6 +142,22 @@ "timeout_millis": 60000, "retry_codes_name": "resource_exhausted_unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMetadataJobs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelMetadataJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dataplex/src/v1/catalog_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/catalog_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/catalog_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/catalog_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 3f510b50af2..93f035fff07 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -253,6 +253,9 @@ export class ContentServiceClient { lakePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -339,6 +342,9 @@ export class ContentServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -348,6 +354,18 @@ export class ContentServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -391,6 +409,10 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -403,6 +425,22 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -446,6 +484,10 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -458,24 +500,55 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -2736,6 +2809,58 @@ export class ContentServiceClient { return this.pathTemplates.lakePathTemplate.match(lakeName).lake; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts index 7a29a80d9e4..6fe72a281f6 100644 --- a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts @@ -259,6 +259,9 @@ export class DataScanServiceClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -350,6 +353,9 @@ export class DataScanServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -359,6 +365,18 @@ export class DataScanServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -402,6 +420,10 @@ export class DataScanServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -414,6 +436,22 @@ export class DataScanServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -457,6 +495,10 @@ export class DataScanServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -469,24 +511,55 @@ export class DataScanServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -3252,6 +3325,58 @@ export class DataScanServiceClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts index 34526b3f783..1cbee099859 100644 --- a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_client.ts @@ -258,6 +258,9 @@ export class DataTaxonomyServiceClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -354,6 +357,9 @@ export class DataTaxonomyServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -363,6 +369,18 @@ export class DataTaxonomyServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -406,6 +424,10 @@ export class DataTaxonomyServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -418,6 +440,22 @@ export class DataTaxonomyServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -461,6 +499,10 @@ export class DataTaxonomyServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -473,24 +515,55 @@ export class DataTaxonomyServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -4312,6 +4385,58 @@ export class DataTaxonomyServiceClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/data_taxonomy_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 5bf02d6b0c6..a74d4283a61 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -261,6 +261,9 @@ export class DataplexServiceClient { locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -392,6 +395,9 @@ export class DataplexServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -401,6 +407,18 @@ export class DataplexServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -444,6 +462,10 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -456,6 +478,22 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -499,6 +537,10 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -511,24 +553,55 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -7049,6 +7122,58 @@ export class DataplexServiceClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json index 9642e82490c..a3c2ba6473e 100644 --- a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -50,6 +50,16 @@ "lookupEntry" ] }, + "GetMetadataJob": { + "methods": [ + "getMetadataJob" + ] + }, + "CancelMetadataJob": { + "methods": [ + "cancelMetadataJob" + ] + }, "CreateEntryType": { "methods": [ "createEntryType" @@ -95,6 +105,11 @@ "deleteEntryGroup" ] }, + "CreateMetadataJob": { + "methods": [ + "createMetadataJob" + ] + }, "ListEntryTypes": { "methods": [ "listEntryTypes", @@ -129,6 +144,13 @@ "searchEntriesStream", "searchEntriesAsync" ] + }, + "ListMetadataJobs": { + "methods": [ + "listMetadataJobs", + "listMetadataJobsStream", + "listMetadataJobsAsync" + ] } } }, @@ -175,6 +197,16 @@ "lookupEntry" ] }, + "GetMetadataJob": { + "methods": [ + "getMetadataJob" + ] + }, + "CancelMetadataJob": { + "methods": [ + "cancelMetadataJob" + ] + }, "CreateEntryType": { "methods": [ "createEntryType" @@ -220,6 +252,11 @@ "deleteEntryGroup" ] }, + "CreateMetadataJob": { + "methods": [ + "createMetadataJob" + ] + }, "ListEntryTypes": { "methods": [ "listEntryTypes", @@ -254,6 +291,13 @@ "searchEntriesStream", "searchEntriesAsync" ] + }, + "ListMetadataJobs": { + "methods": [ + "listMetadataJobs", + "listMetadataJobsStream", + "listMetadataJobsAsync" + ] } } } diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index 84595402014..e2f1239f5d8 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -254,6 +254,9 @@ export class MetadataServiceClient { lakePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}' ), + metadataJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataJobs/{metadataJob}' + ), partitionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' ), @@ -345,6 +348,9 @@ export class MetadataServiceClient { { get: '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:getIamPolicy', + }, { get: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', }, @@ -354,6 +360,18 @@ export class MetadataServiceClient { { get: '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:getIamPolicy', + }, + { + get: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:getIamPolicy', + }, ], }, { @@ -397,6 +415,10 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:setIamPolicy', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', body: '*', @@ -409,6 +431,22 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -452,6 +490,10 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/entryLinkTypes/*}:testIamPermissions', + body: '*', + }, { post: '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', body: '*', @@ -464,24 +506,55 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/categories/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/glossaries/*/terms/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=organizations/*/locations/*/encryptionConfigs/*}:testIamPermissions', + body: '*', + }, ], }, { selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', body: '*', + additional_bindings: [ + { + post: '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {delete: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/v1/{name=organizations/*/locations/*/operations/*}'}, + ], }, ]; } @@ -3010,6 +3083,58 @@ export class MetadataServiceClient { return this.pathTemplates.lakePathTemplate.match(lakeName).lake; } + /** + * Return a fully-qualified metadataJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadataJob + * @returns {string} Resource name string. + */ + metadataJobPath(project: string, location: string, metadataJob: string) { + return this.pathTemplates.metadataJobPathTemplate.render({ + project: project, + location: location, + metadataJob: metadataJob, + }); + } + + /** + * Parse the project from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .project; + } + + /** + * Parse the location from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .location; + } + + /** + * Parse the metadataJob from MetadataJob resource. + * + * @param {string} metadataJobName + * A fully-qualified path representing MetadataJob resource. + * @returns {string} A string representing the metadataJob. + */ + matchMetadataJobFromMetadataJobName(metadataJobName: string) { + return this.pathTemplates.metadataJobPathTemplate.match(metadataJobName) + .metadataJob; + } + /** * Return a fully-qualified partition resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json index e5118f1dfa9..69e0b730c9f 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/catalog.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_discovery.proto", "../../protos/google/cloud/dataplex/v1/data_profile.proto", "../../protos/google/cloud/dataplex/v1/data_quality.proto", "../../protos/google/cloud/dataplex/v1/data_taxonomy.proto", diff --git a/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts index c4a0582450d..9de68d5ad0d 100644 --- a/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_catalog_service_v1.ts @@ -1383,6 +1383,266 @@ describe('v1.CatalogServiceClient', () => { }); }); + describe('getMetadataJob', () => { + it('invokes getMetadataJob without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.MetadataJob() + ); + client.innerApiCalls.getMetadataJob = stubSimpleCall(expectedResponse); + const [response] = await client.getMetadataJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.MetadataJob() + ); + client.innerApiCalls.getMetadataJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMetadataJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IMetadataJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetadataJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getMetadataJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMetadataJob with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getMetadataJob(request), expectedError); + }); + }); + + describe('cancelMetadataJob', () => { + it('invokes cancelMetadataJob without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelMetadataJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelMetadataJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.cancelMetadataJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelMetadataJob( + 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.cancelMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelMetadataJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.cancelMetadataJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.cancelMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelMetadataJob with closed client', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CancelMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CancelMetadataJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelMetadataJob(request), expectedError); + }); + }); + describe('createEntryType', () => { it('invokes createEntryType without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ @@ -3141,68 +3401,69 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('listEntryTypes', () => { - it('invokes listEntryTypes without error', async () => { + describe('createMetadataJob', () => { + it('invokes createMetadataJob without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.ListEntryTypesRequest', + '.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.innerApiCalls.listEntryTypes = stubSimpleCall(expectedResponse); - const [response] = await client.listEntryTypes(request); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMetadataJob = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createMetadataJob(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEntryTypes without error using callback', async () => { + it('invokes createMetadataJob without error using callback', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.ListEntryTypesRequest', + '.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), - ]; - client.innerApiCalls.listEntryTypes = - stubSimpleCallWithCallback(expectedResponse); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMetadataJob = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listEntryTypes( + client.createMetadataJob( request, ( err?: Error | null, - result?: protos.google.cloud.dataplex.v1.IEntryType[] | null + result?: LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -3212,50 +3473,243 @@ describe('v1.CatalogServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IMetadataJob, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEntryTypes with error', async () => { + it('invokes createMetadataJob with call error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.ListEntryTypesRequest', + '.google.cloud.dataplex.v1.CreateMetadataJobRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listEntryTypes = stubSimpleCall( + client.innerApiCalls.createMetadataJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listEntryTypes(request), expectedError); + await assert.rejects(client.createMetadataJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryTypes as SinonStub + client.innerApiCalls.createMetadataJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listEntryTypesStream without error', async () => { + it('invokes createMetadataJob with LRO error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateMetadataJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateMetadataJobRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMetadataJob = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createMetadataJob(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createMetadataJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMetadataJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMetadataJobProgress without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateMetadataJobProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMetadataJobProgress with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + 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.checkCreateMetadataJobProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listEntryTypes', () => { + it('invokes listEntryTypes without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntryTypesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.innerApiCalls.listEntryTypes = stubSimpleCall(expectedResponse); + const [response] = await client.listEntryTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypes without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntryTypesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.EntryType()), + ]; + client.innerApiCalls.listEntryTypes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEntryTypes( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IEntryType[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypes with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntryTypesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntryTypesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEntryTypes = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEntryTypes(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listEntryTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEntryTypesStream without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -4231,10 +4685,335 @@ describe('v1.CatalogServiceClient', () => { ); const stream = client.listEntriesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.Entry[] = []; - stream.on('data', (response: protos.google.cloud.dataplex.v1.Entry) => { - responses.push(response); - }); + const responses: protos.google.cloud.dataplex.v1.Entry[] = []; + stream.on('data', (response: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListEntriesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + ]; + client.descriptors.page.listEntries.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.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 catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.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.dataplex.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('searchEntries', () => { + it('invokes searchEntries without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + ]; + client.innerApiCalls.searchEntries = stubSimpleCall(expectedResponse); + const [response] = await client.searchEntries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntries without error using callback', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + ]; + client.innerApiCalls.searchEntries = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchEntries( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.dataplex.v1.ISearchEntriesResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntries with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchEntries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.searchEntries(request), expectedError); + const actualRequest = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchEntries as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchEntriesStream without error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + ]; + client.descriptors.page.searchEntries.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + 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.searchEntries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.searchEntries, request) + ); + assert( + (client.descriptors.page.searchEntries.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes searchEntriesStream with error', async () => { + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchEntries.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.searchEntriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4244,12 +5023,12 @@ describe('v1.CatalogServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listEntries.createStream as SinonStub) + (client.descriptors.page.searchEntries.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) + .calledWith(client.innerApiCalls.searchEntries, request) ); assert( - (client.descriptors.page.listEntries.createStream as SinonStub) + (client.descriptors.page.searchEntries.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4257,42 +5036,49 @@ describe('v1.CatalogServiceClient', () => { ); }); - it('uses async iteration with listEntries without error', async () => { + it('uses async iteration with searchEntries without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.ListEntriesRequest', - ['parent'] + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), - generateSampleMessage(new protos.google.cloud.dataplex.v1.Entry()), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.SearchEntriesResult() + ), ]; - client.descriptors.page.listEntries.asyncIterate = + client.descriptors.page.searchEntries.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.IEntry[] = []; - const iterable = client.listEntriesAsync(request); + const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = + []; + const iterable = client.searchEntriesAsync(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], + ( + client.descriptors.page.searchEntries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4300,41 +5086,40 @@ describe('v1.CatalogServiceClient', () => { ); }); - it('uses async iteration with listEntries with error', async () => { + it('uses async iteration with searchEntries with error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.ListEntriesRequest() + new protos.google.cloud.dataplex.v1.SearchEntriesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.ListEntriesRequest', - ['parent'] + '.google.cloud.dataplex.v1.SearchEntriesRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listEntriesAsync(request); + client.descriptors.page.searchEntries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchEntriesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.IEntry[] = []; + const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.searchEntries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) + (client.descriptors.page.searchEntries.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4343,82 +5128,80 @@ describe('v1.CatalogServiceClient', () => { }); }); - describe('searchEntries', () => { - it('invokes searchEntries without error', async () => { + describe('listMetadataJobs', () => { + it('invokes listMetadataJobs without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), ]; - client.innerApiCalls.searchEntries = stubSimpleCall(expectedResponse); - const [response] = await client.searchEntries(request); + client.innerApiCalls.listMetadataJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listMetadataJobs(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchEntries without error using callback', async () => { + it('invokes listMetadataJobs without error using callback', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), ]; - client.innerApiCalls.searchEntries = + client.innerApiCalls.listMetadataJobs = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.searchEntries( + client.listMetadataJobs( request, ( err?: Error | null, - result?: - | protos.google.cloud.dataplex.v1.ISearchEntriesResult[] - | null + result?: protos.google.cloud.dataplex.v1.IMetadataJob[] | null ) => { if (err) { reject(err); @@ -4431,81 +5214,80 @@ describe('v1.CatalogServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchEntries with error', async () => { + it('invokes listMetadataJobs with error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.searchEntries = stubSimpleCall( + client.innerApiCalls.listMetadataJobs = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.searchEntries(request), expectedError); + await assert.rejects(client.listMetadataJobs(request), expectedError); const actualRequest = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchEntries as SinonStub + client.innerApiCalls.listMetadataJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchEntriesStream without error', async () => { + it('invokes listMetadataJobsStream without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), ]; - client.descriptors.page.searchEntries.createStream = + client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.searchEntriesStream(request); + const stream = client.listMetadataJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = - []; + const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; stream.on( 'data', - (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + (response: protos.google.cloud.dataplex.v1.MetadataJob) => { responses.push(response); } ); @@ -4519,12 +5301,12 @@ describe('v1.CatalogServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.searchEntries, request) + .calledWith(client.innerApiCalls.listMetadataJobs, request) ); assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4532,31 +5314,30 @@ describe('v1.CatalogServiceClient', () => { ); }); - it('invokes searchEntriesStream with error', async () => { + it('invokes listMetadataJobsStream with error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchEntries.createStream = + client.descriptors.page.listMetadataJobs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.searchEntriesStream(request); + const stream = client.listMetadataJobsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.dataplex.v1.SearchEntriesResult[] = - []; + const responses: protos.google.cloud.dataplex.v1.MetadataJob[] = []; stream.on( 'data', - (response: protos.google.cloud.dataplex.v1.SearchEntriesResult) => { + (response: protos.google.cloud.dataplex.v1.MetadataJob) => { responses.push(response); } ); @@ -4569,12 +5350,12 @@ describe('v1.CatalogServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.searchEntries, request) + .calledWith(client.innerApiCalls.listMetadataJobs, request) ); assert( - (client.descriptors.page.searchEntries.createStream as SinonStub) + (client.descriptors.page.listMetadataJobs.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4582,49 +5363,48 @@ describe('v1.CatalogServiceClient', () => { ); }); - it('uses async iteration with searchEntries without error', async () => { + it('uses async iteration with listMetadataJobs without error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesResult() + new protos.google.cloud.dataplex.v1.MetadataJob() ), ]; - client.descriptors.page.searchEntries.asyncIterate = + client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = - []; - const iterable = client.searchEntriesAsync(request); + const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; + const iterable = client.listMetadataJobsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.searchEntries.asyncIterate as SinonStub + client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -4632,40 +5412,39 @@ describe('v1.CatalogServiceClient', () => { ); }); - it('uses async iteration with searchEntries with error', async () => { + it('uses async iteration with listMetadataJobs with error', async () => { const client = new catalogserviceModule.v1.CatalogServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.dataplex.v1.SearchEntriesRequest() + new protos.google.cloud.dataplex.v1.ListMetadataJobsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.dataplex.v1.SearchEntriesRequest', - ['name'] + '.google.cloud.dataplex.v1.ListMetadataJobsRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchEntries.asyncIterate = + client.descriptors.page.listMetadataJobs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchEntriesAsync(request); + const iterable = client.listMetadataJobsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.dataplex.v1.ISearchEntriesResult[] = - []; + const responses: protos.google.cloud.dataplex.v1.IMetadataJob[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.searchEntries.asyncIterate as SinonStub + client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.searchEntries.asyncIterate as SinonStub) + (client.descriptors.page.listMetadataJobs.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -6337,6 +7116,70 @@ describe('v1.CatalogServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new catalogserviceModule.v1.CatalogServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index 140d4cae62c..2555a781ac8 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -3139,6 +3139,70 @@ describe('v1.ContentServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts index abf2fcbbe24..b189028173a 100644 --- a/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts @@ -3744,6 +3744,70 @@ describe('v1.DataScanServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_data_taxonomy_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_data_taxonomy_service_v1.ts index 398f2cf4eb7..884265b26b7 100644 --- a/packages/google-cloud-dataplex/test/gapic_data_taxonomy_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_data_taxonomy_service_v1.ts @@ -5434,6 +5434,72 @@ describe('v1.DataTaxonomyServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new datataxonomyserviceModule.v1.DataTaxonomyServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 729b0496b5b..65d65cc7a1e 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -8912,6 +8912,70 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index a96142b6014..89e9ade9e7a 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -3434,6 +3434,70 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('metadataJob', () => { + const fakePath = '/rendered/path/metadataJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadataJob: 'metadataJobValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataJobPath', () => { + const result = client.metadataJobPath( + 'projectValue', + 'locationValue', + 'metadataJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataJobName', () => { + const result = client.matchProjectFromMetadataJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataJobName', () => { + const result = client.matchLocationFromMetadataJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataJobFromMetadataJobName', () => { + const result = client.matchMetadataJobFromMetadataJobName(fakePath); + assert.strictEqual(result, 'metadataJobValue'); + assert( + (client.pathTemplates.metadataJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('partition', () => { const fakePath = '/rendered/path/partition'; const expectedParameters = {